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] 设置Google的embedding模型向量化失败 #6891

Open
bbbugg opened this issue Mar 11, 2025 · 2 comments
Open

[Bug] 设置Google的embedding模型向量化失败 #6891

bbbugg opened this issue Mar 11, 2025 · 2 comments
Labels
🐛 Bug Something isn't working | 缺陷

Comments

@bbbugg
Copy link
Contributor

bbbugg commented Mar 11, 2025

📦 部署环境

Vercel

📦 部署模式

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

📌 软件版本

v1.70.4

💻 系统环境

Windows

🌐 浏览器

Chrome

🐛 问题描述

设置了DEFAULT_FILES_CONFIG=embedding_model=google/gemini-embedding-exp-03-07,但是文件分块后向量化失败

Image

在本地python连接测试可以,内容为同样的文字内容,以下是测试脚本:

from google import genai
client = genai.Client(api_key="*****************************************")
result = client.models.embed_content(
    model="gemini-embedding-exp-03-07",
    contents="How does alphafold work?",
)
print(result.embeddings)

📷 复现步骤

No response

🚦 期望结果

No response

📝 补充信息

No response

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

dosubot bot commented Mar 11, 2025

I found a similar unsolved discussion regarding customizing embedding models in lobe-chat [1]. However, it doesn't provide a solution to your specific issue.

For your problem with the Google Gemini embedding model, ensure that the API key is correctly configured and that the model name is accurately specified in the DEFAULT_FILES_CONFIG. Additionally, verify that the necessary dependencies, such as @google-cloud/vertexai and @google/generative-ai, are included in your package.json [2][3].

If the issue persists, consider checking the error handling mechanisms in place for embedding failures, which involve catching errors during the embedding creation process and passing them to a handleError function [4][5]. This might provide more insight into the specific error you're encountering.

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

@Kryo123456
Copy link

感觉应该是不支持。

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