6 Commits

Author SHA1 Message Date
ton 243e3fe10b update 2026-07-10 17:44:34 +07:00
ton c594a34e4e Merge pull request 'v0.2.6' (#4) from v0.2.6 into main
Reviewed-on: #4
2026-07-09 13:18:30 +00:00
ton 2efb016646 up version 2026-07-09 20:18:01 +07:00
ton 216a8bdabb Merge pull request 'v0.2.6-fix_too_many_decision' (#3) from v0.2.6-fix_too_many_decision into v0.2.6
Reviewed-on: #3
2026-07-09 13:16:22 +00:00
ton cbaa480e84 update evaluator 2026-07-09 19:44:37 +07:00
ton 6cb4073e29 update 2026-07-09 19:27:56 +07:00
3 changed files with 14 additions and 12 deletions
+1 -1
View File
@@ -1,6 +1,6 @@
name = "SQLLLM" name = "SQLLLM"
uuid = "2ebc79c7-cc10-4a3a-9665-d2e1d61e63d3" uuid = "2ebc79c7-cc10-4a3a-9665-d2e1d61e63d3"
version = "0.2.5" version = "0.2.7"
authors = ["narawat lamaiin <narawat@outlook.com>"] authors = ["narawat lamaiin <narawat@outlook.com>"]
[deps] [deps]
+11 -9
View File
@@ -118,9 +118,9 @@ function decisionMaker(state::T1, text2textInstructLLM::Function, llmFormatName:
<possible SQL for this question> <possible SQL for this question>
$similarSQL_ $similarSQL_
</possible SQL for this question> </possible SQL for this question>
<your earlier actions> <assistant_action_history>
$(GeneralUtils.dict_to_string_html(state["action_history"])) $(GeneralUtils.dict_to_string_html(state["action_history"]))
</your earlier actions> </assistant_action_history>
<error_note> <error_note>
$errornote $errornote
<error_note> <error_note>
@@ -284,14 +284,16 @@ function evaluator(state::T1, text2textInstructLLM::Function, llmFormatName::Str
usermsg = usermsg =
""" """
<internal_context_for_assistant> <internal_context_for_assistant>
$(state["context"]["table_schema"]) <table_schema>
$(state["context"]["table_schema"])
</table_schema>
<customer question>
$(state["chathistory"][2]["content"][1]["text"])
</customer question>
<assistant_action_history>
$(GeneralUtils.dict_to_string_html(state["action_history"]))
</assistant_action_history>
</internal_context_for_assistant> </internal_context_for_assistant>
<customer question>
$(state["chathistory"][2]["content"][1]["text"])
</customer question>
<trajectories>
$(GeneralUtils.dict_to_string_html(state["action_history"]))
</trajectories>
""" """
msg = Dict( msg = Dict(
+2 -2
View File
@@ -502,7 +502,7 @@ function SQLexecution(executeSQL::Function, sql::T
tablesize = size(df) tablesize = size(df)
row, column = tablesize row, column = tablesize
if row == 0 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 elseif column > 30
return (result_str="There are more than 30 columns. Please be more specific.", result_raw=df, success=true, errormsg=nothing) return (result_str="There are more than 30 columns. Please be more specific.", result_raw=df, success=true, errormsg=nothing)
else else
@@ -545,7 +545,7 @@ end
- `result::String` - `result::String`
# Signature # Signature
""" #WORKING """ #PENDING
function extractContent_dataframe(df::DataFrame, text2textInstructLLM::Function, action::String, function extractContent_dataframe(df::DataFrame, text2textInstructLLM::Function, action::String,
llmFormatName::String llmFormatName::String
)::String )::String