Skip to content

Commit

Permalink
refactor(api): rename FunctionObject to FunctionDefinition (#470)
Browse files Browse the repository at this point in the history
  • Loading branch information
stainless-bot committed Nov 9, 2023
1 parent df2727a commit cd8d648
Show file tree
Hide file tree
Showing 7 changed files with 10 additions and 10 deletions.
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

0 comments on commit cd8d648

Please sign in to comment.