lobehub / lobe-chat

🤯 Lobe Chat - an open-source, modern-design AI chat framework. Supports Multi AI Providers( OpenAI / Claude 3 / Gemini / Ollama / Azure / DeepSeek), Knowledge Base (file upload / knowledge management / RAG ), Multi-Modals (Vision/TTS) and plugin system. One-click FREE deployment of your private ChatGPT/ Claude application.
https://chat-preview.lobehub.com
Other
44.52k stars 9.98k forks source link

[Bug] GOOGLE_MODEL_LIST似乎有点问题 #4485

Closed SpeedupMaster closed 2 weeks ago

SpeedupMaster commented 2 weeks ago

📦 部署环境

Docker

📌 软件版本

v1.24.0

💻 系统环境

Windows

🌐 浏览器

Firefox

🐛 问题描述

GOOGLE_MODEL_LIST=-all,+gemini-1.5-pro-latest,+gemini-1.5-flash-latest,+gemini-1.5-flash-8b=Gemini 1.5 Flash 8B<1008192:vision:fc> env中设置了GOOGLE_MODEL_LIST,但是新增加的gemini-1.5-flash-8b这个模型没有出现,而且所有其他模型仍然在模型列表中。-all似乎没有生效 图片

📷 复现步骤

No response

🚦 期望结果

图片 删除模型列表中的其他模型,只显示MODEL_LIST中设置的模型

📝 补充信息

No response

lobehubbot commented 2 weeks ago

👀 @SpeedupMaster

Thank you for raising an issue. We will investigate into the matter and get back to you as soon as possible. Please make sure you have given us as much context as possible.\ 非常感谢您提交 issue。我们会尽快调查此事,并尽快回复您。 请确保您已经提供了尽可能多的背景信息。

dosubot[bot] commented 2 weeks ago

I found a similar discussion that might be relevant to your issue. In a previous discussion, it was noted that the CUSTOM_MODELS environment variable is specifically for the OpenAI provider, and if you have also set Google environment variables, it might lead to unexpected behavior [1].

Regarding your specific issue with the GOOGLE_MODEL_LIST, there are a few potential reasons why the filtering might not work as expected:

  1. Incorrect Parsing of Model String: Ensure that the model string is correctly formatted. The string should be properly formatted with commas separating model entries and using + or - to indicate addition or removal.

  2. Handling of 'all' Keyword: If the model string includes -all, it sets removeAll to true, which will remove all models. This might not be the intended behavior if you expect only specific models to be removed.

  3. Unknown Capabilities: If the model string includes unknown capabilities, they are ignored with a warning. This might lead to unexpected behavior if the filtering logic relies on specific capabilities [2].

Make sure that the GOOGLE_MODEL_LIST is correctly formatted and that the models you want to add are specified correctly. If the issue persists, you might want to check the logs for any warnings or errors related to the model parsing.

To continue talking to Dosu, mention @dosu.

SpeedupMaster commented 2 weeks ago

图片 ANTHROPIC_MODEL_LIST也有同样的问题

lobehubbot commented 2 weeks ago

Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑‍🤝‍🧑👫🧑🏿‍🤝‍🧑🏻👩🏾‍🤝‍👨🏿👬🏿


Picture ANTHROPIC_MODEL_LIST also has the same problem

hezhijie0327 commented 2 weeks ago

-all 不会移除列表只会禁用模型 image

GOOGLE_MODEL_LIST='-all,+gemini-1.5-pro-latest,+gemini-1.5-flash-latest,+gemini-1.5-flash-8b=Gemini 1.5 Flash 8B<1008192:vision:fc>'

image


但是确实模型选择有问题 HUGGINGFACE_MODEL_LIST='-all,+gemini-1.5-flash-latest,+gemini-1.5-pro-latest' 没配置具体信息,也会从其他地方做模型信息匹配 image

过会儿回退几个版本测试看看

SpeedupMaster commented 2 weeks ago

-all 不会移除列表只会禁用模型 image

GOOGLE_MODEL_LIST='-all,+gemini-1.5-pro-latest,+gemini-1.5-flash-latest,+gemini-1.5-flash-8b=Gemini 1.5 Flash 8B<1008192:vision:fc>'

image

但是确实模型选择有问题 HUGGINGFACE_MODEL_LIST='-all,+gemini-1.5-flash-latest,+gemini-1.5-pro-latest' 没配置具体信息,也会从其他地方做模型信息匹配 image

过会儿回退几个版本测试看看

好的,谢谢 image openai和openrouter这两个可以用MODEL_LIST='-all,+gemini-1.5-flash-latest,+gemini-1.5-pro-latest'来实现模型列表里只显示MODEL_LIST中设置的模型

arvinxx commented 2 weeks ago

@hezhijie0327 想起来有个另外的地方要加才能实现-all 的效果 , https://github.com/lobehub/lobe-chat/blob/main/src/store/user/slices/modelList/action.ts#L91-L#109

lobehubbot commented 2 weeks ago

Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑‍🤝‍🧑👫🧑🏿‍🤝‍🧑🏻👩🏾‍🤝‍👨🏿👬🏿


@hezhijie0327 I remembered that there is another place that needs to be added to achieve the effect of -all

hezhijie0327 commented 2 weeks ago

过会儿我补一个 PR

lobehubbot commented 2 weeks ago

Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑‍🤝‍🧑👫🧑🏿‍🤝‍🧑🏻👩🏾‍🤝‍👨🏿👬🏿


I will add a PR later

LovelyGuYiMeng commented 2 weeks ago

过会儿我补一个 PR

顺带把google的flash 8b改一下,日期去掉

另外googleprovider设置不管开没开LLM_VISION_IMAGE_USE_BASE64都会强制转base64 那么同理商汤的识图可不可以设置强制链接模式?

lobehubbot commented 2 weeks ago

Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑‍🤝‍🧑👫🧑🏿‍🤝‍🧑🏻👩🏾‍🤝‍👨🏿👬🏿


I will add a PR later

By the way, change Google’s flash 8b and remove the date.

In addition, googleprovider settings will force conversion to base64 regardless of whether LLM_VISION_IMAGE_USE_BASE64 is turned on or not. So in the same way, can SenseTime's image recognition set the forced link mode?

lobehubbot commented 2 weeks ago

✅ @SpeedupMaster

This issue is closed, If you have any questions, you can comment and reply.\ 此问题已经关闭。如果您有任何问题,可以留言并回复。

lobehubbot commented 2 weeks ago

:tada: This issue has been resolved in version 1.25.1 :tada:

The release is available on:

Your semantic-release bot :package::rocket: