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

refactor(api): rename FunctionObject to FunctionDefinition #470

Merged
merged 1 commit into from
Nov 8, 2023
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
2 changes: 1 addition & 1 deletion api.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

Types:

- <code><a href="./src/resources/shared.ts">FunctionObject</a></code>
- <code><a href="./src/resources/shared.ts">FunctionDefinition</a></code>
- <code><a href="./src/resources/shared.ts">FunctionParameters</a></code>

# Completions
Expand Down
2 changes: 1 addition & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -297,7 +297,7 @@ export namespace OpenAI {

export import Beta = API.Beta;

export import FunctionObject = API.FunctionObject;
export import FunctionDefinition = API.FunctionDefinition;
export import FunctionParameters = API.FunctionParameters;
}

Expand Down
6 changes: 3 additions & 3 deletions src/resources/beta/assistants/assistants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ export namespace Assistant {
}

export interface Function {
function: Shared.FunctionObject;
function: Shared.FunctionDefinition;

/**
* The type of tool being defined: `function`
Expand Down Expand Up @@ -249,7 +249,7 @@ export namespace AssistantCreateParams {
}

export interface AssistantToolsFunction {
function: Shared.FunctionObject;
function: Shared.FunctionDefinition;

/**
* The type of tool being defined: `function`
Expand Down Expand Up @@ -328,7 +328,7 @@ export namespace AssistantUpdateParams {
}

export interface AssistantToolsFunction {
function: Shared.FunctionObject;
function: Shared.FunctionDefinition;

/**
* The type of tool being defined: `function`
Expand Down
4 changes: 2 additions & 2 deletions src/resources/beta/threads/runs/runs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -325,7 +325,7 @@ export namespace Run {
}

export interface AssistantToolsFunction {
function: Shared.FunctionObject;
function: Shared.FunctionDefinition;

/**
* The type of tool being defined: `function`
Expand Down Expand Up @@ -391,7 +391,7 @@ export namespace RunCreateParams {
}

export interface AssistantToolsFunction {
function: Shared.FunctionObject;
function: Shared.FunctionDefinition;

/**
* The type of tool being defined: `function`
Expand Down
2 changes: 1 addition & 1 deletion src/resources/beta/threads/threads.ts
Original file line number Diff line number Diff line change
Expand Up @@ -280,7 +280,7 @@ export namespace ThreadCreateAndRunParams {
}

export interface AssistantToolsFunction {
function: Shared.FunctionObject;
function: Shared.FunctionDefinition;

/**
* The type of tool being defined: `function`
Expand Down
2 changes: 1 addition & 1 deletion src/resources/chat/completions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -486,7 +486,7 @@ export interface ChatCompletionSystemMessageParam {
}

export interface ChatCompletionTool {
function: Shared.FunctionObject;
function: Shared.FunctionDefinition;

/**
* The type of the tool. Currently, only `function` is supported.
Expand Down
2 changes: 1 addition & 1 deletion src/resources/shared.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// File generated from our OpenAPI spec by Stainless.

export interface FunctionObject {
export interface FunctionDefinition {
/**
* The name of the function to be called. Must be a-z, A-Z, 0-9, or contain
* underscores and dashes, with a maximum length of 64.
Expand Down