File tree 2 files changed +4
-4
lines changed
2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -33,7 +33,7 @@ type ChatRequest struct {
33
33
FrequencyPenalty float64 `json:"frequency_penalty,omitempty"`
34
34
PresencePenalty float64 `json:"presence_penalty,omitempty"`
35
35
36
- ResponseFormat ResponseFormat `json:"response_format,omitempty"`
36
+ ResponseFormat * ResponseFormat `json:"response_format,omitempty"`
37
37
38
38
// Function definitions to include in the request.
39
39
Functions []FunctionDefinition `json:"functions,omitempty"`
Original file line number Diff line number Diff line change @@ -33,7 +33,7 @@ type options struct {
33
33
apiType APIType
34
34
httpClient openaiclient.Doer
35
35
36
- responseFormat ResponseFormat
36
+ responseFormat * ResponseFormat
37
37
38
38
// required when APIType is APITypeAzure or APITypeAzureAD
39
39
apiVersion string
@@ -49,7 +49,7 @@ type Option func(*options)
49
49
type ResponseFormat = openaiclient.ResponseFormat
50
50
51
51
// ResponseFormatJSON is the JSON response format.
52
- var ResponseFormatJSON = ResponseFormat {Type : "json_object" } //nolint:gochecknoglobals
52
+ var ResponseFormatJSON = & ResponseFormat {Type : "json_object" } //nolint:gochecknoglobals
53
53
54
54
// WithToken passes the OpenAI API token to the client. If not set, the token
55
55
// is read from the OPENAI_API_KEY environment variable.
@@ -124,7 +124,7 @@ func WithCallback(callbackHandler callbacks.Handler) Option {
124
124
}
125
125
126
126
// WithResponseFormat allows setting a custom response format.
127
- func WithResponseFormat (responseFormat ResponseFormat ) Option {
127
+ func WithResponseFormat (responseFormat * ResponseFormat ) Option {
128
128
return func (opts * options ) {
129
129
opts .responseFormat = responseFormat
130
130
}
You can’t perform that action at this time.
0 commit comments