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
采用最新版本的metagpt运行实例demo异常,异常信息为openai.types.completion_usage.CompletionUsage() argument after ** must be a mapping, not NoneType #1252
Comments
目前分析是在 |
i have a some problem |
yes, I have the same problem with metagpt version=0.8.1, also happend again after i use pip install metagpt==0.7.1 |
me too. bug report #1250 |
yeah, I have the same problem C:\Users\NEZ1SGH\AppData\Local\anaconda3\envs\myenv\python.exe C:\Users\NEZ1SGH\metagpt\MetaGPT\examples\hello_world.py |
Add a None filter at this line can avoid this exception. if hasattr(chunk, "usage") and chunk.usage is not None: MetaGPT/metagpt/provider/openai_api.py Line 103 in f201b2f
|
我的临时解决办法:
注意,如果很依赖usage的计算,慎重采用本方法。 |
One of my friend use this methods and it worked but not for me. |
This works for me, I use the api of DeepSeek, a way similar to the api of openai
|
Hey guys, thanks for reporting the issue. For the latest main branch, it should be fixed in #1253 . For pypi package metagpt==0.8.1, try using openai==1.6.1 as indicated in the requirement.txt, the issue is probably due to the openai package upgrade. Please check if this resolves the issue. |
C:\Users\glh19\MetaGPT\MetaGPT\Scripts\python.exe E:\code\python\MetaGPT\examples\di\custom_tool.py
2024-05-08 16:55:41.973 | INFO | metagpt.const:get_metagpt_package_root:29 - Package root set to E:\code\python\MetaGPT
The text was updated successfully, but these errors were encountered: