feat: responseFormat support json_schema

This commit is contained in:
majian159 2024-08-21 15:18:29 +08:00
parent c936198ac8
commit 1b24023562

View File

@ -1,7 +1,15 @@
package model package model
type ResponseFormat struct { type ResponseFormat struct {
Type string `json:"type,omitempty"` Type string `json:"type,omitempty"`
JsonSchema *ResponseFormatJsonSchema `json:"json_schema,omitempty"`
}
type ResponseFormatJsonSchema 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 { type GeneralOpenAIRequest struct {