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
39.94k stars 9.09k forks source link

[Question] 能通过环境变量指定默认助手的模型吗? #782

Closed crabkun closed 6 months ago

crabkun commented 8 months ago

🧐 问题描述 | Proposed Solution

你好,请问能通过环境变量指定默认助手的模型吗? 目前默认是gpt-3.5-turbo,即使通过CUSTOM_MODELS环境变量从模型列表中删掉gpt-3.5-turbo,默认助手还是gpt-3.5-turbo模型。 能否新增环境变量指定默认模型,或者直接读取模型列表中的第一个模型呢? 主要是想分享给朋友,他打开就能直接使用gpt-4-1106-preview,不用去指导他如何切换模型以及介绍每个模型的区别。

非常感谢!!

📝 补充信息 | Additional Information

No response

lobehubbot commented 8 months ago

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


🧐 Problem Description | Proposed Solution

Hello, can I specify the default assistant model through environment variables? The current default is gpt-3.5-turbo. Even if gpt-3.5-turbo is deleted from the model list through the CUSTOM_MODELS environment variable, the default assistant is still the gpt-3.5-turbo model. Can I add an environment variable to specify the default model, or directly read the first model in the model list? Mainly I want to share it with my friends so that they can use gpt-4-1106-preview directly after opening it without having to instruct them how to switch models or introduce the differences between each model.

Thank you so much! !

📝 Additional Information |

No response

lobehubbot commented 8 months ago

👀 @crabkun

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。我们会尽快调查此事,并尽快回复您。 请确保您已经提供了尽可能多的背景信息。

zhuozhiyongde commented 8 months ago

@arvinxx 我尝试了一下,似乎不是仅仅 gpt-3.5-turbo 模型有此问题,而是整个 CUSTOM_MODELS 对于移除模型(-)的解析是错的:

命令已经设置移除 gpt-4 模型:

Cleanshot-2023-12-24-at-10 39 54@2x

但是还是会显示(且能使用):

Cleanshot-2023-12-24-at-10 40 49@2x

不过,模型重命名是对的。

我更换了几个其他的模型名,均可复现。

arvinxx commented 8 months ago

@zhuozhiyongde 这个需求和默认助手模型没关系哈。看了下是 - 指令的删除逻辑有点问题 cc @mushan0x0 。

lobehubbot commented 8 months ago

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


@zhuozhiyongde This requirement has nothing to do with the default assistant model. After looking at it, there is something wrong with the deletion logic of the - command cc @mushan0x0 .

mushan0x0 commented 8 months ago

@zhuozhiyongde 这个需求和默认助手模型没关系哈。看了下是 - 指令的删除逻辑有点问题 cc @mushan0x0 。

好的,我空了看看,最近在旅游

zhuozhiyongde commented 8 months ago

@zhuozhiyongde 这个需求和默认助手模型没关系哈。看了下是 - 指令的删除逻辑有点问题 cc @mushan0x0 。

hhh 猜到了,大佬们辛苦啦!

lobehubbot commented 8 months ago

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


@zhuozhiyongde This requirement has nothing to do with the default assistant model. After looking at it, there is something wrong with the deletion logic of the - command cc @mushan0x0 .

Okay, I'll take a look. I'm traveling recently.

lobehubbot commented 8 months ago

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


@zhuozhiyongde This requirement has nothing to do with the default assistant model. After looking at it, there is something wrong with the deletion logic of the - command cc @mushan0x0 .

hhh I guessed it, thank you guys for your hard work!

arvinxx commented 8 months ago

@zhuozhiyongde 这个需求和默认助手模型没关系哈。看了下是 - 指令的删除逻辑有点问题 cc @mushan0x0 。

好的,我空了看看,最近在旅游

我顺手修了

lobehubbot commented 8 months ago

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


@zhuozhiyongde This requirement has nothing to do with the default assistant model. After looking at it, there is something wrong with the deletion logic of the - command cc @mushan0x0 .

Okay, I’ll take a look when I’m free. I’m traveling recently.

I fixed it easily

arvinxx commented 8 months ago

@crabkun 研究了下修改默认助手的配置可能还不一定好改。我要回头想想怎么做才好做…

lobehubbot commented 8 months ago

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


@crabkun After researching, changing the configuration of the default assistant may not necessarily be easy. I have to look back and think about how to do it better...

arvinxx commented 8 months ago

https://github.com/lobehub/lobe-chat/discussions/913 跟进

lobehubbot commented 6 months ago

✅ @crabkun

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

lobehubbot commented 6 months ago

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

The release is available on:

Your semantic-release bot :package::rocket: