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

[Bug]: Potential bug in bot init #119

Open
1 task done
Niomax32 opened this issue Feb 22, 2024 · 0 comments
Open
1 task done

[Bug]: Potential bug in bot init #119

Niomax32 opened this issue Feb 22, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@Niomax32
Copy link

Search for answers in existing issues

  • I have searched issues, there is no issue related to the problem I encountered

Python version

python 3.10

Issue description

I am not sure if it's a bug or intended change, but this line doesn't look right: https://github.com/iuiaoin/wechat-gptbot/blob/main/bot/bot.py#L18

A ChatGPTBot() would be created for the models in the litellm support list, while in the following else block a LiteLLMChatGPTBot() is going to be created for model that's not in its support list.

Actually it causes problem when the model is not supported in the given version of litellm. For instance, If you set model to gpt-4-turbo-preview in config and it's going to completely break the bot, since it's going to create a LiteLLMChatGPTBot() which doesn't support that model.

It probably makes sense to change the line to elif model not in litellm.open_ai_chat_completion_models

BTW, the current litellm dep is really out of date and might need either upgrade or deprecation

Repro steps

  1. Set config model to gpt-4-turbo-preview which should be supported by ChatGPTBot
  2. Start the bot and see it breaks from LiteLLMChatGPTBot

Relevant log output

No response

@Niomax32 Niomax32 added the bug Something isn't working label Feb 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant