mcp works

This commit is contained in:
2026-08-21 22:34:27 +07:00
parent da21790263
commit d2592ab6d6
5 changed files with 161 additions and 197 deletions
+2 -4
View File
@@ -358,7 +358,6 @@ struct agentContext # Snapshot of the agent's conversa
systemPrompt::String # System prompt for the agent
messages::Vector{agentMessage} # Conversation messages
tools::Union{OrderedDict{String, agentTool}, Nothing} # Available tools keyed by name
llmCall::Union{Any, Nothing} # LLM call function (for tools that need it)
end
@@ -408,7 +407,7 @@ function agentState(
agentState(
systemPrompt,
model,
deepcopy(tools),
tools,
deepcopy(messages),
Vector{String}(),
nothing,
@@ -443,7 +442,7 @@ end
"""
Configuration for the agent tool execution loop.
# Arguments
# Fields
- `beforeToolCall::Union{Function, Nothing}`: Callback before tool execution
- `afterToolCall::Union{Function, Nothing}`: Callback after tool execution
- `toolExecution::String`: Execution mode — "sequential" or "parallel"
@@ -452,7 +451,6 @@ struct agentLoopConfig
beforeToolCall::Union{Function, Nothing}
afterToolCall::Union{Function, Nothing}
toolExecution::String
llmCall::Union{Any, Nothing} # LLM call function (for tools like searchWine)
end
"""