-
Notifications
You must be signed in to change notification settings - Fork 104
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
Feature/question answer with options #79
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This commit introduces an Optional ChainCallOptions parameter to the load_stuff_qa function in both src/chain/question_answering.rs and src/chain/stuff_documents/chain.rs files to allow setting options while loading question and answering. A new load_stuff_qa_with_options function was also added to the StuffDocument struct to handle the new option.
Removed the unnecessary mutable declaration on and consolidated the assignment and building steps into one. All changes made in .
Abraxas-365
added a commit
that referenced
this pull request
Mar 21, 2024
* refactor: Update OpenAI module with new functionality and structure improvements * feat: adding from Tool trait to open ai fucntions * feat(chain): add ChainCallOptions to load_stuff_qa functions This commit introduces an Optional ChainCallOptions parameter to the load_stuff_qa function in both src/chain/question_answering.rs and src/chain/stuff_documents/chain.rs files to allow setting options while loading question and answering. A new load_stuff_qa_with_options function was also added to the StuffDocument struct to handle the new option. * feat: streamline LLMChainBuilder in question_answering.rs Removed the unnecessary mutable declaration on and consolidated the assignment and building steps into one. All changes made in .
Abraxas-365
added a commit
that referenced
this pull request
Mar 21, 2024
* refactor: Update OpenAI module with new functionality and structure improvements * feat: adding from Tool trait to open ai fucntions * feat(chain): add ChainCallOptions to load_stuff_qa functions This commit introduces an Optional ChainCallOptions parameter to the load_stuff_qa function in both src/chain/question_answering.rs and src/chain/stuff_documents/chain.rs files to allow setting options while loading question and answering. A new load_stuff_qa_with_options function was also added to the StuffDocument struct to handle the new option. * feat: streamline LLMChainBuilder in question_answering.rs Removed the unnecessary mutable declaration on and consolidated the assignment and building steps into one. All changes made in .
Abraxas-365
added a commit
that referenced
this pull request
Mar 22, 2024
#76) * refactor: Update OpenAI module with new functionality and structure improvements * refactor(llm): changing with_option of llm trait to add_options (#78) changing with_option of llm trait to add_options for redability * Feature/question answer with options (#79) * refactor: Update OpenAI module with new functionality and structure improvements * feat: adding from Tool trait to open ai fucntions * feat(chain): add ChainCallOptions to load_stuff_qa functions This commit introduces an Optional ChainCallOptions parameter to the load_stuff_qa function in both src/chain/question_answering.rs and src/chain/stuff_documents/chain.rs files to allow setting options while loading question and answering. A new load_stuff_qa_with_options function was also added to the StuffDocument struct to handle the new option. * feat: streamline LLMChainBuilder in question_answering.rs Removed the unnecessary mutable declaration on and consolidated the assignment and building steps into one. All changes made in . * refactor: change order for redability * feat: add OpenAiToolAgent and related changes Implemented OpenAiToolAgent functionality allowing a tool to function as an AI agent, using a new OpenAiToolAgentBuilder. This involved various file changes and additions across several modules. A new function was added to the CallOptions struct, merge_options, to help manage setting options between the default set and those incoming from user configurations. The AgentAction struct now includes a "log" field, and a new struct, LogTools, was introduced. Modified several tool-related files (WebScrapper, SerpApi, Wolfram) to utilize the new interface and updated traits provided by the OpenAiToolAgent. This included changing the function signature for the function to and additionally revising the input type from string to serde_json::Value. In the messages module, added a new MessageType variant for ToolMessage and included a new function to create new Tool messages. Further, "tool_calls" was added as an optional field to the Message struct. New schemas, FunctionCallBehavior and FunctionDefinition, were added to replace those removed from the language_models options module. A corresponding tools_openai_like module was added under schemas to house these additions. * Feature/question answer with options (#79) * refactor: Update OpenAI module with new functionality and structure improvements * feat: adding from Tool trait to open ai fucntions * feat(chain): add ChainCallOptions to load_stuff_qa functions This commit introduces an Optional ChainCallOptions parameter to the load_stuff_qa function in both src/chain/question_answering.rs and src/chain/stuff_documents/chain.rs files to allow setting options while loading question and answering. A new load_stuff_qa_with_options function was also added to the StuffDocument struct to handle the new option. * feat: streamline LLMChainBuilder in question_answering.rs Removed the unnecessary mutable declaration on and consolidated the assignment and building steps into one. All changes made in . * refactor: delete println * refactor: delete println * feat: Refactor agent creation and add OpenAiToolAgent example This update changes the chain of responsibility in the agent creation process. Removed the OpenAiToolAgent from examples/agent.rs and created a separate OpenAiToolAgent in examples/open_ai_tools_agent.rs. It also adjusts the ability to add tools to an agent in src/agent/chat/builder.rs, changes the method to accept a slice instead of a vector. Tests were adjusted as well to match this new method signature in src/agent/chat/chat_agent.rs. * refactor: delete unused imports * chore: Update tool.rs with additional documentation and method implementations - Added a method to provide a description of the tool - Updated formatting and comments for better readability - Implemented methods for parsing input, running the tool, and calling the tool asynchronously This commit improves the documentation and functionality of the tool.rs file. * chore: Update code with additional documentation * fix: make open ai work if agent return multiple tools * chore: trim and replace whitespace with underscores in tool names * chore: adding open ai tool agent example with multiples tools * chore:fixing examples
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
No description provided.