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] 使用gemini text-embedding-004模型对文件进行向量化失败 #5137

Open
curry-he opened this issue Dec 22, 2024 · 2 comments
Open
Labels
🐛 Bug Something isn't working | 缺陷

Comments

@curry-he
Copy link

📦 Environment

Vercel

📌 Version

lobe-chat-database

💻 Operating System

Windows

🌐 Browser

Chrome

🐛 Bug Description

使用gemini text-embedding-004模型对文件进行向量化失败
我在one-api中将text-embedding-3-small重定向到了text-embedding-004模型,后端text-embedding-004请求成功,但是lobechat显示向量化失败,以下是对应的截图

部署在huggignface的gemini text-embedding-004请求成功截图
image

lobechat向量化失败截图
image

lobechat对应的error log
image
embeddingChunks error {
message: '{"length":93,"name":"error","severity":"ERROR","code":"22000","file":"vector.c","line":"72","routine":"CheckExpectedDim"}',
name: 'EmbeddingError'
}

📷 Recurrence Steps

No response

🚦 Expected Behavior

No response

📝 Additional Information

No response

@curry-he curry-he added the 🐛 Bug Something isn't working | 缺陷 label Dec 22, 2024
@github-project-automation github-project-automation bot moved this to Roadmap - Chat 1.x in Lobe Chat Routine Dec 22, 2024
@lobehubbot
Copy link
Member

👀 @curry-he

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

Copy link

dosubot bot commented Dec 22, 2024

Hey @curry-he,

I'm here to help you with any bugs, questions, or contributions you have! Let's work together to solve this issue.

The error you're encountering with the Gemini text-embedding-004 model in Lobe Chat seems to be related to a vector dimension mismatch, as indicated by the CheckExpectedDim function. This function is likely responsible for validating the dimensions of the vectors returned by the embedding model. The error log shows an "EmbeddingError" with a specific code "22000," which suggests that the expected vector dimensions do not match the actual dimensions received.

To resolve this issue, you might want to:

  1. Verify the Expected Dimensions: Ensure that the expected vector dimensions for the Gemini text-embedding-004 model are correctly configured in your application. This information might be available in the model's documentation or configuration settings.

  2. Check Redirection Settings: Since you mentioned redirecting text-embedding-3-small to text-embedding-004, confirm that this redirection is correctly set up and that the models are compatible in terms of output dimensions.

  3. Review the CheckExpectedDim Function: If possible, review the implementation of the CheckExpectedDim function to understand what dimensions it expects and adjust your configuration accordingly.

  4. Consult Model Documentation: Look for any specific notes or requirements regarding the output dimensions of the Gemini text-embedding-004 model.

If these steps do not resolve the issue, you may need to delve deeper into the logs or consult additional documentation related to the model or the Lobe Chat framework.

To continue talking to Dosu, mention @dosu.


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

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
Status: Roadmap - Chat 1.x
Development

No branches or pull requests

2 participants