community[patch][: improved the suffix prompt to avoid loop (#17791)

Small improvement to the openapi prompt.
The agent was not finding the server base URL (looping through all
nodes). This small change narrows the search and enables finding the url
faster.

No dependency 

Twitter : @al1pra
This commit is contained in:
al1p 2024-03-09 02:53:09 +02:00 committed by GitHub
parent f5117e907d
commit 46f0cea2b9
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -19,7 +19,7 @@ If you get a not found error, ensure that you are using a path that actually exi
OPENAPI_SUFFIX = """Begin! OPENAPI_SUFFIX = """Begin!
Question: {input} Question: {input}
Thought: I should explore the spec to find the base url for the API. Thought: I should explore the spec to find the base server url for the API in the servers node.
{agent_scratchpad}""" {agent_scratchpad}"""
DESCRIPTION = """Can be used to answer questions about the openapi spec for the API. Always use this tool before trying to make a request. DESCRIPTION = """Can be used to answer questions about the openapi spec for the API. Always use this tool before trying to make a request.