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] 配置DEFAULT_FILES_CONFIG后,向量化提示llmproxy.****.cn 403错误 #6485

Closed
wangdawai opened this issue Feb 25, 2025 · 9 comments
Labels
🐛 Bug Something isn't working | 缺陷 files 上传文件/知识库

Comments

@wangdawai
Copy link

📦 部署环境

Docker

📦 部署模式

服务端模式(lobe-chat-database 镜像)

📌 软件版本

v1.59.0

💻 系统环境

Windows, macOS

🌐 浏览器

Chrome

🐛 问题描述

Image
配置的是阿里云提供的openai embedding兼容的模型 text-embedding-v3
.evn文件配置:
DEFAULT_FILES_CONFIG="embedding_model=openai/text-embedding-v3"
OPENAI_API_KEY=sk-xxxxx
OPENAI_PROXY_URL=https://dashscope.aliyuncs.com/compatible-mode/v1

📷 复现步骤

上传文件,点击向量化即可复现。

🚦 期望结果

No response

📝 补充信息

No response

@wangdawai wangdawai added the 🐛 Bug Something isn't working | 缺陷 label Feb 25, 2025
@github-project-automation github-project-automation bot moved this to Roadmap - Chat 1.x in Lobe Chat Routine Feb 25, 2025
@lobehubbot
Copy link
Member

👀 @wangdawai

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

@lobehubbot
Copy link
Member

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


📦 Deployment environment

Docker

📦 Deployment mode

Server-side mode (lobe-chat-database mirror)

📌 Software version

v1.59.0

💻 System environment

Windows, macOS

🌐 Browser

Chrome

🐛 Question description

Image
It is configured with the openai embedding compatible model provided by Alibaba Cloud text-embedding-v3
.evn file configuration:
DEFAULT_FILES_CONFIG="embedding_model=openai/text-embedding-v3"
OPENAI_API_KEY=sk-xxxxx
OPENAI_PROXY_URL=https://dashscope.aliyuncs.com/compatible-mode/v1

📷 Reproduction steps

Upload the file and click vectorization to reproduce it.

🚦 Expected results

No response

📝 Supplementary information

No response

@dosubot dosubot bot added the files 上传文件/知识库 label Feb 25, 2025
Copy link

dosubot bot commented Feb 25, 2025

@wangdawai 你好!我是Dosu,一个可以帮助你解决问题、回答疑问并成为贡献者的机器人。我很高兴能帮助你。

To resolve the 403 error when using the Aliyun OpenAI embedding-compatible model in the lobe-chat application, follow these steps:

  1. Check API Key Balance: Ensure that your API Key has sufficient balance. A 403 error may occur if the API Key balance is insufficient.

  2. Verify Real-Name Authentication: Confirm that the API Key is real-name authenticated if the model requires such authentication. Using an unauthenticated API Key for models requiring real-name authentication can result in a 403 error.

These steps are crucial for addressing the ProviderBizError related to the OpenAI provider [1].

To continue talking to Dosu, mention @dosu.


Help Dosu learn! Give it feedback: Great Response | Irrelevant Answer | Incorrect Sources | Too Verbose | Hallucination | Bug Report | Other

@lobehubbot
Copy link
Member

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


The official text-embedding-3-small request is requested in the original way, and status code 400 will also be reported: you must provide a model parameter; it feels like this model has been updated and all channel providers have not yet adapted, while lobechat only defaults to Use OpenAI to get text-embedding-3-small, so the vectorization is currently reported as an error

@eyiyluo1979
Copy link

我试过阿里的text-embedding-v3,在文件比较小的时候(20K以内)是正常的。但是超过了之后就会出错。你可以在这里查到V3的最大行数是10。https://bailian.console.aliyun.com/#/model-market/detail/text-embedding-v3?tabKey=sdk

Image

另,阿里的其他几个嵌入模型也用不了。v1、v2是因为维度不兼容1024维。后来我用了硅基的,OK了

OPENAI_API_KEY=sk-******qblhkli # 用硅基的配置
OPENAI_PROXY_URL=https://api.siliconflow.cn/v1
DEFAULT_FILES_CONFIG="embedding_model=openai/BAAI/bge-m3" # 硅基的嵌入模型(1024维)

@lobehubbot
Copy link
Member

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


I have tried Alibaba's text-embedding-v3, which is normal when the file is relatively small (within 20K). But if it exceeds it, it will make an error. You can find out here that the maximum number of rows in V3 is 10. https://bailian.console.aliyun.com/#/model-market/detail/text-embedding-v3?tabKey=sdk

Image

In addition, Alibaba’s other embedded models are not available. v1 and v2 are because the dimensions are incompatible with 1024 dimensions. Later I used silicon-based ones, OK

OPENAI_API_KEY=sk-******qblhkli #Silicon-based configuration
OPENAI_PROXY_URL=https://api.siliconflow.cn/v1
DEFAULT_FILES_CONFIG="embedding_model=openai/BAAI/bge-m3" # Silicon-based embedding model (1024-dimensional)

@wangdawai
Copy link
Author

https://api.siliconflow.cn/v1

NB,按照你的方法配置成功了,不仅要修改.env文件配置,还需要在服务启动后,在AI服务商那里,正确配置OpenAI的代理地址和key

@github-project-automation github-project-automation bot moved this from Roadmap - Chat 1.x to Done in Lobe Chat Routine Mar 5, 2025
@lobehubbot
Copy link
Member

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


https://api.siliconflow.cn/v1

NB, the configuration is successful according to your method. Not only do you need to modify the .env file configuration, but you also need to correctly configure the proxy address and key of OpenAI from the AI ​​service provider after the service is started.

@lobehubbot
Copy link
Member

@wangdawai

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

@dosubot dosubot bot mentioned this issue Mar 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐛 Bug Something isn't working | 缺陷 files 上传文件/知识库
Projects
Status: Done
Development

No branches or pull requests

3 participants