Find answers from the community

Updated 9 months ago

Hi everyone, I'm trying to get Knowledge

Hi everyone, I'm trying to get Knowledge Graph Query Engine work on my end and I'm getting some error message that I don't understand.
This happens when I call query_eninge.qyery("my query") The error message that I get is this:
AttributeError: 'NoneType' object has no attribute 'kwargs'
I can confirm that the knowledge graph is up and running and it has data inserted in it already and can run direct queries against it successfully.
Wondering if any of you knows what's the problem here. Complete error message in the thread.
Thanks!
1
K
b
L
9 comments
Looks like the error message is to long to add in here
File ~/Code/testllamaindex/venv/lib/python3.9/site-packages/llama_index/core/llms/llm.py:215, in LLM._log_template_data(self, prompt, prompt_args) 210 def _log_template_data( 211 self, prompt: BasePromptTemplate, prompt_args: Any
212 ) -> None:
213 template_vars = {
214 k: v
--> 215 for k, v in ChainMap(prompt.kwargs, prompt_args).items()
216 if k in prompt.template_vars
217 }
218 with self.callback_manager.event(
219 CBEventType.TEMPLATING,
220 payload={
(...)
225 },
226 ):
227 pass

AttributeError: 'NoneType' object has no attribute 'kwargs'
This is the last block of the error message ^^^
@KolonelMeow can you send more code surrounding your query
This is actually broken since v0.10.x -- been on my todo to fix, but KGs are lower priority lol
There were specific cypher prompts for nebula vs neo4j that got removed
so now the prompt template is none
gotcha - what are your best practices for using a knowledge graph with llamaindex?
Add a reply
Sign up and join the conversation on Discord