V0.8.0 add wine tools #46

Merged
ton merged 19 commits from v0.8.0-add_wine_tools into v0.8.0 2026-09-07 22:51:23 +00:00
Showing only changes of commit c355748e6f - Show all commits
+27 -13
View File
@@ -20,19 +20,33 @@ mutable struct yiemAgent <: agent # High-level agent wrapper
# user sends prompt message to agent. if agent is idle, it process user message right away.
# if agent is running, it process user message after the current tool call finished.
# Expect each message in OpenAI chat format:
# Dict("role" => "user", "content" => [
# Dict("type" => "text", "text" => "Your question here"),
# Dict("type" => "image_url", "image_url" => Dict("url" => "data:image/png;base64,<base64-string>"))
# ])
# To embed an image, read it as bytes and encode to base64:
# img = read("path/to/image.png")
# b64 = base64encode(img)
# data_uri = "data:image/png;base64,$b64"
# message = Dict("role" => "user", "content" => [
# Dict("type" => "text", "text" => "Do you have this wine?"),
# Dict("type" => "image_url", "image_url" => Dict("url" => data_uri))
# ])
# Multiple images can be included alongside text in the content array.
# image1_path = "test/large_image.png"
# image1_bytes = read(image1_path)
# image1_base64_string = base64encode(image1_bytes)
# mime_type = "image/png"
# data1_uri = "data:$(mime_type);base64,$(image1_base64_string)"
# # 1. Read local file and encode to base64 string
# image2_path = "test/small_image.png"
# image2_bytes = read(image2_path)
# image2_base64_string = base64encode(image2_bytes)
# mime_type = "image/png"
# data2_uri = "data:$(mime_type);base64,$(image2_base64_string)"
# # 3. Construct payload with the Data URI
# 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)
# )
# ]
# )
inputChannel::Channel
# Buffers follow-up messages the user sends while the agent is busy. Uses the same