This commit is contained in:
narawat lamaiin
2024-06-24 19:42:20 +07:00
parent 7dab20df41
commit 21e48c31ca
3 changed files with 33 additions and 39 deletions

View File

@@ -3,19 +3,17 @@ using FormatCorrector
incorrectjson = " \"explain\": \"The user is asking about wines that are suitable for pairing with lamb. I need to explore the database to find relevant information.\",\n \"plan\":\n 1) List all tables in the database using the function `listalltables` to get an idea of what data is available.\n \"action\": {\"name\": \"listalltables\", \"input\": null},\n \"expectation\": The list of all tables in the database,\n \"observation\": null\n}"
context = Dict(
:expectedJsonExample=>
"""
Here is an expected JSON format:
{
"explain": ...,
"plan": ...,
"action": {"name": ..., "input": ...},
"expectation": ...,
"observation": ...
}
"""
)
context =
"""
Here is an expected JSON format:
{
"explain": ...,
"plan": ...,
"action": {"name": ..., "input": ...},
"expectation": ...,
"observation": ...
}
"""
config = Dict(
:mqttServerInfo => Dict(
@@ -34,12 +32,7 @@ config = Dict(
result = FormatCorrector.jsoncorrection(config, incorrectjson, context)
println("done")