Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

KeyError: 'fuction_call'错误 #99

Open
HuntZhaozq opened this issue Sep 27, 2023 · 9 comments
Open

KeyError: 'fuction_call'错误 #99

HuntZhaozq opened this issue Sep 27, 2023 · 9 comments

Comments

@HuntZhaozq
Copy link

您好,在运行单agent的shopping agent,使用local model的时候,出现了错误
src/agents/Component/ExtraComponent.py, Line77, in func response_message = json.loads(response["function_call"]["arguments"])
KeyError: 'function_call'
请问如何解决呀?

@HuntZhaozq
Copy link
Author

将上面的response打印出来是 {”role“: "assitant", "content": "hello mike, I am glad to help you........."},不知道是不是没有fuction_call的key,这是local model输出有问题还是要怎么设置?

@jianghuyihei
Copy link
Collaborator

local model是否具有function call的操作?我们这里调用了openai的function call

@HuntZhaozq
Copy link
Author

local model是复用openai的格式,请问怎么看local model是否具有agents所需要的所有操作呀?

@HuntZhaozq
Copy link
Author

在运行chatbot的时候也出现了response.choices的 KeyError: 'choices'错误

@jianghuyihei
Copy link
Collaborator

在运行chatbot的时候也出现了response.choices的 KeyError: 'choices'错误

你直接修改src/agents/LLM/base_llm里的函数就行,你是怎么部署本地model的?

@HuntZhaozq
Copy link
Author

用的fastchat部署的,只修改了src/agents/LLM/base_llm里的函数,但是运行shopping_assistant的时候的response就是有choices的key,chatbot的response打印出来是generator object engineAPIResource.create.. at 0x0000019374BB0270,没有choices的key

@jianghuyihei
Copy link
Collaborator

用的fastchat部署的,只修改了src/agents/LLM/base_llm里的函数,但是运行shopping_assistant的时候的response就是有choices的key,chatbot的response打印出来是generator object engineAPIResource.create.. at 0x0000019374BB0270,没有choices的key

除了shopping assistant,别的可以运行吗

@HuntZhaozq
Copy link
Author

运行novel也会出现KeyError: 'choices'

@HuntZhaozq
Copy link
Author

HuntZhaozq commented Oct 7, 2023

KeyError: 'choices'出错时,打印LLM的response是这样的

generator object EngineAPIResource.create.<'locals'>.<'genexpr'> at 0x7f9cc2338890

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants