From bf73a4431f977b34aff7ca273954967a73ba7b0a Mon Sep 17 00:00:00 2001 From: Shicheng Liu Date: Wed, 17 Apr 2024 08:35:08 +0000 Subject: [PATCH] `1.1.4a3` release, logging changes --- setup.py | 4 ++-- src/suql/prompt_continuation.py | 1 - src/suql/sql_free_text_support/execute_free_text_sql.py | 6 ++++++ 3 files changed, 8 insertions(+), 3 deletions(-) diff --git a/setup.py b/setup.py index c25dcef..c7fe05c 100644 --- a/setup.py +++ b/setup.py @@ -2,7 +2,7 @@ # Package metadata name = "suql" -version = "1.1.4a2" +version = "1.1.4a3" description = "Structured and Unstructured Query Language (SUQL) Python API" author = "Shicheng Liu" author_email = "shicheng@cs.stanford.edu" @@ -22,7 +22,7 @@ 'tiktoken==0.4.0', 'psycopg2-binary==2.9.7', 'pglast==5.3', - 'FlagEmbedding==1.2.5', + 'FlagEmbedding~=1.2.5', 'litellm==1.34.34' ] diff --git a/src/suql/prompt_continuation.py b/src/suql/prompt_continuation.py index 5fdfa4a..634a1b5 100644 --- a/src/suql/prompt_continuation.py +++ b/src/suql/prompt_continuation.py @@ -20,7 +20,6 @@ logger = logging.getLogger(__name__) -logger.setLevel(logging.INFO) # create file handler which logs even debug messages fh = logging.FileHandler("prompts.log") fh.setLevel(logging.DEBUG) diff --git a/src/suql/sql_free_text_support/execute_free_text_sql.py b/src/suql/sql_free_text_support/execute_free_text_sql.py index 208655e..afaacf9 100644 --- a/src/suql/sql_free_text_support/execute_free_text_sql.py +++ b/src/suql/sql_free_text_support/execute_free_text_sql.py @@ -1638,6 +1638,12 @@ def suql_execute( `create_userpswd` (str, optional): above user's password with create privilege in db. Defaults to "creator_role". + `source_file_mapping` (Dict(str -> str), optional): Experimental feature - a dictionary mapping from variable + names to the file locations. This would support queries that only need a free text source, e.g., + `suql = answer(yelp_general_info, 'what is your cancellation policy?')`. In this case, you can specify + `source_file_mapping = {"yelp_general_info": "PATH TO FILE"}` to inform the SUQL compiler where to find + `yelp_general_info`. + # Returns: `results` (List[[*]]): A list of returned database results. Each inner list stores a row of returned result.