From 537968522db0a49228219dec5aa5d3266cea5085 Mon Sep 17 00:00:00 2001 From: MartialBE Date: Wed, 22 May 2024 16:03:57 +0800 Subject: [PATCH] =?UTF-8?q?=F0=9F=94=96=20chore:=20Update=20JSON=20field?= =?UTF-8?q?=20types=20in=20chat=20and=20completion=20response=20models=20(?= =?UTF-8?q?#206)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- types/chat.go | 4 ++-- types/completion.go | 2 +- types/image.go | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/types/chat.go b/types/chat.go index 8c414ffd..68cdca49 100644 --- a/types/chat.go +++ b/types/chat.go @@ -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"` diff --git a/types/completion.go b/types/completion.go index 3a8fad47..698bd15d 100644 --- a/types/completion.go +++ b/types/completion.go @@ -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"` diff --git a/types/image.go b/types/image.go index 53559532..bf8531c2 100644 --- a/types/image.go +++ b/types/image.go @@ -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"` }