Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: avoid OpenAILikeEmbedding always use zhipu api url when knowledg…
…e graph building (#579) When using `OpenAILikeEmbedding`, if a provider other than zhipu is configured, the bug of the authentication information error will appear when building knowledge graph. ``` [2025-01-08 03:10:38,501: INFO/ForkPoolWorker-2] HTTP Request: POST https://open.bigmodel.cn/api/paas/v4/embeddings "HTTP/1.1 401 Unauthorized" [2025-01-08 03:10:38,507: ERROR/ForkPoolWorker-2] app.tasks.build_index.build_kg_index_for_chunk[4489bfc3-0e7c-4606-ad77-b973ef24a3f1]: Failed to build knowledge graph index for chunk #60564d4d-1522-476c-9660-ab1859ee2b1e Traceback (most recent call last): File "/app/app/tasks/build_index.py", line 125, in build_kg_index_for_chunk index_service.build_kg_index_for_chunk(index_session, db_chunk) ``` This bug is due to `config.pop()`call will remove the `api_base` param from the config. In the method of `get_embed_model` / `get_llm` / `get_reranker_model`, the config should be inmutable.
- Loading branch information