🔖 chore: Update JSON field types in chat and completion response models (#206)

This commit is contained in:
MartialBE 2024-05-22 16:03:57 +08:00
parent f1b97cecce
commit 537968522d
No known key found for this signature in database
GPG Key ID: 27C0267EC84B0A5C
3 changed files with 4 additions and 4 deletions

View File

@ -245,7 +245,7 @@ func (c *ChatCompletionChoice) CheckChoice(request *ChatCompletionRequest) {
type ChatCompletionResponse struct {
ID string `json:"id"`
Object string `json:"object"`
Created int64 `json:"created"`
Created any `json:"created"`
Model string `json:"model"`
Choices []ChatCompletionChoice `json:"choices"`
Usage *Usage `json:"usage,omitempty"`
@ -368,7 +368,7 @@ func (c *ChatCompletionStreamChoice) CheckChoice(request *ChatCompletionRequest)
type ChatCompletionStreamResponse struct {
ID string `json:"id"`
Object string `json:"object"`
Created int64 `json:"created"`
Created any `json:"created"`
Model string `json:"model"`
Choices []ChatCompletionStreamChoice `json:"choices"`
PromptAnnotations any `json:"prompt_annotations,omitempty"`

View File

@ -29,7 +29,7 @@ type CompletionChoice struct {
type CompletionResponse struct {
ID string `json:"id"`
Object string `json:"object"`
Created int64 `json:"created"`
Created any `json:"created"`
Model string `json:"model"`
Choices []CompletionChoice `json:"choices"`
Usage *Usage `json:"usage,omitempty"`

View File

@ -14,7 +14,7 @@ type ImageRequest struct {
}
type ImageResponse struct {
Created int64 `json:"created,omitempty"`
Created any `json:"created,omitempty"`
Data []ImageResponseDataInner `json:"data,omitempty"`
}