This commit is contained in:
narawat lamaiin
2024-04-29 21:47:31 +07:00
parent 3316ec4ecf
commit 6c3ef4414b
3 changed files with 74 additions and 62 deletions

View File

@@ -118,7 +118,7 @@ function decisionMaker(a::T1, state::T2)::String where {T1<:agent, T2<:AbstractD
"Thought_2": "reasoning",
...
"Thought_n": "reasoning",
"Action_1": {"action": "action to take", "input": "Action input"},
"Action_1": {"name": "action to take", "input": "Action input"},
"Observation_1": "result of the action"
}
@@ -128,13 +128,13 @@ function decisionMaker(a::T1, state::T2)::String where {T1<:agent, T2<:AbstractD
"Thought_1": "I have many cars in my inventory suitable for several usage scenarios.",
"Thought_2": "It would be better if I knew what the user intends to do with his car.",
"Thought_3": "I will ask the user what is the intended usecase",
"Action_1": {"action": "chatbox", "input": "What will you use it for?"}
"Action_1": {"name": "chatbox", "input": "What will you use it for?"}
}
{
"Question": "I'm looking for a sedan.",
"Thought_1": "I have many types of sedans in my inventory, each with diverse features.",
"Thought_2": "It would be easier to make a recommendation if I knew what feature the user is looking for. I should ask the user.",
"Action_1": {"action": "chatbox", "input": "Do you have any specific feature in mind?"}
"Action_1": {"name": "chatbox", "input": "Do you have any specific feature in mind?"}
}
$reflect
@@ -311,7 +311,7 @@ function conversation(a::T, userinput::Dict) where {T<:agent}
:storeinfo=> deepcopy(a.keywordinfo[:storeinfo]),
:thoughtHistory=> Dict{Symbol, Any}( # contain question, thought_1, action_1, observation_1, thought_2, ...
:question=> userinput[:text],
:Question=> userinput[:text],
)
)
bestplan = runMCTS(a, initialState, decisionMaker, stateValueEstimator, reflector,