Skip to content

Commit 399f971

Browse files
authored
fix(runTools): correct request options type (#1073)
1 parent 328f75c commit 399f971

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

src/resources/beta/chat/completions.ts

+4-3
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ export {
2121
ParsingFunction,
2222
ParsingToolFunction,
2323
} from '../../../lib/RunnableFunction';
24+
import { RunnerOptions } from '../../../lib/AbstractChatCompletionRunner';
2425
import { ChatCompletionToolRunnerParams } from '../../../lib/ChatCompletionRunner';
2526
export { ChatCompletionToolRunnerParams } from '../../../lib/ChatCompletionRunner';
2627
import { ChatCompletionStreamingToolRunnerParams } from '../../../lib/ChatCompletionStreamingRunner';
@@ -119,19 +120,19 @@ export class Completions extends APIResource {
119120
runTools<
120121
Params extends ChatCompletionToolRunnerParams<any>,
121122
ParsedT = ExtractParsedContentFromParams<Params>,
122-
>(body: Params, options?: Core.RequestOptions): ChatCompletionRunner<ParsedT>;
123+
>(body: Params, options?: RunnerOptions): ChatCompletionRunner<ParsedT>;
123124

124125
runTools<
125126
Params extends ChatCompletionStreamingToolRunnerParams<any>,
126127
ParsedT = ExtractParsedContentFromParams<Params>,
127-
>(body: Params, options?: Core.RequestOptions): ChatCompletionStreamingRunner<ParsedT>;
128+
>(body: Params, options?: RunnerOptions): ChatCompletionStreamingRunner<ParsedT>;
128129

129130
runTools<
130131
Params extends ChatCompletionToolRunnerParams<any> | ChatCompletionStreamingToolRunnerParams<any>,
131132
ParsedT = ExtractParsedContentFromParams<Params>,
132133
>(
133134
body: Params,
134-
options?: Core.RequestOptions,
135+
options?: RunnerOptions,
135136
): ChatCompletionRunner<ParsedT> | ChatCompletionStreamingRunner<ParsedT> {
136137
if (body.stream) {
137138
return ChatCompletionStreamingRunner.runTools(

0 commit comments

Comments
 (0)