This commit is contained in:
narawat lamaiin
2024-10-14 21:26:04 +07:00
parent c46f670f7a
commit c3ae51b670

View File

@@ -168,6 +168,7 @@ function decisionMaker(state::T1, context, text2textInstructLLM::Function,
4) Action_name (Must be aligned with your plan): Can be one of the following functions: 4) Action_name (Must be aligned with your plan): Can be one of the following functions:
- TABLEINFO[list_of_table_name], which you can use to get the data type of a table column. "list_of_table_name" is a list of table name you want to get info. e.g. TABLEINFO["table name 1", "table name 2"] - TABLEINFO[list_of_table_name], which you can use to get the data type of a table column. "list_of_table_name" is a list of table name you want to get info. e.g. TABLEINFO["table name 1", "table name 2"]
- GETDATA[SQL], which you can use to get the data from the database. "SQL" is the single SQL command to be executed against the database. - GETDATA[SQL], which you can use to get the data from the database. "SQL" is the single SQL command to be executed against the database.
For optimal text search, it's advisable to employ case-insensitivity and the ILIKE operator.
Do not wrap the SQL as it will be executed against the database directly and SQL must be ended with ';'. Do not wrap the SQL as it will be executed against the database directly and SQL must be ended with ';'.
5) Action_input: Input to the action 5) Action_input: Input to the action
6) Observation: Result of the immediately preceding action 6) Observation: Result of the immediately preceding action
@@ -733,7 +734,7 @@ function evaluator(state::T1, text2textInstructLLM::Function;
# mark as terminal state when the answer is achieved # mark as terminal state when the answer is achieved
if accepted_as_answer == "Yes" if accepted_as_answer == "Yes"
# add to vectorDB only if the answer is achieved and the state is terminal # add to vectorDB only if the answer is achieved and the state is terminal
# (found some row in the database) # (found some row in the database)
if addSQLVectorDB !== nothing && state[:isterminal] == true if addSQLVectorDB !== nothing && state[:isterminal] == true