DatabaseError: (google.cloud.bigquery.dbapi.exceptions.DatabaseError) 400 Syntax error: Expected end of input but got identifier "SQLQuery" at [1:1]
when using SQLTableRetrieverQueryEngine. It looks like this part of the prompt ("SQLQuery:") isn't being trimmed from the SQL statement before it's put to BQ. There's a function _parse_response_to_sql
(https://github.com/jerryjliu/llama_index/blob/be0ded30701f45bd097b30a00fa93d2cdf06a592/llama_index/indices/struct_store/sql_query.py#L242) which attempts to trim according to the position of "SQLResult:" but there's no trimming going on for "SQLQuery:".SyntaxError: 'await' outside function
caused by the line response = await query_engine.aquery(...
. Any ideas what I'm doing wrong? Feels like this might be a really stupid question...storage_context = StorageContext.from_defaults() obj_index = ObjectIndex.from_objects( table_schema_objs, table_node_mapping, VectorStoreIndex, storage_context=storage_context, ) storage_context.persist(persist_dir=persist_dir)