Skip to content

any best way to handle multi language response from tools with initialize_agent function? #8365

Answered by dosubot bot
tmin97 asked this question in Q&A
Discussion options

You must be logged in to vote

Answer generated by a 🤖

Answer

I found related issues that might be helpful. I did my best to summarize the solutions, but I recommend looking at the related issues yourself.

Open Issues

Any ideas on making input and output languages consistent?

The suggested solution is:

A user suggested a solution that involves tweaking the tool and agent prompt. Here is the code snippet they provided:

# For Tool have a pre-defined format
class KnowledgeTool(BaseTool):
    request_format = '{{"USER": "<input_question>"}}'
    name = 'Knowledge Tool'
    description = f"""
    Tool to answer something knowledgeable. Input should be JSON in the following format: {request_format}
        """
    return_direct

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by tmin97
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant