update
This commit is contained in:
+5
-5
@@ -5,7 +5,7 @@ export yiemAgent, _agent_loop, OpenAiToUserMessage
|
||||
using JSON, DataStructures, Dates, UUIDs, HTTP, Random, PrettyPrinting, Serialization,
|
||||
DataFrames, Base.Threads
|
||||
using GeneralUtils
|
||||
using ..type, ..utils
|
||||
using ..type, ..utils, ..toolRegistry
|
||||
|
||||
# ---------------------------------------------- 100 --------------------------------------------- #
|
||||
|
||||
@@ -85,7 +85,7 @@ on `inputChannel` and `followUpChannel` channels concurrently.
|
||||
"""
|
||||
function yiemAgent(
|
||||
toolsFolderPath::String,
|
||||
llmCall::Function,
|
||||
llmCall,
|
||||
;
|
||||
systemPrompt::String="You are helpful assistant.",
|
||||
model=nothing,
|
||||
@@ -107,12 +107,12 @@ function yiemAgent(
|
||||
outputChannel = Channel(16)
|
||||
|
||||
# load tools from toolsFolderPath
|
||||
toolStore = YiemAgent.toolStore(name="myagent")
|
||||
loadTools(toolStore, toolsFolderPath)
|
||||
toolStore1 = toolStore(name="myagent")
|
||||
loadTools(toolStore1, toolsFolderPath)
|
||||
|
||||
# Create struct with a placeholder task, then spawn and replace it
|
||||
agent = yiemAgent(
|
||||
agentState(systemPrompt, model, getTools(toolStore), messages),
|
||||
agentState(systemPrompt, model, getTools(toolStore1), messages),
|
||||
inputChannel,
|
||||
followUp,
|
||||
outputChannel,
|
||||
|
||||
Reference in New Issue
Block a user