This commit is contained in:
narawat lamaiin
2024-07-29 15:28:47 +07:00
parent 7e0f8fa6f0
commit 689bca3805
3 changed files with 30 additions and 31 deletions

View File

@@ -62,6 +62,9 @@ function text2textInstructLLM(prompt::String)
return response
end
# Instantiate an agent
a = YiemAgent.sommelier(
text2textInstructLLM,
@@ -70,22 +73,22 @@ end
id="testingSessionID", # agent instance id
)
function main()
userinput = "Hello, I would like a get a bottle of wine."
for i in 1:10
response = YiemAgent.conversation(a, Dict(:text=> userinput))
println("")
println("--> assistant response: \n", response)
println("")
println("--> user input:")
userinput = readline()
end
end
# function main()
# userinput = "Hello, I would like a get a bottle of wine."
# for i in 1:10
# response = YiemAgent.conversation(a, Dict(:text=> userinput))
# println("")
# println("--> assistant response: \n", response)
# println("")
# println("--> user input:")
# userinput = readline()
# end
# end
main()
# main()
# """
# I'm having a graduation party this evening. So I think a bottle of wine would be nice.
# I'm having a graduation party this evening. I have no budget limit.
# I have no idea. The party will be formal. What type of wine people usually get for this occasion?
# What about sparkling Rose?
@@ -116,7 +119,7 @@ main()
input = "query=\"medium-bodied dry white wine\""
result = YiemAgent.extractWineAttributes(a, input)