Skip to content

Commit 2c21e34

Browse files
feat: support deprecated markers (#178)
1 parent 3aedec5 commit 2c21e34

File tree

3 files changed

+22
-0
lines changed

3 files changed

+22
-0
lines changed

chatcompletion.go

+16
Original file line numberDiff line numberDiff line change
@@ -322,6 +322,8 @@ type ChatCompletionAssistantMessageParam struct {
322322
Content param.Field[[]ChatCompletionAssistantMessageParamContentUnion] `json:"content"`
323323
// Deprecated and replaced by `tool_calls`. The name and arguments of a function
324324
// that should be called, as generated by the model.
325+
//
326+
// Deprecated: deprecated
325327
FunctionCall param.Field[ChatCompletionAssistantMessageParamFunctionCall] `json:"function_call"`
326328
// An optional name for the participant. Provides the model information to
327329
// differentiate between participants of the same role.
@@ -410,6 +412,8 @@ func (r ChatCompletionAssistantMessageParamContentType) IsKnown() bool {
410412

411413
// Deprecated and replaced by `tool_calls`. The name and arguments of a function
412414
// that should be called, as generated by the model.
415+
//
416+
// Deprecated: deprecated
413417
type ChatCompletionAssistantMessageParamFunctionCall struct {
414418
// The arguments to call the function with, as generated by the model in JSON
415419
// format. Note that the model does not always generate valid JSON, and may
@@ -617,6 +621,8 @@ type ChatCompletionChunkChoicesDelta struct {
617621
Content string `json:"content,nullable"`
618622
// Deprecated and replaced by `tool_calls`. The name and arguments of a function
619623
// that should be called, as generated by the model.
624+
//
625+
// Deprecated: deprecated
620626
FunctionCall ChatCompletionChunkChoicesDeltaFunctionCall `json:"function_call"`
621627
// The refusal message generated by the model.
622628
Refusal string `json:"refusal,nullable"`
@@ -648,6 +654,8 @@ func (r chatCompletionChunkChoicesDeltaJSON) RawJSON() string {
648654

649655
// Deprecated and replaced by `tool_calls`. The name and arguments of a function
650656
// that should be called, as generated by the model.
657+
//
658+
// Deprecated: deprecated
651659
type ChatCompletionChunkChoicesDeltaFunctionCall struct {
652660
// The arguments to call the function with, as generated by the model in JSON
653661
// format. Note that the model does not always generate valid JSON, and may
@@ -1114,6 +1122,7 @@ func (r ChatCompletionFunctionCallOptionParam) MarshalJSON() (data []byte, err e
11141122

11151123
func (r ChatCompletionFunctionCallOptionParam) implementsChatCompletionNewParamsFunctionCallUnion() {}
11161124

1125+
// Deprecated: deprecated
11171126
type ChatCompletionFunctionMessageParam struct {
11181127
// The contents of the function message.
11191128
Content param.Field[string] `json:"content,required"`
@@ -1158,6 +1167,8 @@ type ChatCompletionMessage struct {
11581167
Audio ChatCompletionAudio `json:"audio,nullable"`
11591168
// Deprecated and replaced by `tool_calls`. The name and arguments of a function
11601169
// that should be called, as generated by the model.
1170+
//
1171+
// Deprecated: deprecated
11611172
FunctionCall ChatCompletionMessageFunctionCall `json:"function_call"`
11621173
// The tool calls generated by the model, such as function calls.
11631174
ToolCalls []ChatCompletionMessageToolCall `json:"tool_calls"`
@@ -1227,6 +1238,8 @@ func (r ChatCompletionMessageRole) IsKnown() bool {
12271238

12281239
// Deprecated and replaced by `tool_calls`. The name and arguments of a function
12291240
// that should be called, as generated by the model.
1241+
//
1242+
// Deprecated: deprecated
12301243
type ChatCompletionMessageFunctionCall struct {
12311244
// The arguments to call the function with, as generated by the model in JSON
12321245
// format. Note that the model does not always generate valid JSON, and may
@@ -1968,6 +1981,8 @@ func (r ChatCompletionNewParams) MarshalJSON() (data []byte, err error) {
19681981
//
19691982
// Satisfied by [ChatCompletionNewParamsFunctionCallBehavior],
19701983
// [ChatCompletionFunctionCallOptionParam].
1984+
//
1985+
// Deprecated: deprecated
19711986
type ChatCompletionNewParamsFunctionCallUnion interface {
19721987
implementsChatCompletionNewParamsFunctionCallUnion()
19731988
}
@@ -1993,6 +2008,7 @@ func (r ChatCompletionNewParamsFunctionCallBehavior) IsKnown() bool {
19932008
func (r ChatCompletionNewParamsFunctionCallBehavior) implementsChatCompletionNewParamsFunctionCallUnion() {
19942009
}
19952010

2011+
// Deprecated: deprecated
19962012
type ChatCompletionNewParamsFunction struct {
19972013
// The name of the function to be called. Must be a-z, A-Z, 0-9, or contain
19982014
// underscores and dashes, with a maximum length of 64.

file.go

+4
Original file line numberDiff line numberDiff line change
@@ -200,9 +200,13 @@ type FileObject struct {
200200
Purpose FileObjectPurpose `json:"purpose,required"`
201201
// Deprecated. The current status of the file, which can be either `uploaded`,
202202
// `processed`, or `error`.
203+
//
204+
// Deprecated: deprecated
203205
Status FileObjectStatus `json:"status,required"`
204206
// Deprecated. For details on why a fine-tuning training file failed validation,
205207
// see the `error` field on `fine_tuning.job`.
208+
//
209+
// Deprecated: deprecated
206210
StatusDetails string `json:"status_details"`
207211
JSON fileObjectJSON `json:"-"`
208212
}

finetuningjob.go

+2
Original file line numberDiff line numberDiff line change
@@ -1139,6 +1139,8 @@ func (r FineTuningJobNewParamsModel) IsKnown() bool {
11391139

11401140
// The hyperparameters used for the fine-tuning job. This value is now deprecated
11411141
// in favor of `method`, and should be passed in under the `method` parameter.
1142+
//
1143+
// Deprecated: deprecated
11421144
type FineTuningJobNewParamsHyperparameters struct {
11431145
// Number of examples in each batch. A larger batch size means that model
11441146
// parameters are updated less frequently, but with lower variance.

0 commit comments

Comments
 (0)