Releases: ericmjl/llamabot
v0.2.2
Version 0.2.2
This release includes several updates and improvements to the project.
New Features
- Added support for passing keyword arguments to the
simple
andquerybot
functions. (d88862b) (Rena Lu) - Updated the import statement for
llama_index
to improve code readability. (6f48ccd) (Rena Lu) - Updated the
llama_index
requirement to the latest version. (4bc1078) (Rena Lu) - Added a newline at the end of the v0.2.1 release notes document to maintain consistency and proper formatting in markdown files. (48ee571) (Eric Ma)
Bug Fixes
- Removed a test print statement that was accidentally left in the code. (9b85753) (Rena Lu)
Deprecations
- None in this release.
Note: A code style update was also made in this release, but it does not introduce any new features or bug fixes. (e3f6211) (Rena Lu)
v0.2.1
Version 0.2.1
This release includes improvements to the Zotero integration, QueryBot initialization, and the removal of Ollama response content.
New Features
- Add a space in the mock to test the strip works (cced1c9) (Aidan Brewis)
- Strip the message content from Ollama responses (2c37454) (Aidan Brewis)
- Update QueryBot initialization and import paths for better readability (f44c98d) (Eric Ma)
Bug Fixes
- Sanitize collection names using slugify to ensure URL-friendliness (9e7d717) (Eric Ma)
- Adjust pydantic dependency location for proper package resolution (eef70a0) (Eric Ma)
Deprecations
- None in this release
Note: The release notes for version 0.2.0 have been added in commit 3331d44.
v0.2.0
Version 0.2.0
This release includes several improvements and new features for the LlamaBot project.
New Features
- API Server: Merged pull request #28, which introduces an API server for the LlamaBot project. (4ea160a, Eric Ma)
- Mock Response and API Key Support: Added
api_key
andmock_response
parameters to the SimpleBot constructor for OpenAI API key usage and testing with predefined responses. (2f6d1d9, Eric Ma) - Streaming Response Test: Implemented a new test case to verify that SimpleBot can stream responses correctly. (5ddb804, Eric Ma)
- Delta Content Printing: The SimpleBot class now prints the delta content to the console after processing each message for better readability. (d657b4a, Eric Ma)
- ChatBot UI Jupyter Notebook: Created a new Jupyter notebook for ChatBot UI development, including the setup of necessary classes and functions. (bb4397a, Eric Ma)
- ChatUIMixin: Introduced a new ChatUIMixin class for easier integration of chat functionalities in LlamaBot components. (4209b18, Eric Ma)
- Streamlined Message Handling and Typing: Simplified the message construction and typing in the SimpleBot class for improved readability and maintainability. (65e026c, Eric Ma)
- Streaming Response for Chat Messages: Implemented streaming response functionality in the ChatBot class for better real-time interactivity. (1ebc356, Eric Ma)
- Improved Response Streaming: Extracted streaming logic into a separate method and ensured consistent yielding of AIMessage instances in the SimpleBot class. (08636a7, Eric Ma)
- Toggleable Streaming Responses: Added a
stream
parameter to the generate_response method in the SimpleBot class to control streaming behavior. (565aed7, Eric Ma) - Streaming Response Capability: Implemented a new stream_response method in the SimpleBot class for streaming responses incrementally. (2a8254c, Eric Ma)
- Response Generation Extraction: Simplified the generate_response method in the SimpleBot class by extracting the response generation logic into a new _make_response function. (0ad9a1e, Eric Ma)
- API Key Instructions: Added instructions for setting API keys for other providers in the documentation. (55ec13e, Eric Ma)
- Standardized LlamaBot Naming Convention: Corrected the casing of 'LLaMaBot' to 'LlamaBot' throughout the index.md documentation and separated API provider configuration instructions into subsections for OpenAI and Mistral. (7fd2e13, Eric Ma)
- New Model Names and CLI Options Refactoring: Added 'stablelm2' and 'duckdb-nsql' to the list of available models and refactored command-line interface arguments in serve.py to use Typer options instead of arguments. (e6a2122, Eric Ma)
- FastAPI Endpoint for QueryBot: Implemented APIMixin to allow QueryBot to serve FastAPI endpoints and added a
serve
command to the CLI for starting a FastAPI server with QueryBot. (5edd84b, Eric Ma) - Improved System Prompt for QueryBot: Modified the system prompt in QueryBot to be more specific about the source of knowledge and clarified the response behavior when the repository does not contain the answer. (5f7ce51, Eric Ma)
- LlamaBot CLI Usage Guide: Added a comprehensive guide for the LlamaBot CLI in the documentation, including installation instructions, key commands, and usage examples. (9f0b1c8, Eric Ma)
Bug Fixes
- ImageBot Import Path Update: Changed the import path of AIMessage from langchain.schema to llamabot.components.messages to reflect the new module structure. (27904d0, Eric Ma)
- Error Handling for Image URL Retrieval: Added an exception raise in the ImageBot.generate_image method to handle cases where no image URL is found in the response. (27904d0, Eric Ma)
- Disabled Streaming in SimpleBot Tests: Passed
stream=False
when creating a SimpleBot instance in tests to ensure consistent behavior without relying on streaming features. (e559114, Eric Ma) - Ensured Non-Empty Strings in Bot Tests: Modified tests to generate non-empty strings for system_prompt and human_message using hypothesis strategies. (e8fed0a, Eric Ma)
Deprecations
- Removed Unused Panel App Creation Code: Removed the
create_panel_app
function and its related imports from python.py as they are no longer used. (4469b35, Eric Ma) - Removed PanelMarkdownCallbackHandler Class: Removed the PanelMarkdownCallbackHandler class as it is no longer required in the llamabot project. (b7ef263, Eric Ma)
- Removed Unused pytest Import and Obsolete Test: Removed an unused import of pytest in test_simplebot.py and deleted the test_simple_bot_stream_response function, which is no longer needed due to changes in the SimpleBot streaming response logic. (ed0756b, Eric Ma)
- Removed model_dispatcher Module: The model_dispatcher.py module has been removed as part of a refactoring effort. This change simplifies the llamabot architecture by delegating model dispatch responsibilities to a new system or removing the need for such functionality entirely. (0887618, Eric Ma)
- Removed api_key Command from configure.py: The api_key command was deprecated and has been removed to simplify configuration. Users should now set API keys directly via environment variables. (2752d7e, Eric Ma)
v0.1.2
Here are the release notes based on the provided commit log:
Version 0.1.2
This release includes new model names for llamabot and an update to its dependencies.
New Features
- Added 'qwen' and 'tinydolphin' to the list of llamabot model names and updated dependencies to include 'pydantic' (21c1492) (Eric Ma)
- Bumped version number from 0.1.1 to 0.1.2 (76b9b4) (github-actions)
Bug Fixes
No bug fixes were included in this release.
Deprecations
No deprecations were included in this release.
Note: The commit cd04ed38
is not included in the release notes as it only added release notes for version 0.1.1.
v0.1.1
Version 0.1.1
This release includes several improvements and bug fixes to enhance the overall functionality and stability of the project.
New Features
- Bumped version number to 0.1.1 (1ac7b6f, github-actions)
- Added python-slugify to project dependencies for better string processing capabilities (330152, Eric Ma)
- Removed unnecessary logger import and usage in SimpleBot (37182cb, Eric Ma)
- Streamlined the querybot notebook and updated the repository URL (bc17da7, Eric Ma)
- Enhanced the querybot notebook with utility functions and integrated chromadb (8a74c73, Eric Ma)
- Added python-slugify dependency to the environment.yml (f5e2dea, Eric Ma)
- Implemented a new 'repo' subcommand in the CLI module for repository interactions (58fe450, Eric Ma)
- Added progress bar and deduplication to document processing (1e76998, Eric Ma)
- Slugified collection names for document storage (4d8dfa2, Eric Ma)
- Optimized document loading and splitting in doc_processor (6731b97, Eric Ma)
- Improved API key storage and usage documentation (c1bd6d9, Eric Ma)
- Updated default model to gpt-4 in git.py (3817430, Eric Ma)
- Added support for document collections in LlamaBot (009890c, Eric Ma)
- Improved file search algorithm in file_finder (87d079c, Eric Ma)
- Added support for configuring multiple API keys (d00c14d, Eric Ma)
- Updated QueryBot parameters and model names in pdf.ipynb (c83d834, Eric Ma)
- Added support for configuring multiple API providers (230e816, Eric Ma)
Bug Fixes
- Fixed assertion for split_document function (61e0688, Eric Ma)
- Ensured non-negative chunk_size parameter in doc_processor (7f9d17b, Eric Ma)
- Adjusted assertions for split_document_with_overlap (7237647, Eric Ma)
- Fixed adding documents only when document_paths is not empty (0808ced, Eric Ma)
- Updated the QueryBot constructor to support optional document_paths (72e6c02, Eric Ma)
- Removed unnecessary newline characters and updated python version in imagebot.ipynb (2d415c8, Eric Ma)
- Updated the chatbot to use the Mistral model instead of GPT-4 (51773db, Eric Ma)
- Added support for LiteLLM models in LLaMaBot documentation (249b3e5, Eric Ma)
Deprecations
v0.1.0
Version 0.1.0
This release includes several new features, bug fixes, and improvements to the codebase.
New Features
- Update default language model to Mistral and remove OpenAI API key warning (e74954b) (Eric Ma): The default language model used by the
SimpleBot
class has been updated to Mistral, which is a more cost-effective option compared to the previously used gpt-3.5-turbo-16k-0613 model. The OpenAI API key warning has also been removed, as the Mistral model does not require an API key. - Add API key support for QABot and SimpleBot (b5f8253) (Eric Ma): This commit adds support for providing API keys to the QABot and SimpleBot classes, allowing for secure access to external services. This enhancement improves the security and flexibility of the bot's functionality.
- Update default language model environment variable (4bfd362) (Eric Ma): The default language model environment variable has been updated from
OPENAI_DEFAULT_MODEL
toDEFAULT_LANGUAGE_MODEL
to align with the changes in the codebase. - Update default language model to gpt-3.5-turbo-1106 (c8f0893) (Eric Ma): The default language model used by the commitbot has been updated to "gpt-3.5-turbo-1106" for improved performance and cost efficiency.
- Add logging for API key usage (3be39ad) (Eric Ma): Logging has been added to SimpleBot to log the usage of the API key for debugging and monitoring purposes.
- Add model_name parameter to SimpleBot instance (6a78332) (Eric Ma): A new parameter, model_name, has been added to the SimpleBot instance in the llamabot/cli/git.py file. The model_name is set to "mistral/mistral-medium". This change allows for more flexibility and customization when using the SimpleBot.
- Add new model name to ollama_model_names.txt (3110dc9) (Eric Ma): 'megadolphin' has been added to the list of model names in ollama_model_names.txt.
- Add new model name and refactor test_docstore (17352b8) (Eric Ma): 'llama-pro' has been added to ollama_model_names.txt and the test_docstore function has been refactored to remove unused imports and the make_fake_document function.
- Add Knowledge Graph bot (963cd63) (Eric Ma): A new feature has been added to the codebase, the Knowledge Graph bot (KGBot). The KGBot takes in a chunk of text and returns a JSON of triplets. It is tested with mistral-medium and uses the default language model. The bot is called with a query and returns a JSON of triplets.
- Add QABot class to llamabot (21197c1) (Eric Ma): A new class, DocQABot, has been added to the qabot.py file. This bot is designed to use pre-computed questions and answers to generate a response. It includes methods for adding documents for the bot to query and for calling the QABot. This enhancement will improve the bot's ability to generate responses based on the provided documents.
- Add DocumentStore class for LlamaBot (117baf7) (Eric Ma): A new feature has been added to the codebase, a DocumentStore class for LlamaBot. This class wraps around ChromaDB and provides methods to append and retrieve documents from the store. The DocumentStore class is defined in the newly created file llamabot/components/docstore.py.
- Add top-level API for llamabot's components (b2cf9f0) (Eric Ma): A new file, __init__.py, has been added which serves as the top-level API for llamabot's components.
Bug Fixes
- Fix logging of API key (932beec) (Eric Ma): The commit fixes the logging of the API key in the SimpleBot class to display the complete key instead of just the first 5 characters. This change improves the clarity and security of the logging information.
- Fix environment variable retrieval in write_release_notes function (c627b18) (Eric Ma): This commit fixes an issue where the environment variable was not being retrieved correctly in the write_release_notes function.
- Fix stream parameter not being passed to bot function (185f2bc) (Eric Ma): This commit fixes an issue where the stream parameter was not being passed to the bot function in the cli/git module.
Deprecations
- None in this release.
v0.0.89
Version 0.0.89
This version includes several refactoring changes, new features, and documentation updates. The main focus of this release was to improve the code organization and efficiency, and to update the usage of the OpenAI API.
New Features
- Added a new test for the ImageBot class in the llamabot library. The test checks the behavior of the call method when it is invoked outside of a Jupyter notebook and no save path is provided. (0e23857) (Eric Ma)
- Introduced a new Jupyter notebook under the docs/examples directory. The notebook demonstrates how to use the ImageBot API to generate images from text using the OpenAI API. (8779040) (Eric Ma)
- Added ImageBot class to bot module for generating images based on prompts. (7174058) (Eric Ma)
- Increased the default token budget from 2048 to 4096 and added token budget for the new "mistral" model. (7f13698) (Eric Ma)
Bug Fixes
- Fixed the cache-downloads-key in the pr-tests.yaml workflow file. The key now includes a hash of the 'environment.yml' file to ensure cache is updated when the environment changes. (1c12ff5) (Eric Ma)
Refactors
- Moved the initialization of the OpenAI client into the
default_model
function. (bd50b90) (Eric Ma) - Removed the direct access to the environment variable for the OpenAI API key in the client initialization. (7cb3d09) (Eric Ma)
- Changed the way model list attributes are accessed in the configure.py file of the llamabot CLI. (4deb93f) (Eric Ma)
- Extracted the filename generation logic, which was previously inside the ImageBot class, to a separate function named filename_bot. (aec4f3c) (Eric Ma)
- Removed direct assignment of OpenAI API key in init.py and replaced direct model list retrieval from OpenAI with client's model list method. (66fbcec) (Eric Ma)
Documentation
- Updated the docstring for the filename_bot function in the imagebot.py file. The updated docstring now includes parameter and return value descriptions. (c5dd51d) (Eric Ma)
Dependencies
- Updated the micromamba version from '1.4.5-0' to '1.5.1-2' in the pr-tests.yaml workflow. (6341f35) (Eric Ma)
- Updated dependencies versions including llama_index and langchain in environment.yml and pyproject.toml. (e9229cc) (Eric Ma)
Tests
v0.0.88
Version 0.0.88
This new version brings updates to the ollama model names and sorting method, updates to dependencies, and a temporary fix to the openai version. It also includes enhancements to the model name handling in llamabot.
New Features
- Updated ollama model names and implemented a new sorting method. The models are now sorted by newest. (a19004) (Eric Ma)
- Enhanced model name handling in llamabot. The model names in ollama_model_names.txt have been reordered for better organization, and additional code cells have been added to ollama.ipynb for testing and demonstrating the use of PromptRecorder and SimpleBot. (57389f) (Eric Ma)
Bug Fixes
- Temporarily limited the version of openai dependency to <=0.28.1 in pyproject.toml. This is due to an issue with OpenAI's update breaking a lot of LangChain. (1d881a) (Eric Ma)
Dependency Updates
- Updated langchain and llama_index dependencies in pyproject.toml. The langchain version has been set to 0.0.330 and llama_index version set to 0.8.62. This ensures three-way compatibility with openai, langchain, and llama-index until langchain is upgraded to work with the openai Python API without error. (e3cf0d) (Eric Ma)
v0.0.87
Version 0.0.87
This new version introduces several enhancements and features to improve the flexibility and maintainability of the code. The major highlight of this release is the dynamic scraping of Ollama model names, which allows the code to adapt to changes in the Ollama model library. Additionally, the codebase has been updated to Python 3.10, and new models have been added to the llama_model_keywords list.
New Features
- Dynamically scrape Ollama model names from the Ollama website. If the website cannot be reached, a static list of model names is used as a fallback. The function is cached using lru_cache to improve performance. (1f7e27) (Eric Ma)
- Added a function to automatically update the list of Ollama models. A new Python script has been added to the hooks in the pre-commit configuration file. This script scrapes the Ollama AI library webpage to get the latest model names and writes them to a text file. (f22007) (Eric Ma)
- Added the content.code.copy feature to the theme configuration in mkdocs.yaml. This feature allows users to easily copy code snippets from the documentation. (594d16) (Eric Ma)
- Added beautifulsoup4, lxml, and requests to the environment.yml file. These packages are necessary for the automatic scraping of ollama models. (2737a9) (Eric Ma)
Bug Fixes
- The method ollama_model_keywords() in model_dispatcher.py has been refactored. The dynamic scraping of model names from the Ollama website has been removed. Instead, the model names are now read from a static text file distributed with the package. This change simplifies the code and removes the dependency on the BeautifulSoup and requests libraries. (73d25) (Eric Ma)
Deprecations
- The 'Commit release notes' step has been separated from the 'Write release notes' step in the release-python-package workflow. The 'pre-commit' package installation has been moved to the 'Commit release notes' step. (4613a) (Eric Ma)
Other Changes
- The target Python version in the Black configuration has been updated from Python 3.9 to Python 3.10. (cfadb3) (Eric Ma)
- Some of the existing models have been reordered and new ones have been added to the llama_model_keywords list in the model_dispatcher module. (22ade) (Eric Ma)
- A newline has been added at the end of the v0.0.86 release notes file. This change is in line with the standard file formatting conventions. (c22810) (Eric Ma)
v0.0.86
Version 0.0.86
This version includes several enhancements and updates to the codebase, including the addition of new tutorials, refactoring of the code, and updates to the Python version used in the GitHub Actions workflow.
New Features
- Added a tutorial for building a QueryBot chat interface with file upload functionality. This tutorial guides users on how to build a chat interface using the QueryBot and Panel libraries. (4b5799a) (Eric Ma)
- Introduced a new tutorial in the documentation that guides users on how to create a simple chat interface using the
SimpleBot
class from thellamabot
library and thePanel
library. (efaef31) (Eric Ma) - Introduced a new Jupyter notebook 'panel-chat.ipynb' in the 'scratch_notebooks' directory. The notebook includes code for setting up a chat interface using the Panel library, and integrating it with a chatbot for interactive responses. (ba5d800) (Eric Ma)
- Introduced a new Jupyter notebook 'zotero-panel.ipynb' in the 'scratch_notebooks' directory. The notebook contains code for creating a Zotero panel with interactive widgets for configuring Zotero API key, library ID, and library type. (8f477ec) (Eric Ma)
- Introduced a new instance of SimpleBot named 'feynman' to the ollama notebook. The bot is tasked with explaining complex concepts, specifically in this case, the challenge of enzyme function annotation and the introduction of a machine learning algorithm named CLEAN. (7f844dc) (Eric Ma)
- Added ".html": "UnstructuredReader" to EXTENSION_LOADER_MAPPING in doc_processor.py to enable processing of .html files. (45d6485) (Eric Ma)
Bug Fixes
- Updated the python version used in the GitHub workflow for code style checks to 3.11. (d10e7e1) (Eric Ma)
Refactor
- Removed unused imports from
querybot.py
and updatedmake_or_load_vector_index
function to takeservice_context
as a parameter instead of creating it within the function. (935e3da) (Eric Ma) - Removed the unused @validate_call decorator from the call method in querybot.py. (3f7e8c0) (Eric Ma)
Documentation
- Added instructions to the documentation on how to use local Ollama models with LlamaBot. It includes a Python code snippet demonstrating how to specify the
model_name
keyword argument when creating aSimpleBot
instance. (57f1280) (Eric Ma) - Updated the documentation for LlamaBot. It introduces two options for getting access to language models: using local models with Ollama or using the OpenAI API. (fc42049) (Eric Ma)
Chore
- Updated the versions of pre-commit hooks for pre-commit-hooks, black, and ruff-pre-commit. It also replaces the darglint hook with pydoclint for better documentation linting. (9cc4902) (Eric Ma)