feat: initialize Eino examples and ADK applications

Include chat, weather, image, travel, streaming ASR and text examples,
shared model initialization, documentation, and existing tests.

Co-authored-by: TRAE CLI <traecli@bytedance.com>
This commit is contained in:
zhaoyupeng.elqbandTRAE CLI committed 2026-11-19 11:08:03 +08:00
commit 81deca8c8e
75 files changed
+7048

No files matched your search

+35
View File
@@ -0,0 +1,35 @@
package model
// ChatMessage 表示用户、模型或工具的一条消息。
type ChatMessage struct {
Role string `json:"role"`
Content any `json:"content"`
ToolCalls []ToolCall `json:"tool_calls,omitempty"`
ToolCallID string `json:"tool_call_id,omitempty"`
}
// ChatContentPart 表示用户消息中的一段文字或图片。
type ChatContentPart struct {
Type string `json:"type"`
Text string `json:"text,omitempty"`
ImageURL *ChatImageURL `json:"image_url,omitempty"`
}
// ChatImageURL 保存图片地址,也支持 base64 data URL。
type ChatImageURL struct {
URL string `json:"url"`
}
// ToolCall 表示模型请求执行的工具调用。
type ToolCall struct {
Index *int `json:"index,omitempty"`
ID string `json:"id"`
Type string `json:"type"`
Function ToolFunction `json:"function"`
}
// ToolFunction 表示工具调用的函数名称和参数。
type ToolFunction struct {
Name string `json:"name"`
Arguments string `json:"arguments"`
}