You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm working on creating tools at runtime for my application. For that, I'm using a wrapper function inside which I need to be able to route to the relevant function/API call based on the "action_name"/"tool_name"
def runt_tool(json_request: str):
#route based on action name
for toolConfig in toolConfigs:
tool = Tool(name=toolConfig["tool_name"], description=toolConfig["tool_description"], func=runt_tool)
tools.append(tool)
So far, this is what I've tried. I'm using the ConversationalChatModel and have added a prompt in every tool's description to include the tool_name/action_name and other parameters.
Example: Action Input MUST be JSON string with the following schema: {{"tool_name": "<tool_name>", "location": "<location>"}}
This doesn't seem to be working very consistently. Is there a better way to do this?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
I'm working on creating tools at runtime for my application. For that, I'm using a wrapper function inside which I need to be able to route to the relevant function/API call based on the "action_name"/"tool_name"
So far, this is what I've tried. I'm using the ConversationalChatModel and have added a prompt in every tool's description to include the tool_name/action_name and other parameters.
Example: Action Input MUST be JSON string with the following schema:
{{"tool_name": "<tool_name>", "location": "<location>"}}
This doesn't seem to be working very consistently. Is there a better way to do this?
Beta Was this translation helpful? Give feedback.
All reactions