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:
commit
81deca8c8e
75 files changed
+7048
No files matched your search
@@ -0,0 +1,27 @@
|
||||
package model
|
||||
|
||||
// ChatCompletionRequest 表示对话接口的请求参数。
|
||||
type ChatCompletionRequest struct {
|
||||
Model string `json:"model"`
|
||||
Messages []ChatMessage `json:"messages"`
|
||||
Stream bool `json:"stream,omitempty"`
|
||||
Tools []ToolDefinition `json:"tools,omitempty"`
|
||||
}
|
||||
|
||||
// ChatCompletionResponse 表示对话接口的响应。
|
||||
type ChatCompletionResponse struct {
|
||||
Choices []ChatCompletionChoice `json:"choices"`
|
||||
}
|
||||
|
||||
// ChatCompletionChoice 表示模型返回的一个候选回答。
|
||||
type ChatCompletionChoice struct {
|
||||
Message ChatMessage `json:"message"`
|
||||
Delta ChatCompletionDelta `json:"delta"`
|
||||
FinishReason string `json:"finish_reason"`
|
||||
}
|
||||
|
||||
// ChatCompletionDelta 表示流式响应中的增量内容。
|
||||
type ChatCompletionDelta struct {
|
||||
Content string `json:"content"`
|
||||
ToolCalls []ToolCall `json:"tool_calls"`
|
||||
}
|
||||
Reference in new issue
Block a user