Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrading to guidance>=0.1.0, restructuring llms folder, adding documentation #3

Merged
merged 29 commits into from
Feb 21, 2024

Conversation

parkervg
Copy link
Owner

@parkervg parkervg commented Feb 20, 2024

The previous version was built on guidance 0.0.64, the older version built with handlebars-style syntax. However, this meant that we had to use an old version of OpenAI. This PR refactors BlendSQL to use the newer 0.1.0 version of guidance.

  • Reformatted _programs.py to use guidance>=0.1.0 syntax
    • Found in blendsql/_programs.py, each LLM ingredient now has a program represented as a Python script. This is cleaner imo, since we can use context handlers instead of rewriting completion/chat style prompts with the handlebar syntax
  • Restructured llms folder
    • I moved them to blendsql/llms, and created a remote/local subdirectories
    • num_prompt_tokens is now updated with each predict call
    • A separate AzureOpenaiLLM class was added
  • Stored test dbs on huggingface at https://huggingface.co/datasets/parkervg/blendsql-test-dbs
    • The dbs will be fetched from the hub before running tests
  • Added documentation with mkdocs
    • To be deployed via github pages (screenshot below)
Screenshot 2024-02-20 at 4 59 37 PM

@parkervg parkervg requested a review from paragdakle February 20, 2024 22:00
@parkervg
Copy link
Owner Author

@parkervg parkervg requested a review from LeonCaesa February 21, 2024 17:07
@LeonCaesa LeonCaesa merged commit 65be128 into main Feb 21, 2024
1 check passed
@parkervg parkervg deleted the llms-restructure branch February 22, 2024 20:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants