Compare commits
10 Commits
v0.6.0
..
4610137f04
| Author | SHA1 | Date | |
|---|---|---|---|
| 4610137f04 | |||
| 9d7eed7cde | |||
| aedc53bf86 | |||
| 286da3cf2c | |||
| 7fa988313d | |||
| e5b19dd268 | |||
| 0df4159261 | |||
| 45e8ded111 | |||
| 9167ece0c0 | |||
| f45a036971 |
+1
-1
@@ -1,6 +1,6 @@
|
|||||||
name = "YiemAgent"
|
name = "YiemAgent"
|
||||||
uuid = "e012c34b-7f78-48e0-971c-7abb83b6f0a2"
|
uuid = "e012c34b-7f78-48e0-971c-7abb83b6f0a2"
|
||||||
version = "0.6.0"
|
version = "0.6.3"
|
||||||
authors = ["narawat lamaiin <narawat@outlook.com>"]
|
authors = ["narawat lamaiin <narawat@outlook.com>"]
|
||||||
|
|
||||||
[deps]
|
[deps]
|
||||||
|
|||||||
+1
-1
@@ -474,7 +474,7 @@ function think(a::T)::NamedTuple{(:thoughtdict, :result_raw), Tuple{OrderedDict,
|
|||||||
|
|
||||||
elseif thoughtdict["action_name"] == "SEARCH_WINE_DATABASE"
|
elseif thoughtdict["action_name"] == "SEARCH_WINE_DATABASE"
|
||||||
@info "YiemAgent think() 5 " @__LINE__
|
@info "YiemAgent think() 5 " @__LINE__
|
||||||
thoughtdict, result_raw = search_wine_database!(a, thoughtdict; useSQLLLM=true)
|
thoughtdict, result_raw = search_wine_database!(a, thoughtdict; useSQLLLM=false)
|
||||||
#WORKING result_raw will be a df. i need to get images so i can send to frontend
|
#WORKING result_raw will be a df. i need to get images so i can send to frontend
|
||||||
else
|
else
|
||||||
@info "YiemAgent think() 6 " @__LINE__
|
@info "YiemAgent think() 6 " @__LINE__
|
||||||
|
|||||||
+6
-12
@@ -517,13 +517,13 @@ function generatesql(a::T, searchterm::String,
|
|||||||
requiredKeys = ["plan", "action_name", "action_input"]
|
requiredKeys = ["plan", "action_name", "action_input"]
|
||||||
errornote = ""
|
errornote = ""
|
||||||
# provide similar sql only for the first attempt
|
# provide similar sql only for the first attempt
|
||||||
sql, distance = a.context.similarSQLVectorDB(searchterm)
|
# sql, distance = a.context.similarSQLVectorDB(searchterm)
|
||||||
|
|
||||||
similarSQL_ = sql !== nothing ? sql : "None"
|
# similarSQL_ = sql !== nothing ? sql : "None"
|
||||||
# if sql is really close, just use it
|
# # if sql is really close, just use it
|
||||||
if similarSQL_ != "None" && distance <= 0.1
|
# if similarSQL_ != "None" && distance <= 0.1
|
||||||
return similarSQL_
|
# return similarSQL_
|
||||||
end
|
# end
|
||||||
|
|
||||||
#CHANGE use find_related_tables_for_user_question and inject only related table schema instead
|
#CHANGE use find_related_tables_for_user_question and inject only related table schema instead
|
||||||
# of hard code table schema. CPU embedding is too slow. use embedding service on GPU.
|
# of hard code table schema. CPU embedding is too slow. use embedding service on GPU.
|
||||||
@@ -541,12 +541,6 @@ function generatesql(a::T, searchterm::String,
|
|||||||
<database_table_schema>
|
<database_table_schema>
|
||||||
$table_schema
|
$table_schema
|
||||||
</database_table_schema>
|
</database_table_schema>
|
||||||
<possible SQL for user's search term>
|
|
||||||
$similarSQL_
|
|
||||||
</possible SQL for user's search term>
|
|
||||||
<error_note>
|
|
||||||
$errornote
|
|
||||||
<error_note>
|
|
||||||
</internal_context_for_assistant>
|
</internal_context_for_assistant>
|
||||||
"""
|
"""
|
||||||
input = context * searchterm
|
input = context * searchterm
|
||||||
|
|||||||
Reference in New Issue
Block a user