Find answers from the community

Home
Members
vinodvarma24
v
vinodvarma24
Offline, last seen 3 months ago
Joined September 25, 2024
I'm having an issue with guidance_utils script of llama_index after upgrading to pydantic v2.30. Here is my error: File "/Users/vinodvarma/Documents/GitHub/talktodata-api/ai.py", line 138, in parse_sql_results program = GuidancePydanticProgram( File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/llama_index/program/guidance_program.py", line 42, in __init__ output_str = pydantic_to_guidance_output_template_markdown(output_cls) File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/llama_index/prompts/guidance_utils.py", line 54, in pydantic_to_guidance_output_template_markdown output = json_schema_to_guidance_output_template(cls.schema(), root=cls.schema()) File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/llama_index/prompts/guidance_utils.py", line 89, in json_schema_to_guidance_output_template + json_schema_to_guidance_output_template(v, k, indent + 1, root) File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/llama_index/prompts/guidance_utils.py", line 107, in json_schema_to_guidance_output_template + json_schema_to_guidance_output_template(schema["items"], "this", 0, root) File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/llama_index/prompts/guidance_utils.py", line 79, in json_schema_to_guidance_output_template root["definitions"][model], key, indent, root KeyError: 'definitions' -----------Any clue why this this is happening?
5 comments
v
L
How to use "ChatMemoryBuffer" with SQLTableRetrieverQueryEngine
9 comments
v
L
k
How to use use 'gpt-4' instead of defult "text-davinci-002" model while using with query_engine = SQLTableRetrieverQueryEngine(
sql_database,
object_index.as_retriever(similarity_top_k=3),
)
15 comments
L
v
k
How to use the latest 'ObjectIndex' for working with Vector Store(PGVector) instead of default 'VectorStoreIndex'. to retrive data from already created index in my PGVector. self.vector_store = PGVectorStore.from_params( database=DATABASE_NAME, host=DATABASE_HOST, password=DATABASE_PASSWORD, port=DATABASE_PORT, user=DATABASE_USER, table_name=self.collection_table_name) self.obj_index = ObjectIndex.from_objects(self.table_schema_objs, self.table_node_mapping, VectorStoreIndex) self.db_query_engine = SQLTableRetrieverQueryEngine( self.sql_database, self.obj_index.as_retriever(similarity_top_k=3)) So far i have my code like this, But i'm not able to use my 'vector_store' inside the ObjectIndex.from_objects(). How to approach this. My usecase is I'm creating embeddings on entire databse(100+ tables) and storing them in a pgvector table. Now i just want to use that table to retrive the top 3 results. Any help here would be of a great help. I'm just following this example here https://gpt-index.readthedocs.io/en/latest/examples/index_structs/struct_indices/SQLIndexDemo-ManyTables.html
56 comments
v
L
@kapa.ai How to get the header also from the results of the SQL Query Engine ? I’m trying to get the results with out the result synthesized.
21 comments
L
v
k