feat: add image generation sub-agent with confirmation and organize ADK example

This commit is contained in:
loveuer committed 2026-11-17 16:50:49 +08:00
1 parent 86e86bc9fa
commit dab8cbb55d
21 files changed
+1402 -181

No files matched your search

+27
View File
@@ -0,0 +1,27 @@
package model
// ImageGenerationRequest 是 OpenAI 兼容图片接口的请求。
type ImageGenerationRequest struct {
Model string `json:"model"`
Prompt string `json:"prompt"`
N int `json:"n"`
}
type ImageGenerationResponse struct {
Data []ImageGenerationData `json:"data"`
}
type ImageGenerationData struct {
Base64 string `json:"b64_json"`
URL string `json:"url"`
}
// ImageArguments 是生图工具接收的创作提示词。
type ImageArguments struct {
Prompt string `json:"prompt"`
}
// ImageResult 返回已经保存到本地的图片路径。
type ImageResult struct {
Path string `json:"path"`
}