Skip to main content

Module encode

Module encode 

Source
Expand description

Encoding of SIM transcript expressions into OpenAI request/response JSON.

Functionsยง

encode_openai_request
Encodes a model-request transcript into OpenAI chat-completion request JSON, applying the model, streaming, and tools settings from options.
encode_openai_response
Encodes a response transcript into OpenAI chat-completion response JSON.
encode_openai_responses_response
Encodes a response transcript into OpenAI Responses API response JSON, stamping it with response_id and created_at_ms.