Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: use @deprecated decorator for deprecated params #711

Merged
merged 1 commit into from
Mar 7, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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