You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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
The text was updated successfully, but these errors were encountered:
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.
📦 部署环境
Vercel
📦 部署模式
服务端模式(lobe-chat-database 镜像)
📌 软件版本
v1.70.4
💻 系统环境
Windows
🌐 浏览器
Chrome
🐛 问题描述
设置了
DEFAULT_FILES_CONFIG=embedding_model=google/gemini-embedding-exp-03-07
,但是文件分块后向量化失败在本地python连接测试可以,内容为同样的文字内容,以下是测试脚本:
📷 复现步骤
No response
🚦 期望结果
No response
📝 补充信息
No response
The text was updated successfully, but these errors were encountered: