题意:使用 Langchain 和 OpenAI 创建聊天代理时遇到没有属性错误。
问题背景:
I'm trying to test a chat agent using the python code below. I'm using langchain agent and tool from langchain. I'm defining a couple of simple functions for the LLM to use as tools when a prompt mentions something relevant to the tool. I'm using the openai gpt-3.5-turbo model for the LLM. I'm getting the error message below when trying to run conversational_agent with a simple prompt to return a random number. The function defined for the tool should do this easily. I'm getting the error message below mentioning that openai doesn't have the attribute. Does anyone see what the issue might be and can you suggest how to fix it?
我正在尝试使用以下 Py
标签:creating,getting,attribute,tool,langchain,openai,agent,using From: https://blog.csdn.net/suiusoar/article/details/144464319