devcxl / WeChatBot

WeChatBot 基于ItChat-UOS的 个人微信号OpenAI机器人
MIT License
49 stars 9 forks source link

bug: 使用某些模型不支持FunctionCall时会报错 #17

Closed devcxl closed 7 months ago

devcxl commented 7 months ago

某些模型调用FunctionCall返回的方法不为实际方法名而是以下格式的文本

```python \n get_current_weather('上海','摄氏')\n```

会导致如下错误

2024-03-29 10:23:35,914 - itchat [WARNING] Traceback (most recent call last):
  File "itchat/components/register.py", line 78, in configured_reply
  File "main.py", line 81, in friend
  File "handler/text.py", line 34, in handler_text
KeyError: 'python'