Compare commits
6 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 243e3fe10b | |||
| c594a34e4e | |||
| 2efb016646 | |||
| 216a8bdabb | |||
| cbaa480e84 | |||
| 6cb4073e29 |
+1
-1
@@ -1,6 +1,6 @@
|
||||
name = "SQLLLM"
|
||||
uuid = "2ebc79c7-cc10-4a3a-9665-d2e1d61e63d3"
|
||||
version = "0.2.5"
|
||||
version = "0.2.7"
|
||||
authors = ["narawat lamaiin <narawat@outlook.com>"]
|
||||
|
||||
[deps]
|
||||
|
||||
+7
-5
@@ -118,9 +118,9 @@ function decisionMaker(state::T1, text2textInstructLLM::Function, llmFormatName:
|
||||
<possible SQL for this question>
|
||||
$similarSQL_
|
||||
</possible SQL for this question>
|
||||
<your earlier actions>
|
||||
<assistant_action_history>
|
||||
$(GeneralUtils.dict_to_string_html(state["action_history"]))
|
||||
</your earlier actions>
|
||||
</assistant_action_history>
|
||||
<error_note>
|
||||
$errornote
|
||||
<error_note>
|
||||
@@ -284,14 +284,16 @@ function evaluator(state::T1, text2textInstructLLM::Function, llmFormatName::Str
|
||||
usermsg =
|
||||
"""
|
||||
<internal_context_for_assistant>
|
||||
<table_schema>
|
||||
$(state["context"]["table_schema"])
|
||||
</internal_context_for_assistant>
|
||||
</table_schema>
|
||||
<customer question>
|
||||
$(state["chathistory"][2]["content"][1]["text"])
|
||||
</customer question>
|
||||
<trajectories>
|
||||
<assistant_action_history>
|
||||
$(GeneralUtils.dict_to_string_html(state["action_history"]))
|
||||
</trajectories>
|
||||
</assistant_action_history>
|
||||
</internal_context_for_assistant>
|
||||
"""
|
||||
|
||||
msg = Dict(
|
||||
|
||||
+2
-2
@@ -502,7 +502,7 @@ function SQLexecution(executeSQL::Function, sql::T
|
||||
tablesize = size(df)
|
||||
row, column = tablesize
|
||||
if row == 0
|
||||
return (result_str="The resulting table has 0 row.", result_raw=df, success=true, errormsg=nothing)
|
||||
return (result_str="No records found.", result_raw=df, success=true, errormsg=nothing)
|
||||
elseif column > 30
|
||||
return (result_str="There are more than 30 columns. Please be more specific.", result_raw=df, success=true, errormsg=nothing)
|
||||
else
|
||||
@@ -545,7 +545,7 @@ end
|
||||
- `result::String`
|
||||
|
||||
# Signature
|
||||
""" #WORKING
|
||||
""" #PENDING
|
||||
function extractContent_dataframe(df::DataFrame, text2textInstructLLM::Function, action::String,
|
||||
llmFormatName::String
|
||||
)::String
|
||||
|
||||
Reference in New Issue
Block a user