We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
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]
The text was updated successfully, but these errors were encountered:
提示Embedding接口欠费,embedding-3 不是免费的吧
Sorry, something went wrong.
embedding-2也是一样的错误
No branches or pull requests
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]
The text was updated successfully, but these errors were encountered: