mirror of
https://github.com/songquanpeng/one-api.git
synced 2025-11-22 07:56:48 +08:00
Merge 8726729ade into 09911a301d
This commit is contained in:
@@ -97,6 +97,16 @@ type TextResponse struct {
|
||||
model.Usage `json:"usage"`
|
||||
}
|
||||
|
||||
type ErrorTextResponse struct {
|
||||
Id string `json:"id"`
|
||||
Model string `json:"model,omitempty"`
|
||||
Object string `json:"object"`
|
||||
ErrorCode string `json:"error_code"`
|
||||
Created int64 `json:"created"`
|
||||
Choices []TextResponseChoice `json:"choices"`
|
||||
model.Usage `json:"usage"`
|
||||
}
|
||||
|
||||
type EmbeddingResponseItem struct {
|
||||
Object string `json:"object"`
|
||||
Index int `json:"index"`
|
||||
@@ -137,6 +147,16 @@ type ChatCompletionsStreamResponse struct {
|
||||
Usage *model.Usage `json:"usage,omitempty"`
|
||||
}
|
||||
|
||||
type ChatCompletionsErrorStreamResponse struct {
|
||||
Id string `json:"id"`
|
||||
Object string `json:"object"`
|
||||
Created int64 `json:"created"`
|
||||
ErrorCode string `json:"error_code"`
|
||||
Model string `json:"model"`
|
||||
Choices []ChatCompletionsStreamResponseChoice `json:"choices"`
|
||||
Usage *model.Usage `json:"usage,omitempty"`
|
||||
}
|
||||
|
||||
type CompletionsStreamResponse struct {
|
||||
Choices []struct {
|
||||
Text string `json:"text"`
|
||||
|
||||
Reference in New Issue
Block a user