-
Notifications
You must be signed in to change notification settings - Fork 15.4k
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
Harrison/multi tool #6518
Harrison/multi tool #6518
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎ 1 Ignored Deployment
|
"type": "object", | ||
"properties": { | ||
"tool_name": { | ||
"title": "Tool Name", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
not sure if relevant but i think having descriptions can help with correct usage. but i noticed that its based on enum of tool name rather than the tools properties.
|
||
for intermediate_step in intermediate_steps: | ||
agent_action, observation = intermediate_step | ||
messages.extend(_convert_agent_action_to_messages(agent_action, observation)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
messages.extend(_convert_agent_action_to_messages(agent_action, observation)) | |
return [ | |
_convert_agent_action_to_messages(agent_action, observation) | |
for (agent_action, observation) in intermediate_steps | |
] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should add it to docs/modules/agents/agent_types (could just add as a notebook)
"""An Agent driven by OpenAIs function powered API. | ||
|
||
Args: | ||
llm: This should be an instance of ChatOpenAI, specifically a model |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lets type it as such then
return messages | ||
|
||
|
||
def _parse_ai_message(message: BaseMessage) -> Union[List[AgentAction], AgentFinish]: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OutputParser?
@classmethod | ||
def create_prompt( | ||
cls, | ||
system_message: Optional[SystemMessage] = SystemMessage( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
are messages mutable? default None instead?
**kwargs: Any, | ||
) -> BaseMultiActionAgent: | ||
"""Construct an agent from an LLM and tools.""" | ||
if not isinstance(llm, ChatOpenAI): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
checked by validator already
cls, | ||
llm: BaseLanguageModel, | ||
tools: Sequence[BaseTool], | ||
callback_manager: Optional[BaseCallbackManager] = None, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why do we need callback_manager explicitly listed? also isn't that deprecated
@property | ||
def functions(self) -> List[dict]: | ||
enum_vals = [t.name for t in self.tools] | ||
tool_selection = { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
could we make this more easily customizable? like if someone wanted to test out different descriptions or names they'd have to subclass and overwrite this property (or rewrite from scratch). could make functions a init param that has a default
* master: (28 commits) [Feature][VectorStore] Support StarRocks as vector db (langchain-ai#6119) Relax string input mapper check (langchain-ai#6544) bump to ver 208 (langchain-ai#6540) Harrison/multi tool (langchain-ai#6518) Infino integration for simplified logs, metrics & search across LLM data & token usage (langchain-ai#6218) Update model token mappings/cost to include 0613 models (langchain-ai#6122) Fix issue with non-list `To` header in GmailSendMessage Tool (langchain-ai#6242) Integrate Rockset as Vectorstore (langchain-ai#6216) Feat: Add a prompt template parameter to qa with structure chains (langchain-ai#6495) Add async support for HuggingFaceTextGenInference (langchain-ai#6507) Be able to use Codey models on Vertex AI (langchain-ai#6354) Add KuzuQAChain (langchain-ai#6454) Update index.mdx (langchain-ai#6326) Export trajectory eval fn (langchain-ai#6509) typo(llamacpp.ipynb): 'condiser' -> 'consider' (langchain-ai#6474) Fix typo in docstring of format_tool_to_openai_function (langchain-ai#6479) Make streamlit import optional (langchain-ai#6510) Fixed: 'readible' -> readable (langchain-ai#6492) Documentation Fix: Correct the example code output in the prompt templates doc (langchain-ai#6496) Fix link (langchain-ai#6501) ...
No description provided.