update
This commit is contained in:
@@ -1,6 +1,6 @@
|
|||||||
module interface
|
module interface
|
||||||
|
|
||||||
export add_new_message
|
export addNewMessage
|
||||||
|
|
||||||
using JSON3, DataStructures, Dates, UUIDs, HTTP, Random
|
using JSON3, DataStructures, Dates, UUIDs, HTTP, Random
|
||||||
using GeneralUtils
|
using GeneralUtils
|
||||||
@@ -72,13 +72,13 @@ using ..type, ..util, ..llmfunction
|
|||||||
msgMeta,
|
msgMeta,
|
||||||
agentConfig,
|
agentConfig,
|
||||||
)
|
)
|
||||||
julia> YiemAgent.add_new_message(a, "user", "hello")
|
julia> YiemAgent.addNewMessage(a, "user", "hello")
|
||||||
```
|
```
|
||||||
|
|
||||||
Signature\n
|
Signature\n
|
||||||
-----
|
-----
|
||||||
"""
|
"""
|
||||||
function add_new_message(a::T1, role::String, text::T2;
|
function addNewMessage(a::T1, role::String, text::T2;
|
||||||
maximumMsg::Integer=20) where {T1<:agent, T2<:AbstractString}
|
maximumMsg::Integer=20) where {T1<:agent, T2<:AbstractString}
|
||||||
if role ∉ ["system", "user", "assistant"] # guard against typo
|
if role ∉ ["system", "user", "assistant"] # guard against typo
|
||||||
error("role is not in agent.availableRole $(@__LINE__)")
|
error("role is not in agent.availableRole $(@__LINE__)")
|
||||||
|
|||||||
@@ -188,7 +188,7 @@ end
|
|||||||
msgMeta,
|
msgMeta,
|
||||||
agentConfig,
|
agentConfig,
|
||||||
)
|
)
|
||||||
julia> YiemAgent.add_new_message(a, "user", "hello")
|
julia> YiemAgent.addNewMessage(a, "user", "hello")
|
||||||
julia> YiemAgent.clearhistory(a)
|
julia> YiemAgent.clearhistory(a)
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user