Back

create-completion (clj)

(source)

function

(create-completion params) (create-completion params options)
Creates a completion for the provided prompt and parameters Example: ``` (create-completion {:model "text-davinci-003" :prompt "Say this is a test" :max_tokens 7 :temperature 0}) ``` For Azure OpenAI pass `{:impl :azure}` for the `options` argument Streaming of token events is supported via the `:stream` param, see [Streaming Tokens](/doc/03-streaming.md) Also see the [OpenAI](https://platform.openai.com/docs/api-reference/completions/create) / [Azure OpenAI](https://learn.microsoft.com/en-us/azure/cognitive-services/openai/reference#completions) documentation

Examples