mirror of
https://github.com/getcompanion-ai/co-mono.git
synced 2026-04-20 02:03:16 +00:00
Fix OpenAI responses timeout option (#706)
This commit is contained in:
parent
b74535dc85
commit
653025e6ca
1 changed files with 4 additions and 1 deletions
|
|
@ -87,7 +87,10 @@ export const streamOpenAIResponses: StreamFunction<"openai-responses"> = (
|
||||||
const apiKey = options?.apiKey || getEnvApiKey(model.provider) || "";
|
const apiKey = options?.apiKey || getEnvApiKey(model.provider) || "";
|
||||||
const client = createClient(model, context, apiKey);
|
const client = createClient(model, context, apiKey);
|
||||||
const params = buildParams(model, context, options);
|
const params = buildParams(model, context, options);
|
||||||
const openaiStream = await client.responses.create(params, { signal: options?.signal, timeout: undefined });
|
const openaiStream = await client.responses.create(
|
||||||
|
params,
|
||||||
|
options?.signal ? { signal: options.signal } : undefined,
|
||||||
|
);
|
||||||
stream.push({ type: "start", partial: output });
|
stream.push({ type: "start", partial: output });
|
||||||
|
|
||||||
let currentItem: ResponseReasoningItem | ResponseOutputMessage | ResponseFunctionToolCall | null = null;
|
let currentItem: ResponseReasoningItem | ResponseOutputMessage | ResponseFunctionToolCall | null = null;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue