update
This commit is contained in:
@@ -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")
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user