Skip to content

Commit

Permalink
docs: use @deprecated decorator for deprecated params (#711)
Browse files Browse the repository at this point in the history
  • Loading branch information
stainless-bot authored Mar 7, 2024
1 parent 8ec216d commit 4688ef4
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 16 deletions.
30 changes: 18 additions & 12 deletions src/resources/chat/completions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -133,8 +133,8 @@ export interface ChatCompletionAssistantMessageParam {
content?: string | null;

/**
* Deprecated and replaced by `tool_calls`. The name and arguments of a function
* that should be called, as generated by the model.
* @deprecated: Deprecated and replaced by `tool_calls`. The name and arguments of
* a function that should be called, as generated by the model.
*/
function_call?: ChatCompletionAssistantMessageParam.FunctionCall;

Expand All @@ -152,8 +152,8 @@ export interface ChatCompletionAssistantMessageParam {

export namespace ChatCompletionAssistantMessageParam {
/**
* Deprecated and replaced by `tool_calls`. The name and arguments of a function
* that should be called, as generated by the model.
* @deprecated: Deprecated and replaced by `tool_calls`. The name and arguments of
* a function that should be called, as generated by the model.
*/
export interface FunctionCall {
/**
Expand Down Expand Up @@ -250,8 +250,8 @@ export namespace ChatCompletionChunk {
content?: string | null;

/**
* Deprecated and replaced by `tool_calls`. The name and arguments of a function
* that should be called, as generated by the model.
* @deprecated: Deprecated and replaced by `tool_calls`. The name and arguments of
* a function that should be called, as generated by the model.
*/
function_call?: Delta.FunctionCall;

Expand All @@ -265,8 +265,8 @@ export namespace ChatCompletionChunk {

export namespace Delta {
/**
* Deprecated and replaced by `tool_calls`. The name and arguments of a function
* that should be called, as generated by the model.
* @deprecated: Deprecated and replaced by `tool_calls`. The name and arguments of
* a function that should be called, as generated by the model.
*/
export interface FunctionCall {
/**
Expand Down Expand Up @@ -378,6 +378,9 @@ export interface ChatCompletionFunctionCallOption {
name: string;
}

/**
* @deprecated
*/
export interface ChatCompletionFunctionMessageParam {
/**
* The contents of the function message.
Expand Down Expand Up @@ -410,8 +413,8 @@ export interface ChatCompletionMessage {
role: 'assistant';

/**
* Deprecated and replaced by `tool_calls`. The name and arguments of a function
* that should be called, as generated by the model.
* @deprecated: Deprecated and replaced by `tool_calls`. The name and arguments of
* a function that should be called, as generated by the model.
*/
function_call?: ChatCompletionMessage.FunctionCall;

Expand All @@ -423,8 +426,8 @@ export interface ChatCompletionMessage {

export namespace ChatCompletionMessage {
/**
* Deprecated and replaced by `tool_calls`. The name and arguments of a function
* that should be called, as generated by the model.
* @deprecated: Deprecated and replaced by `tool_calls`. The name and arguments of
* a function that should be called, as generated by the model.
*/
export interface FunctionCall {
/**
Expand Down Expand Up @@ -855,6 +858,9 @@ export interface ChatCompletionCreateParamsBase {
}

export namespace ChatCompletionCreateParams {
/**
* @deprecated
*/
export interface Function {
/**
* The name of the function to be called. Must be a-z, A-Z, 0-9, or contain
Expand Down
8 changes: 4 additions & 4 deletions src/resources/files.ts
Original file line number Diff line number Diff line change
Expand Up @@ -154,14 +154,14 @@ export interface FileObject {
purpose: 'fine-tune' | 'fine-tune-results' | 'assistants' | 'assistants_output';

/**
* Deprecated. The current status of the file, which can be either `uploaded`,
* `processed`, or `error`.
* @deprecated: Deprecated. The current status of the file, which can be either
* `uploaded`, `processed`, or `error`.
*/
status: 'uploaded' | 'processed' | 'error';

/**
* Deprecated. For details on why a fine-tuning training file failed validation,
* see the `error` field on `fine_tuning.job`.
* @deprecated: Deprecated. For details on why a fine-tuning training file failed
* validation, see the `error` field on `fine_tuning.job`.
*/
status_details?: string;
}
Expand Down

0 comments on commit 4688ef4

Please sign in to comment.