This commit is contained in:
2024-01-13 04:37:05 +00:00
parent 5e7234a304
commit 2ed71dade2
4 changed files with 74 additions and 19 deletions

View File

@@ -1,8 +1,8 @@
# This file is machine-generated - editing it directly is not advised
julia_version = "1.9.4"
julia_version = "1.10.0"
manifest_format = "2.0"
project_hash = "b23a59551d194bc84b0faf94c230717f9d7b23c8"
project_hash = "f50669eb396930635cc23f4185cc7ad08cee3c08"
[[deps.AbstractFFTs]]
deps = ["LinearAlgebra"]
@@ -181,7 +181,7 @@ weakdeps = ["Dates", "LinearAlgebra"]
[[deps.CompilerSupportLibraries_jll]]
deps = ["Artifacts", "Libdl"]
uuid = "e66e0078-7015-5450-92f7-15fbd957f2ae"
version = "1.0.5+0"
version = "1.0.5+1"
[[deps.CompositionsBase]]
git-tree-sha1 = "802bb88cd69dfd1509f6670416bd4434015693ad"
@@ -547,9 +547,14 @@ uuid = "deac9b47-8bc7-5906-a0fe-35ac56dc84c0"
version = "8.4.0+0"
[[deps.LibGit2]]
deps = ["Base64", "NetworkOptions", "Printf", "SHA"]
deps = ["Base64", "LibGit2_jll", "NetworkOptions", "Printf", "SHA"]
uuid = "76f85450-5226-5b5a-8eaa-529ad045b433"
[[deps.LibGit2_jll]]
deps = ["Artifacts", "LibSSH2_jll", "Libdl", "MbedTLS_jll"]
uuid = "e37daf67-58a4-590a-8e99-b0245dd2ffc5"
version = "1.6.4+0"
[[deps.LibSSH2_jll]]
deps = ["Artifacts", "Libdl", "MbedTLS_jll"]
uuid = "29816b5a-b9ab-546f-933c-edad1886dfa8"
@@ -617,7 +622,7 @@ version = "1.1.8"
[[deps.MbedTLS_jll]]
deps = ["Artifacts", "Libdl"]
uuid = "c8ffd9c3-330d-5841-b78e-0817d7145fa1"
version = "2.28.2+0"
version = "2.28.2+1"
[[deps.MicroCollections]]
deps = ["BangBang", "InitialValues", "Setfield"]
@@ -648,7 +653,7 @@ version = "0.4.1"
[[deps.MozillaCACerts_jll]]
uuid = "14a3606d-f60d-562e-9121-12d972cd8159"
version = "2022.10.11"
version = "2023.1.10"
[[deps.NNlib]]
deps = ["Adapt", "Atomix", "ChainRulesCore", "GPUArraysCore", "KernelAbstractions", "LinearAlgebra", "Pkg", "Random", "Requires", "Statistics"]
@@ -705,12 +710,12 @@ version = "0.2.4"
[[deps.OpenBLAS_jll]]
deps = ["Artifacts", "CompilerSupportLibraries_jll", "Libdl"]
uuid = "4536629a-c528-5b80-bd46-f80d51c5b363"
version = "0.3.21+4"
version = "0.3.23+2"
[[deps.OpenLibm_jll]]
deps = ["Artifacts", "Libdl"]
uuid = "05823500-19ac-5b8b-9628-191a04bc5112"
version = "0.8.1+0"
version = "0.8.1+2"
[[deps.OpenSSL]]
deps = ["BitFlags", "Dates", "MozillaCACerts_jll", "OpenSSL_jll", "Sockets"]
@@ -762,7 +767,7 @@ version = "1.3.0"
[[deps.Pkg]]
deps = ["Artifacts", "Dates", "Downloads", "FileWatching", "LibGit2", "Libdl", "Logging", "Markdown", "Printf", "REPL", "Random", "SHA", "Serialization", "TOML", "Tar", "UUIDs", "p7zip_jll"]
uuid = "44cfe95a-1eb2-52ea-b672-e2afdf69b78f"
version = "1.9.2"
version = "1.10.0"
[[deps.PooledArrays]]
deps = ["DataAPI", "Future"]
@@ -820,7 +825,7 @@ deps = ["InteractiveUtils", "Markdown", "Sockets", "Unicode"]
uuid = "3fa0cd96-eef1-5676-8a61-b3b8758bbffb"
[[deps.Random]]
deps = ["SHA", "Serialization"]
deps = ["SHA"]
uuid = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c"
[[deps.Random123]]
@@ -923,6 +928,7 @@ version = "1.2.0"
[[deps.SparseArrays]]
deps = ["Libdl", "LinearAlgebra", "Random", "Serialization", "SuiteSparse_jll"]
uuid = "2f01184e-e22b-5df5-ae63-d93ebab69eaf"
version = "1.10.0"
[[deps.SparseInverseSubset]]
deps = ["LinearAlgebra", "SparseArrays", "SuiteSparse"]
@@ -964,7 +970,7 @@ version = "1.4.2"
[[deps.Statistics]]
deps = ["LinearAlgebra", "SparseArrays"]
uuid = "10745b16-79ce-11e8-11f9-7d13ad32a3b2"
version = "1.9.0"
version = "1.10.0"
[[deps.StatsAPI]]
deps = ["LinearAlgebra"]
@@ -1015,9 +1021,9 @@ deps = ["Libdl", "LinearAlgebra", "Serialization", "SparseArrays"]
uuid = "4607b0f0-06f3-5cda-b6b1-a6196a1729e9"
[[deps.SuiteSparse_jll]]
deps = ["Artifacts", "Libdl", "Pkg", "libblastrampoline_jll"]
deps = ["Artifacts", "Libdl", "libblastrampoline_jll"]
uuid = "bea87d4a-7f5b-5778-9afe-8cc45184846c"
version = "5.10.1+6"
version = "7.2.1+1"
[[deps.TOML]]
deps = ["Dates"]
@@ -1111,7 +1117,7 @@ version = "1.0.0"
[[deps.Zlib_jll]]
deps = ["Libdl"]
uuid = "83775a58-1f1d-513f-b197-d71354ab007a"
version = "1.2.13+0"
version = "1.2.13+1"
[[deps.Zygote]]
deps = ["AbstractFFTs", "ChainRules", "ChainRulesCore", "DiffRules", "Distributed", "FillArrays", "ForwardDiff", "GPUArrays", "GPUArraysCore", "IRTools", "InteractiveUtils", "LinearAlgebra", "LogExpFunctions", "MacroTools", "NaNMath", "PrecompileTools", "Random", "Requires", "SparseArrays", "SpecialFunctions", "Statistics", "ZygoteRules"]
@@ -1138,7 +1144,7 @@ version = "0.2.4"
[[deps.libblastrampoline_jll]]
deps = ["Artifacts", "Libdl"]
uuid = "8e850b90-86db-534c-a0d3-1478176c7d93"
version = "5.8.0+0"
version = "5.8.0+1"
[[deps.micromamba_jll]]
deps = ["Artifacts", "JLLWrappers", "LazyArtifacts", "Libdl"]
@@ -1154,4 +1160,4 @@ version = "1.52.0+1"
[[deps.p7zip_jll]]
deps = ["Artifacts", "Libdl"]
uuid = "3f19e933-33d8-53b3-aaab-bd5110c3b7a0"
version = "17.4.0+0"
version = "17.4.0+2"

View File

@@ -12,4 +12,5 @@ GeneralUtils = "c6c72f09-b708-4ac8-ac7c-2084d70108fe"
HTTP = "cd3eb016-35fb-5094-929b-558a96fad6f3"
JSON3 = "0f8b85d8-7281-11e9-16c2-39a750bddbf1"
PythonCall = "6099a3de-0909-46bc-b1f4-468b9a2dfc0d"
URIs = "5c2747f8-b7ea-4ff2-ba2e-563bfd36b1d4"
UUIDs = "cf7118a7-6976-5b1a-9a39-7adc72f591a4"

View File

@@ -529,7 +529,7 @@ function actor_mistral_openorca(a::agentReflex, selfaware=nothing)
"Answer:", "Conclusion:", "Summary:"]
response = replaceHeaders(response, headerToDetect, latestTask)
println("")
@show actor_response_1 = response
headerToDetect = ["Plan $(a.attempt):",
"Thought $latestTask:",
"Act $latestTask:",
@@ -541,7 +541,7 @@ function actor_mistral_openorca(a::agentReflex, selfaware=nothing)
chunkedtext = delete!(chunkedtext, "Self-awareness $latestTask")
act = GeneralUtils.getStringBetweenCharacters(response, '{', '}', endCharLocation="end")
println("")
@show actor_response_2 = act
@show actor_response_1 = act
act = Dict(JSON3.read(act))
chunkedtext["Act $latestTask:"] = toolname

View File

@@ -2,7 +2,7 @@ module llmfunction
export wikisearch, winestock
using HTTP, JSON3
using HTTP, JSON3, URIs
using GeneralUtils
using ..type, ..utils
#------------------------------------------------------------------------------------------------100
@@ -116,7 +116,55 @@ end
"""
function winestockDB(a::agentReflex, query::T) where {T<:AbstractString}
@show query
prompt =
"""
<|system|>
<About yourself>
Your are a helpful assistant.
</About yourself>
<You have the following wine classification info>
Intensity level:
intensity = 1, light bodied
intensity = 2, light-medium bodied
intensity = 3, medium bodied
intensity = 4, medium-full bodied
intensity = 5, full bodied
Sweetness level:
sweetness = 1, dry
sweetness = 2, off-dry
sweetness = 3, semi-sweet
sweetness = 4, sweet
sweetness = 5, very sweet
Tannin level:
tannin = 1, low tannin
tannin = 2, low-medium tannin
tannin = 3, medium tannin
tannin = 4, medium-high tannin
tannin = 5, high tannin
Acidity level:
acidity = 1, low acidity
acidity = 2, low-medium acidity
acidity = 3, medium acidity
acidity = 4, medium-high acidity
acidity = 5, high acidity
</You have the following wine classification info>
<Your job>
Write SQL command using data from query.
</Your job>
<Example 1>
query: "{\"winestock\": {\"wine type\": \"white\", \"wine characteristics\": \"full-bodied | off-dry | low acidity | medium tannin\", \"price\": {\"max\": \"50\"}}}"
assistant: SELECT * FROM White WHERE intensity = 5 AND sweetness = 2 AND acidity = 1 AND tannin = 3 AND price <= 50;
</Example 1>
</s>
<|query|>
query: $query
</s>
<|assistant|>
"""
response = sendReceivePrompt(a, prompt, max_tokens=1024, temperature=0.4,
stopword=["/n/n", "END", "End", "Obs", "<|", "</"])
error("winestockDB done")