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

Brand new AI provider Feedback | 全新 AI Provider 管理模块反馈 #5327

Open
4 tasks done
arvinxx opened this issue Jan 7, 2025 · 129 comments
Open
4 tasks done

Brand new AI provider Feedback | 全新 AI Provider 管理模块反馈 #5327

arvinxx opened this issue Jan 7, 2025 · 129 comments
Labels
Model Provider 模型服务商 tts TTS/STT vision

Comments

@arvinxx
Copy link
Contributor

arvinxx commented Jan 7, 2025

image

We released a brand new AI Provider management module in version v1.44.0, bringing a completely new experience for managing AI service providers. Based on extensive user feedback, we introduced the following in this new Provider version:

  • Create custom service providers (supporting different SDK formats, such as multiple OpenAI format providers), create custom models;
  • Capabilities and parameter customization for all models (currently only FC and Vision are available, more will be opened in the future based on community demand);
  • Custom sorting by service provider, enable custom sorting of models;
  • Supported full-type models at the framework level (language models, embedding models, TTS/STT models, text-to-image models). This framework enables us to support richer modal AI models in the future, such as text-to-video and music models.

As the new feature for the beginning of 2025, we expect this new module to encompass all possibilities for the coming year, making LobeChat the most versatile client in the AI Chat field~

Important

Note: This AI Provider module upgrade is only available under the server DB. Future iterations will support pglite mode. The dexie db will maintain its original implementation and will be completely removed in v2.0.

At the same time, the AI Provider page has undergone a complete rewrite from data storage to front-end implementation in order to achieve better performance and interaction experience. Therefore, at this stage, the logic related to the original environment variables may not be implemented or may have flaws. If you encounter any scenarios that do not meet your expectations, please provide feedback below, and I will strive to complete the fix within T+1 days.

Therefore, when this post is closed, if there are still no feedback on the environment variable issue, it will be removed as a deprecated feature in V2.


我们在 v1.44.0 版本发布了全新的 AI Provider 管理模块,带来了全新的 AI 服务商管理体验。结合诸多用户反馈,我们在这一全新的 Provider 版本中,带来了:

  • 创建自定义服务商(支持不同 SDK 格式,例如多个 OpenAI 格式的服务商)、创建自定义模型;
  • 所有模型的能力、参数自定义(目前仅开放 FCVision,未来将会根据社区诉求开放更多参数,例如模型是否支持流式等);
  • 服务商自定义排序、启用模型的自定义排序;
  • 在框架层支持了全量类型的模型(语言模型、Embedding模型、TTS/STT 模型、文生图模型。这一框架使得我们未来也将能支持上文生视频、音乐模型等更丰富模态的 AI 模型。

image
image
image

Important

注意事项:本次 AI Provider 模块升级,只在服务端 DB 与 pglite 模式下可用。而 dexie db 仍保持原有实现,后续将在 v2.0 中完全移除。

由于AI Provider 这个页面从数据存储到前端实现是一次完全的重写,以期获得更好的操作性能和交互体验。因此数据上是完全独立的两套,我们不做任何迁移,升级后你需要自行重新配置对应的 Provider。同时现阶段的实现中,和原有 环境变量 相关的部分的逻辑可能没有实现或者存在瑕疵。如果遇到不符合你的预期场景,请在下方反馈,我会争取在当天评估是否对齐原有逻辑,如需对齐, T+1 天内完成对齐。

待本帖关闭时,如果仍然没有反馈的环境变量问题,也将作为废弃功能在 V2 中移除。

作为 2025 年的开年新特性,我们期望这个新的模块能承载未来一年的全部可能性,让 LobeChat 变成 AI Chat 领域最全面的 AI 客户端 🚀

@arvinxx arvinxx pinned this issue Jan 7, 2025
@lobehub lobehub deleted a comment from lobehubbot Jan 7, 2025
@dosubot dosubot bot added Model Provider 模型服务商 tts TTS/STT vision labels Jan 7, 2025
@YANANEER

This comment was marked as resolved.

@lobehubbot

This comment was marked as resolved.

@SpeedupMaster

This comment was marked as resolved.

@lobehubbot

This comment was marked as resolved.

@coulsontl

This comment was marked as resolved.

@lobehubbot

This comment was marked as resolved.

@sqkkyzx

This comment was marked as resolved.

@lobehubbot

This comment was marked as resolved.

@SAnBlog

This comment was marked as resolved.

@lobehubbot

This comment was marked as resolved.

@SAnBlog

This comment was marked as resolved.

@lobehubbot

This comment was marked as resolved.

@arvinxx

This comment was marked as resolved.

@lobehubbot

This comment was marked as resolved.

@arvinxx

This comment was marked as resolved.

@lobehubbot

This comment has been minimized.

@gemnioo
Copy link

gemnioo commented Jan 8, 2025

the cross-region inference in aws bedrock still makes user confused; the naming issues need to be addressed

image

Ref: #4659

@Sun-drenched

This comment was marked as resolved.

@lobehubbot

This comment was marked as resolved.

@CoolGIS

This comment has been minimized.

@lobehubbot

This comment has been minimized.

@YANANEER

This comment has been minimized.

@lobehubbot

This comment has been minimized.

@arvinxx

This comment has been minimized.

@lobehubbot

This comment was marked as resolved.

@arvinxx

This comment was marked as resolved.

@lobehubbot

This comment was marked as resolved.

@arvinxx

This comment was marked as resolved.

@lobehubbot

This comment was marked as resolved.

@TonyBlur

This comment was marked as resolved.

@lobehubbot

This comment was marked as resolved.

@arvinxx

This comment was marked as resolved.

@lobehubbot

This comment was marked as resolved.

@YunWaiHe

This comment was marked as resolved.

@lobehubbot

This comment was marked as resolved.

@YunWaiHe

This comment has been minimized.

@lobehubbot

This comment has been minimized.

@Sen-CaPoo
Copy link

Sen-CaPoo commented Jan 17, 2025

Image

在使用新版 AI Provider Lobechat 呼叫 OpenAI o1 正式版模型時,發現與舊版本相同的問題,無法支援該正式版模型。以下是詳細情形與分析:

問題描述

  • 當嘗試透過 Lobechat 對 OpenAI o1 正式版模型進行請求時,出現下列錯誤訊息:

    {
      "error": {
        "code": "unsupported_value",
        "type": "invalid_request_error",
        "param": "stream",
        "message": "Unsupported value: 'stream' does not support true with this model. Supported values are: false."
      },
      "endpoint": "https://api.openai.com/v1",
      "provider": "openai"
    }
    

可能原因

根據目前了解,OpenAI o1 正式版針對參數做了部分調整,其中包含:

  1. 系統角色的訊息改為 "role": "developer"
  2. 新增參數 reasoning_effort="high" or "medium" or "low",用以設定思考時間
  3. 不支援 stream,只能填 false 或不填寫

這些變更導致目前舊版本呼叫方式不再適用於 o1 正式版。

正確呼叫範例(Python)

以下示範如何呼叫 OpenAI o1 正式版模型,請注意呼叫時需要符合上述調整:

from openai import OpenAI
client = OpenAI()

response = client.chat.completions.create(
  model="o1",
  messages=[
    {
      "role": "developer",
      "content": [
        {
          "type": "text",
          "text": "你是一位專業的程式語言分析工程師。"
        }
      ]
    },
    {
      "role": "user",
      "content": [
        {
          "type": "text",
          "text": "早安!"
        }
      ]
    },
    {
      "role": "assistant",
      "refusal": null,
      "content": [
        {
          "type": "text",
          "text": "早安!有什麼可以為您效勞的嗎?"
        }
      ]
    }
  ],
  response_format={
    "type": "text"
  },
  reasoning_effort="medium"
)

額外建議

隨著語言模型供應商不斷推出新版本,並加入各自特有的參數(例如 OpenAI 早期便提供的 response_format={"type": "json_object" or "text"}),但 Lobechat 目前只能設定基礎參數,無法靈活調整這些廠商特有的呼叫選項。

若未來能在「語言模型設定」頁面開放 客製化參數 的功能,例如可以自由指定 "reasoning_effort""response_format" 等,將大幅提升對各種模型的適用性和靈活度。不過這也涉及更多技術與邏輯層面的考量,僅提供此想法作為參考。

@arvinxx

This comment has been minimized.

@lobehubbot

This comment has been minimized.

@arvinxx

This comment has been minimized.

@lobehubbot

This comment has been minimized.

@YunWaiHe

This comment has been minimized.

@lobehubbot

This comment has been minimized.

@arvinxx

This comment has been minimized.

@lobehubbot

This comment has been minimized.

@arvinxx

This comment has been minimized.

@lobehubbot

This comment has been minimized.

@lfffffy
Copy link

lfffffy commented Jan 23, 2025

issues 如这个issues所说的,在之前就设置了azure的相关配置,然后更新了新的版本之后控制台会沿用之前的设置,新的设置不生效(模型端点不生效,例如之前写的是aaaaa => gpt-35-turbo ,现在改成了bbbbb => gpt-35-turbo,还是会请求到之前a的设置)

@lobehubbot
Copy link
Member

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


issues As mentioned in this issue, the relevant configuration of azure has been set up before, and then the console will continue to use it after updating to the new version. The previous settings and new settings do not take effect (the model endpoint does not take effect. For example, what was written before was aaaaa => gpt-35-turbo, but now it is changed to bbbbb => gpt-35-turbo, the previous settings of a will still be requested)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Model Provider 模型服务商 tts TTS/STT vision
Projects
None yet
Development

No branches or pull requests