update
This commit is contained in:
@@ -14,14 +14,6 @@ function executeTool(toolCallId::String, args::Dict{String,Any}, signal::Union{N
|
||||
city = get(args, "city", "")
|
||||
units = get(args, "units", "celsius")
|
||||
|
||||
# Validate required arguments
|
||||
if isempty(city)
|
||||
return agentToolResult(
|
||||
[textContent("Error: 'city' argument is required.")],
|
||||
Dict{Any,Any}(), nothing, false
|
||||
)
|
||||
end
|
||||
|
||||
# Simulate weather fetch — replace with actual API call
|
||||
# You can call onPartialResult() here for streaming progress updates:
|
||||
# onPartialResult(Dict("status" => "Fetching weather data..."))
|
||||
@@ -54,6 +46,7 @@ function getTool()::agentTool
|
||||
),
|
||||
execute = executeTool, # reference the function defined above
|
||||
prepareArguments = nothing,
|
||||
validateRequiredArgs = nothing,
|
||||
parallelToolExecute = false
|
||||
)
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user