From 8232946e91171b97485be0b6be46eccc78ff4b7a Mon Sep 17 00:00:00 2001 From: narawat Date: Thu, 6 Aug 2026 18:29:31 +0700 Subject: [PATCH] update --- src/utils.jl | 24 ++++++++++++++++++++++-- 1 file changed, 22 insertions(+), 2 deletions(-) diff --git a/src/utils.jl b/src/utils.jl index ab0b7e0..b82735a 100644 --- a/src/utils.jl +++ b/src/utils.jl @@ -113,8 +113,28 @@ function prepareContext(state::agentState)::Vector{agentMessage} end -function formatMsgForLLM() - +""" convert preparedcontext into openai message format ready to be used by LLM +""" +function formatMsgForLLM(messages::Vector{agentMessage})::Vector{Dict{String, Any}} + """ openai message format + message = Dict( + "role" => "user", + "content" => [ + Dict("type" => "text", "text" => + " + Do you have Brunello di Montalcino from Tenuta CastelGiocon? + "), + Dict( + "type" => "image_url", + "image_url" => Dict("url" => data1_uri) + ) + ] + ) + """ + + # convert various messages to openai message format + + return openai_message end