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

Error calling ChatGLM Embedding API #490

Open
Dullne opened this issue Dec 19, 2024 · 2 comments
Open

Error calling ChatGLM Embedding API #490

Dullne opened this issue Dec 19, 2024 · 2 comments

Comments

@Dullne
Copy link

Dullne commented Dec 19, 2024

zhipu调用API出错,而可以给个示例吗,以下是文档代码和报错信息,调用的免费模型,并没有欠费
async def llm_model_func(
prompt, system_prompt=None, history_messages=[], keyword_extraction=False, **kwargs
) -> str:
return await zhipu_complete_if_cache(
prompt,
"glm-4-Flash",
system_prompt=system_prompt,
history_messages=history_messages,
api_key=os.getenv("ZHIPUAI_API_KEY"),
**kwargs
)

async def embedding_func(texts: list[str]) -> np.ndarray:
return await zhipu_embedding(
texts,
model="embedding-3",
api_key=os.getenv("ZHIPUAI_API_KEY"),
)

rag = LightRAG(
working_dir=WORKING_DIR,
llm_model_func=llm_model_func,
embedding_func=EmbeddingFunc(
embedding_dim=384,
max_token_size=8192,
func=embedding_func
)
)
报错信息:
Exception: Error calling ChatGLM Embedding API: Error code: 429, with error text {"error":{"code":"1113","message":"您的账户已欠费,请充值后重试。"}}
Generating embeddings: 0%| | 0/2 [00:25<?, ?batch/s]

@thundax-lyp
Copy link

提示Embedding接口欠费,embedding-3 不是免费的吧

@Dullne
Copy link
Author

Dullne commented Dec 20, 2024

提示Embedding接口欠费,embedding-3 不是免费的吧

embedding-2也是一样的错误

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants