feat: ResponseFormat support json_schema (#1759)

* feat: responseFormat support json_schema

* chore: rename struct name

---------

Co-authored-by: JustSong <songquanpeng@foxmail.com>
This commit is contained in:
majian 2024-09-21 22:35:24 +08:00 committed by GitHub
parent 8cc54489b9
commit 89b63ca96f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -2,6 +2,14 @@ package model
type ResponseFormat struct {
Type string `json:"type,omitempty"`
JsonSchema *JSONSchema `json:"json_schema,omitempty"`
}
type JSONSchema struct {
Description string `json:"description,omitempty"`
Name string `json:"name"`
Schema map[string]interface{} `json:"schema,omitempty"`
Strict *bool `json:"strict,omitempty"`
}
type GeneralOpenAIRequest struct {