Replies: 4 comments 1 reply
-
🤖 Hello @safa1018! Good to see you again here. Hope you're having a great coding day! In the context of the LangChain framework, def format_agent_scratchpad(intermediate_steps):
thoughts = ""
for action, observation in intermediate_steps:
thoughts += action.log
thoughts += "</search_query>" + _format_docs(observation)
return thoughts You can find this in the agent_scratchpad.py file. The
Here is the supporting code: def _format_docs(docs):
result = "\n".join(
[
f'<item index="{i+1}">\n<page_content>\n{r}\n</page_content>\n</item>'
for i, r in enumerate(docs)
]
)
return result
def format_agent_scratchpad(intermediate_steps):
thoughts = ""
for action, observation in intermediate_steps:
thoughts += action.log
thoughts += "</search_query>" + _format_docs(observation)
return thoughts You can also find this in the agent_scratchpad.py file. The The observation is formatted using the I hope this helps! If you have any other questions, feel free to ask. Best, SourcesThis response is meant to be useful and save you time. It is not meant to be a precise solution, but rather a starting point for your own research. Help me be more useful! Please leave a 👍 if this is helpful and 👎 if it is irrelevant. If you want to continue the conversation, start your reply with @dosu-bot. |
Beta Was this translation helpful? Give feedback.
-
Give some real usecases bot. |
Beta Was this translation helpful? Give feedback.
-
@dosu-bot, give some real usecases. |
Beta Was this translation helpful? Give feedback.
-
Besides the fact it's a bot we should stay polite, and add secret "please" word. Then bot will answer and give use cases ;) |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
i can't get enough information about it
Beta Was this translation helpful? Give feedback.
All reactions