Skip to content

rulvar API reference


rulvar API reference / @rulvar/openai / buildChatCompletionsParams

Function: buildChatCompletionsParams()

ts
function buildChatCompletionsParams(req, ids): Record<string, unknown>;

Defined in: packages/openai/src/wire.ts:458

The Chat Completions degraded path: delta-patched chunk assembly instead of typed SSE, nested function tools with explicit strict where supported, response_format instead of text.format, no reasoning item replay. Selected by caps (api: 'chat'), visible in events, never silent.

Parameters

ParameterType
reqChatRequest
idsOpenAiIdMap

Returns

Record&lt;string, unknown&gt;