🔖 chore: Update JSON field types in chat and completion response models (#206)
This commit is contained in:
parent
f1b97cecce
commit
537968522d
@ -245,7 +245,7 @@ func (c *ChatCompletionChoice) CheckChoice(request *ChatCompletionRequest) {
|
|||||||
type ChatCompletionResponse struct {
|
type ChatCompletionResponse struct {
|
||||||
ID string `json:"id"`
|
ID string `json:"id"`
|
||||||
Object string `json:"object"`
|
Object string `json:"object"`
|
||||||
Created int64 `json:"created"`
|
Created any `json:"created"`
|
||||||
Model string `json:"model"`
|
Model string `json:"model"`
|
||||||
Choices []ChatCompletionChoice `json:"choices"`
|
Choices []ChatCompletionChoice `json:"choices"`
|
||||||
Usage *Usage `json:"usage,omitempty"`
|
Usage *Usage `json:"usage,omitempty"`
|
||||||
@ -368,7 +368,7 @@ func (c *ChatCompletionStreamChoice) CheckChoice(request *ChatCompletionRequest)
|
|||||||
type ChatCompletionStreamResponse struct {
|
type ChatCompletionStreamResponse struct {
|
||||||
ID string `json:"id"`
|
ID string `json:"id"`
|
||||||
Object string `json:"object"`
|
Object string `json:"object"`
|
||||||
Created int64 `json:"created"`
|
Created any `json:"created"`
|
||||||
Model string `json:"model"`
|
Model string `json:"model"`
|
||||||
Choices []ChatCompletionStreamChoice `json:"choices"`
|
Choices []ChatCompletionStreamChoice `json:"choices"`
|
||||||
PromptAnnotations any `json:"prompt_annotations,omitempty"`
|
PromptAnnotations any `json:"prompt_annotations,omitempty"`
|
||||||
|
@ -29,7 +29,7 @@ type CompletionChoice struct {
|
|||||||
type CompletionResponse struct {
|
type CompletionResponse struct {
|
||||||
ID string `json:"id"`
|
ID string `json:"id"`
|
||||||
Object string `json:"object"`
|
Object string `json:"object"`
|
||||||
Created int64 `json:"created"`
|
Created any `json:"created"`
|
||||||
Model string `json:"model"`
|
Model string `json:"model"`
|
||||||
Choices []CompletionChoice `json:"choices"`
|
Choices []CompletionChoice `json:"choices"`
|
||||||
Usage *Usage `json:"usage,omitempty"`
|
Usage *Usage `json:"usage,omitempty"`
|
||||||
|
@ -14,7 +14,7 @@ type ImageRequest struct {
|
|||||||
}
|
}
|
||||||
|
|
||||||
type ImageResponse struct {
|
type ImageResponse struct {
|
||||||
Created int64 `json:"created,omitempty"`
|
Created any `json:"created,omitempty"`
|
||||||
Data []ImageResponseDataInner `json:"data,omitempty"`
|
Data []ImageResponseDataInner `json:"data,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user