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

如何结合swarm。 利用qianfan openai 总是报错。 #876

Open
NaiveteYaYa opened this issue Nov 27, 2024 · 2 comments
Open

如何结合swarm。 利用qianfan openai 总是报错。 #876

NaiveteYaYa opened this issue Nov 27, 2024 · 2 comments

Comments

@NaiveteYaYa
Copy link

Issue you'd like to raise.

No response

Suggestion:

No response

@NaiveteYaYa NaiveteYaYa changed the title Issue: <Title for brief intro about this issue. 'Issue: ' prefix> 如何结合swarm。 利用qianfan openai 总是报错。 如何结合swarm。 利用qianfan openai 总是报错。 Nov 27, 2024
@NaiveteYaYa
Copy link
Author

File "/xxx/lib/python3.11/site-packages/qianfan/extensions/openai/adapter.py", line 168, in openai_base_request_to_qianfan
for tool in tools:
TypeError: 'NoneType' object is not iterable

这个问题是 extentions/openai/adapter.py

if "tools" in openai_request: qianfan_request["functions"] = [] tools = openai_request["tools"] for tool in tools: if tool["type"] == "function": qianfan_request["functions"].append(tool["function"])

没有判断 tools 是否为None 造成的

@Dobiichi-Origami
Copy link
Collaborator

感谢您的反馈,我们会对这个问题进行分析

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