update
This commit is contained in:
420
src/interface.jl
420
src/interface.jl
@@ -341,21 +341,21 @@ function decisionMaker(a::T; recent::Integer=5)::Dict{Symbol, Any} where {T<:age
|
||||
response = a.text2textInstructLLM(prompt)
|
||||
responsedict = GeneralUtils.textToDict(response,
|
||||
["Understanding", "Reasoning", "Plan", "Action_name", "Action_input", "Mentioning_wine"],
|
||||
rightmarker=":", symbolkey=true)
|
||||
rightmarker=":", symbolkey=true, lowercasekey=true)
|
||||
|
||||
if responsedict[:Action_name] ∉ ["CHATBOX", "PRESENTBOX", "CHECKINVENTORY", "ENDCONVERSATION"]
|
||||
if responsedict[:action_name] ∉ ["CHATBOX", "PRESENTBOX", "CHECKINVENTORY", "ENDCONVERSATION"]
|
||||
errornote = "You must use the given functions"
|
||||
error("You must use the given functions ", @__FILE__, " ", @__LINE__)
|
||||
end
|
||||
|
||||
for i ∈ [:Understanding, :Plan, :Action_name]
|
||||
for i ∈ [:understanding, :plan, :action_name]
|
||||
if length(responsedict[i]) == 0
|
||||
error("$i is empty ", @__FILE__, " ", @__LINE__)
|
||||
end
|
||||
end
|
||||
|
||||
# check if there are more than 1 key per categories
|
||||
for i ∈ [:Understanding, :Plan, :Action_name, :Action_input, :Mentioning_wine]
|
||||
for i ∈ [:understanding, :plan, :action_name, :action_input, :mentioning_wine]
|
||||
matchkeys = GeneralUtils.findMatchingDictKey(responsedict, i)
|
||||
if length(matchkeys) > 1
|
||||
error("DecisionMaker has more than one key per categories")
|
||||
@@ -368,13 +368,13 @@ function decisionMaker(a::T; recent::Integer=5)::Dict{Symbol, Any} where {T<:age
|
||||
|
||||
# check if LLM recommend wine before checking inventory
|
||||
isMemEmpty = isempty(a.memory[:shortmem])
|
||||
if occursin("Yes", responsedict[:Mentioning_wine]) && isMemEmpty &&
|
||||
responsedict[:Action_name] != "CHECKINVENTORY"
|
||||
if occursin("Yes", responsedict[:mentioning_wine]) && isMemEmpty &&
|
||||
responsedict[:action_name] != "CHECKINVENTORY"
|
||||
|
||||
errornote = "Note: You can't recommend wines yet. You must check your inventory before recommending wine to the user."
|
||||
error( "You can't recommend wines yet. You must check your inventory before recommending wines")
|
||||
elseif responsedict[:Action_name] == "PRESENTBOX" && isMemEmpty &&
|
||||
responsedict[:Action_name] != "CHECKINVENTORY"
|
||||
elseif responsedict[:action_name] == "PRESENTBOX" && isMemEmpty &&
|
||||
responsedict[:action_name] != "CHECKINVENTORY"
|
||||
|
||||
errornote = "Note: You can't recommend wines yet. You must check your inventory before recommending wine to the user."
|
||||
error( "You can't recommend wines yet. You must check your inventory before recommending wines")
|
||||
@@ -382,7 +382,7 @@ function decisionMaker(a::T; recent::Integer=5)::Dict{Symbol, Any} where {T<:age
|
||||
errornote = ""
|
||||
end
|
||||
|
||||
delete!(responsedict, :Mentioning_wine)
|
||||
delete!(responsedict, :mentioning_wine)
|
||||
|
||||
return responsedict
|
||||
catch e
|
||||
@@ -903,23 +903,6 @@ function conversation(a::T, userinput::Dict) where {T<:agent}
|
||||
# thought will be added to chat model via context
|
||||
chatresponse = generatechat(a.memory, a.chathistory, a.text2textInstructLLM)
|
||||
|
||||
# some time LLM said to user that it (checking inventory) but it is not.
|
||||
# if chatresponse want to check inventory but think() didn't checkinventory then do it
|
||||
llmCheckInv = occursin("(check", chatresponse) || occursin("*check", chatresponse) ||
|
||||
occursin("inventory)", chatresponse) || occursin("inventory*", chatresponse)
|
||||
|
||||
if llmCheckInv && actionname != "checkinventory"
|
||||
error("force check inventory should not be called")
|
||||
actionname, result = forceInventoryCheck(a)
|
||||
push!(a.memory[:shortmem], Dict(Symbol(actionname)=> result))
|
||||
|
||||
# generate chatresponse again because we have force inventory check
|
||||
chatresponse = generatechat(a.memory, a.chathistory, a.text2textInstructLLM)
|
||||
else
|
||||
# since chatresponse does not halucinate i.e. no (check inventory), it does not need
|
||||
# to regenerate again and con be use directly
|
||||
end
|
||||
|
||||
addNewMessage(a, "assistant", chatresponse)
|
||||
|
||||
push!(a.memory[:events],
|
||||
@@ -954,22 +937,11 @@ function think(a::T)::NamedTuple{(:actionname, :result), Tuple{String, String}}
|
||||
|
||||
a.memory[:recap] = generateSituationReport(a, a.text2textInstructLLM; skiprecent=5)
|
||||
a.memory[:QandA] = generatequestion(a, a.text2textInstructLLM; recent=5)
|
||||
|
||||
dummy = situationtrack(a, a.text2textInstructLLM)
|
||||
|
||||
# after the user selected their wine. No question should be asked
|
||||
# a.memory[:QandA] =
|
||||
# if occursin("None", a.memory[:sitrep][:wine_selected])
|
||||
# generatequestion(a, a.text2textInstructLLM)
|
||||
# else
|
||||
# generatequestion(a, a.text2textInstructLLM) #[PENDING] to be removed. this is just for explor
|
||||
# "None"
|
||||
# end
|
||||
|
||||
thoughtDict = decisionMaker(a; recent=5)
|
||||
|
||||
actionname = thoughtDict[:Action_name]
|
||||
actioninput = thoughtDict[:Action_input]
|
||||
actionname = thoughtDict[:action_name]
|
||||
actioninput = thoughtDict[:action_input]
|
||||
|
||||
# map action and input() to llm function
|
||||
response =
|
||||
@@ -1020,131 +992,6 @@ function think(a::T)::NamedTuple{(:actionname, :result), Tuple{String, String}}
|
||||
end
|
||||
|
||||
|
||||
""" Force to think and check inventory
|
||||
|
||||
"""
|
||||
function forceInventoryCheck(a::T)::NamedTuple{(:actionname, :result), Tuple{String, String}} where {T<:agent}
|
||||
println("--> forceInventoryCheck()")
|
||||
thoughtDict = thinkCheckInventory(a)
|
||||
actionname = thoughtDict[:Action_name]
|
||||
actioninput = thoughtDict[:Action_input]
|
||||
|
||||
# map action and input() to llm function
|
||||
response =
|
||||
if actionname == "CHECKINVENTORY"
|
||||
checkinventory(a, actioninput)
|
||||
else
|
||||
error("undefined LLM function. Requesting $actionname")
|
||||
end
|
||||
|
||||
# this section allow LLM functions above to have different return values.
|
||||
result = haskey(response, :result) ? response[:result] : nothing
|
||||
select = haskey(response, :select) ? response[:select] : nothing
|
||||
reward::Integer = haskey(response, :reward) ? response[:reward] : 0
|
||||
isterminal::Bool = haskey(response, :isterminal) ? response[:isterminal] : false
|
||||
errormsg::Union{AbstractString, Nothing} = haskey(response, :errormsg) ? response[:errormsg] : nothing
|
||||
success::Bool = haskey(response, :success) ? response[:success] : false
|
||||
|
||||
return (actionname=actionname, result=result)
|
||||
end
|
||||
|
||||
|
||||
|
||||
|
||||
function thinkCheckInventory(a::T)::Dict{Symbol, Any} where {T<:agent}
|
||||
|
||||
systemmsg =
|
||||
"""
|
||||
You are a helpful sommelier working for a wine store.
|
||||
Your task is to help the user choose the best wine that match the user preferences from your inventory.
|
||||
|
||||
Definitions:
|
||||
- observation: result of the preceding immediate action.
|
||||
|
||||
At each round of conversation, the user will give you the current situation:
|
||||
Context: ...
|
||||
Your earlier conversation with the user: ...
|
||||
|
||||
You must follow the following guidelines:
|
||||
- Check inventory immediately based on what you know about the user.
|
||||
|
||||
You should then respond to the user with interleaving Thought, Plan, Action and Observation:
|
||||
- thought:
|
||||
1) State your reasoning about the current situation.
|
||||
- plan: Based on the current situation, state a complete plan to complete the task. Be specific.
|
||||
- action_name (Must be aligned with your plan): Can be one of the following functions:
|
||||
1) CHECKINVENTORY[query], which you can use to check info about wine in your inventory. "query" is a search term in verbal English.
|
||||
Good query example: black car with a stereo, 200 mile range and an electric motor.
|
||||
Good query example: How many car brand are from Asia?
|
||||
- Action_input: input to the action
|
||||
|
||||
You should only respond in format as described below:
|
||||
thought: ...
|
||||
plan: ...
|
||||
action_name: ...
|
||||
action_input: ...
|
||||
|
||||
Let's begin!
|
||||
"""
|
||||
|
||||
usermsg =
|
||||
"""
|
||||
Context: None
|
||||
Your earlier conversation with the user: $(vectorOfDictToText(a.chathistory))
|
||||
"""
|
||||
|
||||
_prompt =
|
||||
[
|
||||
Dict(:name=> "system", :text=> systemmsg),
|
||||
Dict(:name=> "user", :text=> usermsg)
|
||||
]
|
||||
|
||||
# put in model format
|
||||
prompt = GeneralUtils.formatLLMtext(_prompt; formatname="llama3instruct")
|
||||
prompt *=
|
||||
"""
|
||||
<|start_header_id|>assistant<|end_header_id|>
|
||||
"""
|
||||
response = nothing # store for show when error msg show up
|
||||
for attempt in 1:10
|
||||
try
|
||||
response = a.text2textInstructLLM(prompt)
|
||||
responsedict = GeneralUtils.textToDict(response,
|
||||
["thought", "plan", "action_name", "action_input"],
|
||||
rightmarker=":", symbolkey=true)
|
||||
|
||||
if responsedict[:action_name] ∉ ["CHECKINVENTORY"]
|
||||
error("decisionMaker didn't use the given functions ", @__LINE__)
|
||||
end
|
||||
|
||||
for i ∈ [:thought, :plan, :action_name]
|
||||
if length(JSON3.write(responsedict[i])) == 0
|
||||
error("$i is empty ", @__LINE__)
|
||||
end
|
||||
end
|
||||
|
||||
# check if there are more than 1 key per categories
|
||||
for i ∈ [:thought, :plan, :action_name, :action_input]
|
||||
matchkeys = GeneralUtils.findMatchingDictKey(responsedict, i)
|
||||
if length(matchkeys) > 1
|
||||
error("DecisionMaker has more than one key per categories")
|
||||
end
|
||||
end
|
||||
|
||||
return responsedict
|
||||
catch e
|
||||
io = IOBuffer()
|
||||
showerror(io, e)
|
||||
errorMsg = String(take!(io))
|
||||
st = sprint((io, v) -> show(io, "text/plain", v), stacktrace(catch_backtrace()))
|
||||
println("")
|
||||
println("Attempt $attempt. Error occurred: $errorMsg\n$st")
|
||||
println("")
|
||||
end
|
||||
end
|
||||
error("DecisionMaker failed to generate a thought ", response)
|
||||
end
|
||||
|
||||
|
||||
"""
|
||||
|
||||
@@ -1202,7 +1049,7 @@ function generatechat(memory::Dict, chathistory::Vector, text2textInstructLLM::F
|
||||
"""
|
||||
|
||||
context =
|
||||
if length(memory[:shortmem]) > 0 #[WORKING] add with number order 1), 2)
|
||||
if length(memory[:shortmem]) > 0
|
||||
vectorOfDictToText(memory[:shortmem], withkey=false)
|
||||
else
|
||||
""
|
||||
@@ -1237,7 +1084,7 @@ function generatechat(memory::Dict, chathistory::Vector, text2textInstructLLM::F
|
||||
try
|
||||
response = text2textInstructLLM(prompt)
|
||||
responsedict = GeneralUtils.textToDict(response,["Mentioning_wine", "Chat"],
|
||||
rightmarker=":", symbolkey=true)
|
||||
rightmarker=":", symbolkey=true, lowercasekey=true)
|
||||
|
||||
for i ∈ [:Chat]
|
||||
if length(JSON3.write(responsedict[i])) == 0
|
||||
@@ -1264,7 +1111,12 @@ function generatechat(memory::Dict, chathistory::Vector, text2textInstructLLM::F
|
||||
|
||||
# check if LLM recommend wine before checking inventory
|
||||
isMemEmpty = isempty(memory[:shortmem])
|
||||
if occursin("Yes", responsedict[:Mentioning_wine]) && isMemEmpty
|
||||
if occursin("Yes", responsedict[:mentioning_wine]) && isMemEmpty
|
||||
errornote = "Note: You can't recommend wines yet. You must check your inventory before recommending wine to the user."
|
||||
error( "You must check your inventory before recommending wine")
|
||||
elseif occursin("(check", chatresponse) || occursin("*check", chatresponse) ||
|
||||
occursin("inventory)", chatresponse) || occursin("inventory*", chatresponse)
|
||||
|
||||
errornote = "Note: You can't recommend wines yet. You must check your inventory before recommending wine to the user."
|
||||
error( "You must check your inventory before recommending wine")
|
||||
else
|
||||
@@ -1272,7 +1124,7 @@ function generatechat(memory::Dict, chathistory::Vector, text2textInstructLLM::F
|
||||
end
|
||||
|
||||
memory[:CHATBOX] = "" # delete content because it no longer used.
|
||||
delete!(responsedict, :Mentioning_wine)
|
||||
delete!(responsedict, :mentioning_wine)
|
||||
result = responsedict[:Chat]
|
||||
|
||||
return result
|
||||
@@ -1452,7 +1304,7 @@ function generatequestion(a, text2textInstructLLM::Function; recent=nothing)::St
|
||||
# response = string(split(response, "Please")[1]) # LLM usually add comments which is no need.
|
||||
responsedict = GeneralUtils.textToDict(response,
|
||||
["Understanding", "Q1", "Note"],
|
||||
rightmarker=":", symbolkey=true)
|
||||
rightmarker=":", symbolkey=true, lowercasekey=true)
|
||||
response = "Q1: " * responsedict[:Q1]
|
||||
println("--> generatequestion ", @__FILE__, " ", @__LINE__)
|
||||
pprintln(response)
|
||||
@@ -1739,144 +1591,144 @@ end
|
||||
|
||||
|
||||
|
||||
function situationtrack(a, text2textInstructLLM::Function)::String
|
||||
# function situationtrack(a, text2textInstructLLM::Function)::String
|
||||
|
||||
systemmsg =
|
||||
"""
|
||||
You are a helpful assistant acting as a polite, website-based sommelier for an online wine store.
|
||||
# systemmsg =
|
||||
# """
|
||||
# You are a helpful assistant acting as a polite, website-based sommelier for an online wine store.
|
||||
|
||||
Sommelier's general workflow includes:
|
||||
1) Greet the user and introduce yourself.
|
||||
2) Understand the user's needs.
|
||||
3) Looking for the wines that match user's needs in the database.
|
||||
4) Introduce the wines to the user.
|
||||
5) Thanks the user when they are done choosing wines and invite them to comeback next time.
|
||||
# Sommelier's general workflow includes:
|
||||
# 1) Greet the user and introduce yourself.
|
||||
# 2) Understand the user's needs.
|
||||
# 3) Looking for the wines that match user's needs in the database.
|
||||
# 4) Introduce the wines to the user.
|
||||
# 5) Thanks the user when they are done choosing wines and invite them to comeback next time.
|
||||
|
||||
Your goal includes:
|
||||
1) Help the user select the best wines from your inventory that align with the user's preferences.
|
||||
# Your goal includes:
|
||||
# 1) Help the user select the best wines from your inventory that align with the user's preferences.
|
||||
|
||||
Your responsibility includes:
|
||||
1) Ask yourself specifically about how you are progressing towards the goal.
|
||||
# Your responsibility includes:
|
||||
# 1) Ask yourself specifically about how you are progressing towards the goal.
|
||||
|
||||
At each round of conversation, you will be given the current situation:
|
||||
Your conversation with the user: ...
|
||||
Context: ...
|
||||
# At each round of conversation, you will be given the current situation:
|
||||
# Your conversation with the user: ...
|
||||
# Context: ...
|
||||
|
||||
You must follow the following guidelines:
|
||||
- Your question should be specific, self-contained and not require any additional context.
|
||||
- Do not generate any question or comments at the end.
|
||||
# You must follow the following guidelines:
|
||||
# - Your question should be specific, self-contained and not require any additional context.
|
||||
# - Do not generate any question or comments at the end.
|
||||
|
||||
You should follow the following guidelines:
|
||||
- Focus on the latest event.
|
||||
# You should follow the following guidelines:
|
||||
# - Focus on the latest event.
|
||||
|
||||
You should then respond to the user with:
|
||||
1) Understanding: State your understanding about the current situation
|
||||
2) Q: Given the situation, "ask yourself" at least five, but no more than ten, questions.
|
||||
3) A: Given the situation, "answer to yourself" the best you can
|
||||
4) Note: Additional info you want to say. Otherwise, "NA"
|
||||
# You should then respond to the user with:
|
||||
# 1) Understanding: State your understanding about the current situation
|
||||
# 2) Q: Given the situation, "ask yourself" at least five, but no more than ten, questions.
|
||||
# 3) A: Given the situation, "answer to yourself" the best you can
|
||||
# 4) Note: Additional info you want to say. Otherwise, "NA"
|
||||
|
||||
You must only respond in format as described below:
|
||||
Understanding: ...
|
||||
Q1: ...
|
||||
A1: ...
|
||||
Q2: ...
|
||||
A2: ...
|
||||
Q3: ...
|
||||
A3: ...
|
||||
...
|
||||
Note: ...
|
||||
# You must only respond in format as described below:
|
||||
# Understanding: ...
|
||||
# Q1: ...
|
||||
# A1: ...
|
||||
# Q2: ...
|
||||
# A2: ...
|
||||
# Q3: ...
|
||||
# A3: ...
|
||||
# ...
|
||||
# Note: ...
|
||||
|
||||
Here are some examples:
|
||||
Q: Where am I in the workflow?
|
||||
A: According to the situation, ...
|
||||
# Here are some examples:
|
||||
# Q: Where am I in the workflow?
|
||||
# A: According to the situation, ...
|
||||
|
||||
Q: Am I greeting the user and introducing myself?
|
||||
A: According to the situation, no.
|
||||
# Q: Am I greeting the user and introducing myself?
|
||||
# A: According to the situation, no.
|
||||
|
||||
Q: Did the user tell me what they like?
|
||||
A: According to the situation, no. We are just starting the conversation.
|
||||
# Q: Did the user tell me what they like?
|
||||
# A: According to the situation, no. We are just starting the conversation.
|
||||
|
||||
Q: What do I know about the user?
|
||||
A: According to the situation, …
|
||||
# Q: What do I know about the user?
|
||||
# A: According to the situation, …
|
||||
|
||||
Q: Have I searched the database yet?
|
||||
A: According to the situation, no. I need more information.
|
||||
# Q: Have I searched the database yet?
|
||||
# A: According to the situation, no. I need more information.
|
||||
|
||||
Q: Did I introduce the coffee blend varieties to the user yet?
|
||||
A: According to the situation, no, I didn't because I have not searched the database yet.
|
||||
# Q: Did I introduce the coffee blend varieties to the user yet?
|
||||
# A: According to the situation, no, I didn't because I have not searched the database yet.
|
||||
|
||||
Q: What did I find in the database?
|
||||
A: According to the situation, I found the following …
|
||||
# Q: What did I find in the database?
|
||||
# A: According to the situation, I found the following …
|
||||
|
||||
Let's begin!
|
||||
"""
|
||||
# Let's begin!
|
||||
# """
|
||||
|
||||
timeline = ""
|
||||
for (i, event) in enumerate(a.memory[:events])
|
||||
if event[:outcome] === nothing
|
||||
timeline *= "$i) $(event[:subject])> $(event[:action_or_dialogue])\n"
|
||||
else
|
||||
timeline *= "$i) $(event[:subject])> $(event[:action_or_dialogue]) $(event[:outcome])\n"
|
||||
end
|
||||
end
|
||||
# timeline = ""
|
||||
# for (i, event) in enumerate(a.memory[:events])
|
||||
# if event[:outcome] === nothing
|
||||
# timeline *= "$i) $(event[:subject])> $(event[:action_or_dialogue])\n"
|
||||
# else
|
||||
# timeline *= "$i) $(event[:subject])> $(event[:action_or_dialogue]) $(event[:outcome])\n"
|
||||
# end
|
||||
# end
|
||||
|
||||
context =
|
||||
if length(a.memory[:shortmem]) > 0
|
||||
vectorOfDictToText(a.memory[:shortmem], withkey=false)
|
||||
else
|
||||
""
|
||||
end
|
||||
chathistory = vectorOfDictToText(a.chathistory)
|
||||
errornote = ""
|
||||
response = nothing # store for show when error msg show up
|
||||
# context =
|
||||
# if length(a.memory[:shortmem]) > 0
|
||||
# vectorOfDictToText(a.memory[:shortmem], withkey=false)
|
||||
# else
|
||||
# ""
|
||||
# end
|
||||
# chathistory = vectorOfDictToText(a.chathistory)
|
||||
# errornote = ""
|
||||
# response = nothing # store for show when error msg show up
|
||||
|
||||
for attempt in 1:10
|
||||
usermsg =
|
||||
"""
|
||||
Events timeline: $timeline
|
||||
$context
|
||||
$errornote
|
||||
"""
|
||||
# for attempt in 1:10
|
||||
# usermsg =
|
||||
# """
|
||||
# Events timeline: $timeline
|
||||
# $context
|
||||
# $errornote
|
||||
# """
|
||||
|
||||
_prompt =
|
||||
[
|
||||
Dict(:name=> "system", :text=> systemmsg),
|
||||
Dict(:name=> "user", :text=> usermsg)
|
||||
]
|
||||
# _prompt =
|
||||
# [
|
||||
# Dict(:name=> "system", :text=> systemmsg),
|
||||
# Dict(:name=> "user", :text=> usermsg)
|
||||
# ]
|
||||
|
||||
# put in model format
|
||||
prompt = GeneralUtils.formatLLMtext(_prompt; formatname="llama3instruct")
|
||||
prompt *=
|
||||
"""
|
||||
<|start_header_id|>assistant<|end_header_id|>
|
||||
"""
|
||||
# # put in model format
|
||||
# prompt = GeneralUtils.formatLLMtext(_prompt; formatname="llama3instruct")
|
||||
# prompt *=
|
||||
# """
|
||||
# <|start_header_id|>assistant<|end_header_id|>
|
||||
# """
|
||||
|
||||
try
|
||||
response = text2textInstructLLM(prompt)
|
||||
q_number = count("Q", response)
|
||||
if q_number < 3
|
||||
error("too few questions only $q_number questions are generated ", @__FILE__, " ", @__LINE__)
|
||||
end
|
||||
# response = string(split(response, "Please")[1]) # LLM usually add comments which is no need.
|
||||
responsedict = GeneralUtils.textToDict(response,
|
||||
["Understanding", "Q1", "Note"],
|
||||
rightmarker=":", symbolkey=true)
|
||||
response = "Q1: " * responsedict[:Q1]
|
||||
println("--> situationtrack ", @__FILE__, " ", @__LINE__)
|
||||
pprintln(Dict(responsedict))
|
||||
return response
|
||||
catch e
|
||||
io = IOBuffer()
|
||||
showerror(io, e)
|
||||
errorMsg = String(take!(io))
|
||||
st = sprint((io, v) -> show(io, "text/plain", v), stacktrace(catch_backtrace()))
|
||||
println("")
|
||||
println("Attempt $attempt. Error occurred: $errorMsg\n$st")
|
||||
println("")
|
||||
end
|
||||
end
|
||||
error("situationtrack failed to generate a thought ", response)
|
||||
end
|
||||
# try
|
||||
# response = text2textInstructLLM(prompt)
|
||||
# q_number = count("Q", response)
|
||||
# if q_number < 3
|
||||
# error("too few questions only $q_number questions are generated ", @__FILE__, " ", @__LINE__)
|
||||
# end
|
||||
# # response = string(split(response, "Please")[1]) # LLM usually add comments which is no need.
|
||||
# responsedict = GeneralUtils.textToDict(response,
|
||||
# ["Understanding", "Q1", "Note"],
|
||||
# rightmarker=":", symbolkey=true)
|
||||
# response = "Q1: " * responsedict[:Q1]
|
||||
# println("--> situationtrack ", @__FILE__, " ", @__LINE__)
|
||||
# pprintln(Dict(responsedict))
|
||||
# return response
|
||||
# catch e
|
||||
# io = IOBuffer()
|
||||
# showerror(io, e)
|
||||
# errorMsg = String(take!(io))
|
||||
# st = sprint((io, v) -> show(io, "text/plain", v), stacktrace(catch_backtrace()))
|
||||
# println("")
|
||||
# println("Attempt $attempt. Error occurred: $errorMsg\n$st")
|
||||
# println("")
|
||||
# end
|
||||
# end
|
||||
# error("situationtrack failed to generate a thought ", response)
|
||||
# end
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user