Find answers from the community

D
Dhiraj
Offline, last seen 3 months ago
Joined September 25, 2024
D
Dhiraj
·

Tiktoken

I am trying to use an ObjectIndex constructor for SQL Query-Time Retrieval of Tables for Text-to-SQL queries. This is the code I use:

Plain Text
obj_index = ObjectIndex.from_objects(
    table_schema_objs,
    table_node_mapping,
    VectorStoreIndex,
)

The code runs fine in a jupyter notebook but the same code strangely gives me an error when I run in .py file. It gives me this error:

Plain Text
ValueError: Duplicate encoding name gpt2 in tiktoken plugin tiktoken_ext.openai_public

Not sure what to make of it
1 comment
L
I’m building a query pipeline for converting text to sql by following the tutorial given here:

https://docs.llamaindex.ai/examples/pipeline/query_pipeline_sql/

Sometimes the user query is such that it requires multiple SQL queries to be executed where the result of one query is needed as an input to the next query. In such cases while the SQL query is formulated correctly, it assumes results rather than executing the actual queries. What can I do to overcome this problem?
5 comments
J
D
Has anyone tried defining a custom kg_schema_cls for SchemaLLMPathExtractor? Or is there an example that we could go through?
5 comments
L
D