update
This commit is contained in:
44
src/util.jl
44
src/util.jl
@@ -1,6 +1,6 @@
|
||||
module util
|
||||
|
||||
export clearhistory, addNewMessage, formatLLMtext, syntaxcheck_json, iterativeprompting,
|
||||
export clearhistory, addNewMessage, formatLLMtext, iterativeprompting,
|
||||
formatLLMtext_llama3instruct, formatLLMtext_phi3instruct
|
||||
|
||||
using UUIDs, Dates, DataStructures, HTTP, MQTTClient, JSON3
|
||||
@@ -269,48 +269,6 @@ function formatLLMtext(messages::Vector{Dict{Symbol, T}},
|
||||
end
|
||||
|
||||
|
||||
|
||||
""" Check JSON format correctness and provide feedback
|
||||
|
||||
Arguments\n
|
||||
-----
|
||||
jsonstring::T
|
||||
|
||||
Return\n
|
||||
-----
|
||||
(correct, critique)
|
||||
|
||||
Example\n
|
||||
-----
|
||||
```jldoctest
|
||||
julia>
|
||||
```
|
||||
|
||||
TODO\n
|
||||
-----
|
||||
[] update docstring
|
||||
[PENDING] implement the function
|
||||
|
||||
Signature\n
|
||||
-----
|
||||
"""
|
||||
function syntaxcheck_json(jsonstring::T)::NamedTuple where {T<:AbstractString}
|
||||
error("--> syntaxcheck_json")
|
||||
success, result, errormsg, st = GeneralUtils.showstracktrace(JSON3.read, jsonstring)
|
||||
if !success # gives feedback
|
||||
|
||||
|
||||
|
||||
else
|
||||
|
||||
|
||||
end
|
||||
|
||||
|
||||
return (success, critique)
|
||||
end
|
||||
|
||||
|
||||
"""
|
||||
|
||||
Arguments\n
|
||||
|
||||
Reference in New Issue
Block a user