Skip to content

Commit

Permalink
Make it more reliable for StructuredAgent (langchain-ai#1453)
Browse files Browse the repository at this point in the history
StructuredAgent needs to format this to {action, action_input} format
where `action_input: string`. However, gpt-3.5-turbo very frequently fails to do so.
Instead it generates formats like this: `{action, action_input: {url}}`.

This tiny prompt change makes it more reliable.
  • Loading branch information
emilsedgh authored May 30, 2023
1 parent 435b9c7 commit cd69ebf
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion langchain/src/tools/requests.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ export class RequestsGetTool extends Tool implements RequestTool {
}

description = `A portal to the internet. Use this when you need to get specific content from a website.
Input should be a url (i.e. https://www.google.com). The output will be the text response of the GET request.`;
Input should be a url string (i.e. "https://www.google.com"). The output will be the text response of the GET request.`;
}

export class RequestsPostTool extends Tool implements RequestTool {
Expand Down

0 comments on commit cd69ebf

Please sign in to comment.