Skip to content
Open
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: 2 additions & 0 deletions src/client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -229,6 +229,7 @@ import {
ChatCompletionUpdateParams,
ChatCompletionUserMessageParam,
ChatCompletionsPage,
RunnerOptions,
} from './resources/chat/completions/completions';
import { type Fetch } from './internal/builtin-types';
import { isRunningInBrowser } from './internal/detect-platform';
Expand Down Expand Up @@ -1467,6 +1468,7 @@ export declare namespace OpenAI {
type ChatCompletionCreateParamsStreaming as ChatCompletionCreateParamsStreaming,
type ChatCompletionUpdateParams as ChatCompletionUpdateParams,
type ChatCompletionListParams as ChatCompletionListParams,
type RunnerOptions as RunnerOptions,
};

export {
Expand Down
1 change: 1 addition & 0 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ export { OpenAI as default } from './client';
export { type Uploadable, toFile } from './core/uploads';
export { APIPromise } from './core/api-promise';
export { OpenAI, type ClientOptions } from './client';
export { type RunnerOptions } from './resources/chat/completions';
export { PagePromise } from './core/pagination';
export {
OpenAIError,
Expand Down
1 change: 1 addition & 0 deletions src/resources/chat/completions/completions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -257,6 +257,7 @@ export {
} from '../../../lib/RunnableFunction';
export { type ChatCompletionToolRunnerParams } from '../../../lib/ChatCompletionRunner';
export { type ChatCompletionStreamingToolRunnerParams } from '../../../lib/ChatCompletionStreamingRunner';
export { type RunnerOptions } from '../../../lib/AbstractChatCompletionRunner';
export { ChatCompletionStream, type ChatCompletionStreamParams } from '../../../lib/ChatCompletionStream';
export { ChatCompletionRunner } from '../../../lib/ChatCompletionRunner';

Expand Down
1 change: 1 addition & 0 deletions src/resources/chat/completions/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ export {
type ChatCompletionCreateParamsStreaming,
type ChatCompletionUpdateParams,
type ChatCompletionListParams,
type RunnerOptions,
type ChatCompletionStoreMessagesPage,
type ChatCompletionsPage,
} from './completions';
Expand Down
1 change: 1 addition & 0 deletions src/resources/chat/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ export {
type ChatCompletionCreateParamsStreaming,
type ChatCompletionUpdateParams,
type ChatCompletionListParams,
type RunnerOptions,
type ChatCompletionStoreMessagesPage,
type ChatCompletionsPage,
} from './completions/index';
14 changes: 14 additions & 0 deletions tests/runner-options-exports.test.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
import OpenAI, { type RunnerOptions } from 'openai';
import type { RunnerOptions as ResourceRunnerOptions } from 'openai/resources/chat/completions';
import { compareType, expectType } from './utils/typing';

describe('RunnerOptions exports', () => {
test('exports runTools options from public package surfaces', () => {
const options: RunnerOptions = { maxChatCompletions: 1 };

expectType<OpenAI.RunnerOptions>(options);
compareType<RunnerOptions, ResourceRunnerOptions>(true);

expect(true).toBe(true);
});
});