This commit is contained in:
narawat lamaiin
2024-04-15 21:05:30 +07:00
parent 4cb2353213
commit 45a1d93bc7
2 changed files with 49 additions and 26 deletions

View File

@@ -1,6 +1,6 @@
module interface
export addNewMessage
export add_new_message
using JSON3, DataStructures, Dates, UUIDs, HTTP, Random
using GeneralUtils
@@ -47,7 +47,7 @@ using ..type, ..util, ..llmfunction
Return\n
-----
message left
nothing
Example\n
-----
@@ -72,13 +72,13 @@ using ..type, ..util, ..llmfunction
msgMeta,
agentConfig,
)
julia> YiemAgent.addNewMessage(a, "user", "hello")
julia> YiemAgent.add_new_message(a, "user", "hello")
```
Signature\n
-----
""" #WORKING
function addNewMessage(a::T1, role::String, text::T2;
"""
function add_new_message(a::T1, role::String, text::T2;
maximumMsg::Integer=20) where {T1<:agent, T2<:AbstractString}
if role ["system", "user", "assistant"] # guard against typo
error("role is not in agent.availableRole $(@__LINE__)")