update
This commit is contained in:
@@ -728,9 +728,9 @@ julia>
|
||||
|
||||
# Signature
|
||||
"""
|
||||
function jsoncorrection(a::T1, input::T2, correctJsonExample::T3;
|
||||
function jsoncorrection(config::T1, input::T2, correctJsonExample::T3;
|
||||
maxattempt::Integer=3
|
||||
) where {T1<:agent, T2<:AbstractString, T3<:AbstractString}
|
||||
) where {T1<:AbstractDict, T2<:AbstractString, T3<:AbstractString}
|
||||
|
||||
incorrectjson = deepcopy(input)
|
||||
correctjson = nothing
|
||||
@@ -762,7 +762,7 @@ function jsoncorrection(a::T1, input::T2, correctJsonExample::T3;
|
||||
"""
|
||||
|
||||
# apply LLM specific instruct format
|
||||
externalService = a.config[:externalservice][:text2textinstruct]
|
||||
externalService = config[:externalservice][:text2textinstruct]
|
||||
llminfo = externalService[:llminfo]
|
||||
prompt =
|
||||
if llminfo[:name] == "llama3instruct"
|
||||
@@ -775,10 +775,10 @@ function jsoncorrection(a::T1, input::T2, correctJsonExample::T3;
|
||||
msgMeta = GeneralUtils.generate_msgMeta(
|
||||
externalService[:mqtttopic],
|
||||
senderName= "jsoncorrection",
|
||||
senderId= a.id,
|
||||
senderId= string(uuid4()),
|
||||
receiverName= "text2textinstruct",
|
||||
mqttBroker= a.config[:mqttServerInfo][:broker],
|
||||
mqttBrokerPort= a.config[:mqttServerInfo][:port],
|
||||
mqttBroker= config[:mqttServerInfo][:broker],
|
||||
mqttBrokerPort= config[:mqttServerInfo][:port],
|
||||
)
|
||||
|
||||
outgoingMsg = Dict(
|
||||
|
||||
Reference in New Issue
Block a user