text message process works

This commit is contained in:
2026-08-16 17:24:29 +07:00
parent a29a82b74c
commit 25f8468696
3 changed files with 41 additions and 17 deletions
+13 -10
View File
@@ -4,8 +4,8 @@
messageContent, agentMessage, agent,
# Model types
modelCost, llmModel, llmUsage,
# Message content types
textContent, imageContent,
# Message content types
textContent, imageContent, reasoningContent,
# Message types
userMessage, assistantMessageToolCall, assistantMessage, toolResultMessage,
# Tool types
@@ -31,6 +31,13 @@ using GeneralUtils
const Timestamp = DateTime
struct agentToolCall # A tool invocation from the LLM
type::String # Always "function"
id::String # Unique tool call identifier
name::String # Tool name
arguments::Dict{String, Any} # Parsed tool arguments
end
# ------------------------------------------------------------------------------------------------ #
# LLM model info #
# ------------------------------------------------------------------------------------------------ #
@@ -75,6 +82,10 @@ struct imageContent <: messageContent # Image message content
mimeType::String # MIME type (e.g., "image/png")
end
struct reasoningContent <: messageContent # LLM reasoning/thinking content
text::String # The reasoning text
end
# ------------------------------------------------------------------------------------------------ #
# Message types #
@@ -404,14 +415,6 @@ function agentState(
end
struct agentToolCall # A tool invocation from the LLM
type::String # Always "function"
id::String # Unique tool call identifier
name::String # Tool name
arguments::Dict{String, Any} # Parsed tool arguments
end
"""
Context for preparing the next conversation turn.