Skip to content

Commit f3990c7

Browse files
refactor(api): rename FunctionObject to FunctionDefinition (#470)
1 parent d51cd94 commit f3990c7

File tree

7 files changed

+10
-10
lines changed

7 files changed

+10
-10
lines changed

api.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
Types:
44

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

88
# Completions

src/index.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -297,7 +297,7 @@ export namespace OpenAI {
297297

298298
export import Beta = API.Beta;
299299

300-
export import FunctionObject = API.FunctionObject;
300+
export import FunctionDefinition = API.FunctionDefinition;
301301
export import FunctionParameters = API.FunctionParameters;
302302
}
303303

src/resources/beta/assistants/assistants.ts

+3-3
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,7 @@ export namespace Assistant {
164164
}
165165

166166
export interface Function {
167-
function: Shared.FunctionObject;
167+
function: Shared.FunctionDefinition;
168168

169169
/**
170170
* The type of tool being defined: `function`
@@ -249,7 +249,7 @@ export namespace AssistantCreateParams {
249249
}
250250

251251
export interface AssistantToolsFunction {
252-
function: Shared.FunctionObject;
252+
function: Shared.FunctionDefinition;
253253

254254
/**
255255
* The type of tool being defined: `function`
@@ -328,7 +328,7 @@ export namespace AssistantUpdateParams {
328328
}
329329

330330
export interface AssistantToolsFunction {
331-
function: Shared.FunctionObject;
331+
function: Shared.FunctionDefinition;
332332

333333
/**
334334
* The type of tool being defined: `function`

src/resources/beta/threads/runs/runs.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -325,7 +325,7 @@ export namespace Run {
325325
}
326326

327327
export interface AssistantToolsFunction {
328-
function: Shared.FunctionObject;
328+
function: Shared.FunctionDefinition;
329329

330330
/**
331331
* The type of tool being defined: `function`
@@ -391,7 +391,7 @@ export namespace RunCreateParams {
391391
}
392392

393393
export interface AssistantToolsFunction {
394-
function: Shared.FunctionObject;
394+
function: Shared.FunctionDefinition;
395395

396396
/**
397397
* The type of tool being defined: `function`

src/resources/beta/threads/threads.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -280,7 +280,7 @@ export namespace ThreadCreateAndRunParams {
280280
}
281281

282282
export interface AssistantToolsFunction {
283-
function: Shared.FunctionObject;
283+
function: Shared.FunctionDefinition;
284284

285285
/**
286286
* The type of tool being defined: `function`

src/resources/chat/completions.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -486,7 +486,7 @@ export interface ChatCompletionSystemMessageParam {
486486
}
487487

488488
export interface ChatCompletionTool {
489-
function: Shared.FunctionObject;
489+
function: Shared.FunctionDefinition;
490490

491491
/**
492492
* The type of the tool. Currently, only `function` is supported.

src/resources/shared.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// File generated from our OpenAPI spec by Stainless.
22

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

0 commit comments

Comments
 (0)