{{var}}
model_name
, temperature
, frequency_penalty
, presence_penalty
, max_tokens
, top_p
, response_format
, tool_choice
, tools
type="placeholder"
, name="..."
) in your template. At compile time, supply an array of messages for that key; {{var}}
variables are substituted in all message contents.
await client.open()
; Python: client.create()
)saveCurrentDraft()
; Python: save_current_draft()
)commitCurrentVersion("msg", true)
; Python: commit_current_version
)createNewVersion()
; Python: create_new_version()
)delete()
; Python: delete()
)“production”
prod-a
and prod-b
), randomly select one, compile variables, and send the compiled messages to OpenAI.
compile()
API replaces {{var}}
in string contents and preserves structured contents. Ensure your template contains the variables you pass (e.g., {{name}}
, {{city}}
).{{var}}
substitution