We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
自己定义了Grok-2-1212的配置信息和部分文件修改,但是还是无法正常使用图片创作,在bot对话中encoding的编码一直不正常导致一直在报警告,但是不影响使用
[WARNING][2024-12-18 09:11:43][session_manager.py:72] - Exception when counting tokens precisely for prompt: Unknown encoding grok-2-1212
[INFO][2024-12-18 09:08:49][bridge.py:68] - create bot openAI for chat [INFO][2024-12-18 09:08:49][open_ai_image.py:22] - [OPEN_AI] image_query=一只小鸟带着圣诞帽子在天上翱翔 [ERROR][2024-12-18 09:08:49][open_ai_image.py:43] - 'str' object has no attribute 'get' Traceback (most recent call last): File "/opt/chatgpt-on-wechat/bot/openai/open_ai_image.py", line 23, in create_img response = openai.Image.create( File "/usr/local/lib/python3.10/dist-packages/openai/api_resources/image.py", line 39, in create response, _, api_key = requestor.request( File "/usr/local/lib/python3.10/dist-packages/openai/api_requestor.py", line 298, in request resp, got_stream = self._interpret_response(result, stream) File "/usr/local/lib/python3.10/dist-packages/openai/api_requestor.py", line 700, in _interpret_response self._interpret_response_line( File "/usr/local/lib/python3.10/dist-packages/openai/api_requestor.py", line 763, in _interpret_response_line raise self.handle_error_response( File "/usr/local/lib/python3.10/dist-packages/openai/api_requestor.py", line 418, in handle_error_response error_code=error_data.get("code"), AttributeError: 'str' object has no attribute 'get'
config.json "open_ai_api_base": "https://api.x.ai/v1", "model": "grok-2-1212", "bot_type": "openAI" "conversation_max_tokens": 131000,
Grok-2-1212的模型是业界内比较靠前的,对中文的支持也不错。 x.ai提供的模型画图也不错,最大tokey支持131072,而且费用也不高
The text was updated successfully, but these errors were encountered:
"bot_type": "chatGPT" 改一下试试
"bot_type": "chatGPT"
Sorry, something went wrong.
No branches or pull requests
总结
自己定义了Grok-2-1212的配置信息和部分文件修改,但是还是无法正常使用图片创作,在bot对话中encoding的编码一直不正常导致一直在报警告,但是不影响使用
举例
[WARNING][2024-12-18 09:11:43][session_manager.py:72] - Exception when counting tokens precisely for prompt: Unknown encoding grok-2-1212
[INFO][2024-12-18 09:08:49][bridge.py:68] - create bot openAI for chat
[INFO][2024-12-18 09:08:49][open_ai_image.py:22] - [OPEN_AI] image_query=一只小鸟带着圣诞帽子在天上翱翔
[ERROR][2024-12-18 09:08:49][open_ai_image.py:43] - 'str' object has no attribute 'get'
Traceback (most recent call last):
File "/opt/chatgpt-on-wechat/bot/openai/open_ai_image.py", line 23, in create_img
response = openai.Image.create(
File "/usr/local/lib/python3.10/dist-packages/openai/api_resources/image.py", line 39, in create
response, _, api_key = requestor.request(
File "/usr/local/lib/python3.10/dist-packages/openai/api_requestor.py", line 298, in request
resp, got_stream = self._interpret_response(result, stream)
File "/usr/local/lib/python3.10/dist-packages/openai/api_requestor.py", line 700, in _interpret_response
self._interpret_response_line(
File "/usr/local/lib/python3.10/dist-packages/openai/api_requestor.py", line 763, in _interpret_response_line
raise self.handle_error_response(
File "/usr/local/lib/python3.10/dist-packages/openai/api_requestor.py", line 418, in handle_error_response
error_code=error_data.get("code"),
AttributeError: 'str' object has no attribute 'get'
config.json
"open_ai_api_base": "https://api.x.ai/v1",
"model": "grok-2-1212",
"bot_type": "openAI"
"conversation_max_tokens": 131000,
动机
Grok-2-1212的模型是业界内比较靠前的,对中文的支持也不错。
x.ai提供的模型画图也不错,最大tokey支持131072,而且费用也不高
The text was updated successfully, but these errors were encountered: