File tree Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -248,6 +248,12 @@ func (r *ChatCompletionResponseFormatJSONSchema) UnmarshalJSON(data []byte) erro
248
248
return nil
249
249
}
250
250
251
+ // NonOpenAIExtensions contains non-standard OpenAI API extensions
252
+ type NonOpenAIExtensions struct {
253
+ // GuidedChoice restricts output to a set of predefined choices.
254
+ GuidedChoice []string `json:"guided_choice,omitempty"`
255
+ }
256
+
251
257
// ChatCompletionRequest represents a request structure for chat completion API.
252
258
type ChatCompletionRequest struct {
253
259
Model string `json:"model"`
@@ -309,8 +315,8 @@ type ChatCompletionRequest struct {
309
315
ChatTemplateKwargs map [string ]any `json:"chat_template_kwargs,omitempty"`
310
316
// Specifies the latency tier to use for processing the request.
311
317
ServiceTier ServiceTier `json:"service_tier,omitempty"`
312
- // GuidedChoice restricts output to a set of predefined choices.
313
- GuidedChoice [] string `json:"guided_choice,omitempty "`
318
+ // Embedded struct for non-OpenAI extensions
319
+ NonOpenAIExtensions `json:",inline "`
314
320
}
315
321
316
322
type StreamOptions struct {
You can’t perform that action at this time.
0 commit comments