SQL Query Engine
Default query for GPTSQLStructStoreIndex.
- class llama_index.indices.struct_store.sql_query.GPTNLStructStoreQueryEngine(index: GPTSQLStructStoreIndex, text_to_sql_prompt: Optional[TextToSQLPrompt] = None, context_query_kwargs: Optional[dict] = None, **kwargs: Any)
GPT natural language query engine over a structured database.
Given a natural language query, we will extract the query to SQL. Runs raw SQL over a GPTSQLStructStoreIndex. No LLM calls are made during the SQL execution. NOTE: this query cannot work with composed indices - if the index contains subindices, those subindices will not be queried.
- class llama_index.indices.struct_store.sql_query.GPTSQLStructStoreQueryEngine(index: GPTSQLStructStoreIndex, sql_context_container: Optional[SQLContextContainerBuilder] = None, **kwargs: Any)
GPT SQL query engine over a structured database.
Runs raw SQL over a GPTSQLStructStoreIndex. No LLM calls are made here. NOTE: this query cannot work with composed indices - if the index contains subindices, those subindices will not be queried.