mirror of
https://github.com/earendil-works/pi.git
synced 2026-06-18 15:54:04 +08:00
Fix OpenAI responses timeout option (#706)
This commit is contained in:
committed by
GitHub
Unverified
parent
b74535dc85
commit
653025e6ca
@@ -87,7 +87,10 @@ export const streamOpenAIResponses: StreamFunction<"openai-responses"> = (
|
||||
const apiKey = options?.apiKey || getEnvApiKey(model.provider) || "";
|
||||
const client = createClient(model, context, apiKey);
|
||||
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 });
|
||||
|
||||
let currentItem: ResponseReasoningItem | ResponseOutputMessage | ResponseFunctionToolCall | null = null;
|
||||
|
||||
Reference in New Issue
Block a user