Find answers from the community

Y
Yats
Offline, last seen 3 months ago
Joined September 25, 2024
Hi, I'm trying to do this: https://gpt-index.readthedocs.io/en/latest/examples/query_engine/SQLAutoVectorQueryEngine.html
The modification that I've done is: I replaced the OpenAI LLM with LlamaCPP (llama-2-13b-chat) and the VectorStore with Qdrant

I'm experiencing an error when querying
Plain Text
response = query_engine.query(
    "Tell me about the arts and culture of the city with the highest population"
)


Plain Text
JSONDecodeError                           Traceback (most recent call last)
./SQLAutoVectorQueryEngine.ipynb Cell 32 line 1
----> 1 response = query_engine.query(
      2     "Tell me about the arts and culture of the city with the highest population"
      3 )

File ./venv/lib/python3.8/site-packages/llama_index/indices/query/base.py:23, in BaseQueryEngine.query(self, str_or_query_bundle)
     21 if isinstance(str_or_query_bundle, str):
     22     str_or_query_bundle = QueryBundle(str_or_query_bundle)
---> 23 response = self._query(str_or_query_bundle)
     24 return response

File ./venv/lib/python3.8/site-packages/llama_index/query_engine/sql_join_query_engine.py:286, in SQLJoinQueryEngine._query(self, query_bundle)
    284 # TODO: see if this can be consolidated with logic in RouterQueryEngine
    285 metadatas = [self._sql_query_tool.metadata, self._other_query_tool.metadata]
--> 286 result = self._selector.select(metadatas, query_bundle)
    287 # pick sql query
    288 if result.ind == 0:

File ./venv/lib/python3.8/site-packages/llama_index/selectors/types.py:77, in BaseSelector.select(self, choices, query)
     75 metadatas = [_wrap_choice(choice) for choice in choices]
     76 query_bundle = _wrap_query(query)
---> 77 return self._select(choices=metadatas, query=query_bundle)
...
    354 except StopIteration as err:
--> 355     raise JSONDecodeError("Expecting value", s, err.value) from None
    356 return obj, end


I'm not sure as to why it's happening. Can someone help me? Thanks
16 comments
Y
L