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

light_ollama_demo 中 global 模式引用 'll_entities_context' 错误 #511

Open
MengLLS opened this issue Dec 26, 2024 · 0 comments
Open

Comments

@MengLLS
Copy link

MengLLS commented Dec 26, 2024

INFO:lightrag:Logger initialized for working directory: ./dickens
INFO:lightrag:Load KV llm_response_cache with 0 data
INFO:lightrag:Load KV full_docs with 0 data
INFO:lightrag:Load KV text_chunks with 0 data
INFO:nano-vectordb:Init {'embedding_dim': 768, 'metric': 'cosine', 'storage_file': './dickens/vdb_entities.json'} 0 data
INFO:nano-vectordb:Init {'embedding_dim': 768, 'metric': 'cosine', 'storage_file': './dickens/vdb_relationships.json'} 0 data
INFO:nano-vectordb:Init {'embedding_dim': 768, 'metric': 'cosine', 'storage_file': './dickens/vdb_chunks.json'} 0 data
global
INFO:httpx:HTTP Request: POST http://localhost:11434/api/chat "HTTP/1.1 200 OK"
INFO:lightrag:kw_prompt result:

{
  "high_level_keywords": "故事的主角",
  "low_level_keywords": "主要角色"
}

INFO:httpx:HTTP Request: POST http://localhost:11434/api/embeddings "HTTP/1.1 200 OK"
WARNING:lightrag:No high level context found. Switching to local mode.
Traceback (most recent call last):
File "/gemini/code/LightRAG/examples/lightrag_ollama_demo.py", line 54, in
rag.query("这个故事的主要人物有哪些?", param=QueryParam(mode="global"))
File "/gemini/code/LightRAG/lightrag/lightrag.py", line 517, in query
return loop.run_until_complete(self.aquery(query, param))
File "/root/miniconda3/lib/python3.10/asyncio/base_events.py", line 649, in run_until_complete
return future.result()
File "/gemini/code/LightRAG/lightrag/lightrag.py", line 521, in aquery
response = await kg_query(
File "/gemini/code/LightRAG/lightrag/operate.py", line 532, in kg_query
context = await _build_query_context(
File "/gemini/code/LightRAG/lightrag/operate.py", line 656, in _build_query_context
ll_entities_context,
UnboundLocalError: local variable 'll_entities_context' referenced before assignment

其他模式都没问题,就global会报错

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

1 participant