endpoint
- Endpoint name in OpenAI API format:model
- Name of the model. Should only be set if endpoint is not set.provider
- Name of the provider. Should only be set if endpoint is not set.system_message
- An optional string containing the system message. Thismessages
- A list of messages comprising the conversation so far. This willfrequency_penalty
- Number between -2.0 and 2.0. Positive values penalize newlogit_bias
- Modify the likelihood of specified tokens appearing in thelogprobs
- Whether to return log probabilities of the output tokens or not.top_logprobs
- An integer between 0 and 20 specifying the number of mostmax_completion_tokens
- The maximum number of tokens that can be generated inn
- How many chat completion choices to generate for each input message. Notepresence_penalty
- Number between -2.0 and 2.0. Positive values penalize newresponse_format
- An object specifying the format that the model must output.seed
- If specified, a best effort attempt is made to samplestop
- Up to 4 sequences where the API will stop generating further tokens.stream
- If True, generates content as a stream. If False, generates contentstream_options
- Options for streaming response. Only set this when you setstream
- true.temperature
- What sampling temperature to use, between 0 and 2.top_p
- An alternative to sampling with temperature, called nucleus sampling,tools
- A list of tools the model may call. Currently, only functions aretool_choice
- Controls which (if any) tool is called by theparallel_tool_calls
- Whether to enable parallel function calling during tooluse_custom_keys
- Whether to use custom API keys or our unified API keystags
- Arbitrary number of tags to classify this API query as needed. Helpfuldrop_params
- Whether or not to drop unsupported OpenAI params by theregion
- A string used to represent the region where the endpoint islog_query_body
- Whether to log the contents of the query json body.log_response_body
- Whether to log the contents of the response json body.stateful
- Whether the conversation history is preserved within the messagesreturn_full_completion
- If False, only return the message contenttraced
- Whether to trace the generate method.cache
- If True, then the arguments will be stored in a local cache file, andextra_headers
- Additional “passthrough” headers for the request which areextra_query
- Additional “passthrough” query parameters for the request whichkwargs
- Additional “passthrough” JSON properties for the body of theUnifyError
: If the API key is missing.value
- The default cache bool.value
- The default drop params bool.value
- The endpoint name.value
- The default extra body.value
- The default extra headers.value
- The default extra query.value
- The default frequency penalty.value
- The default local cache bool.value
- The default log query body bool.value
- The default log response body bool.value
- The default logit bias.value
- The default logprobs.value
- The default max tokens.value
- The default messages.value
- The model name.value
- The default n value.value
- The default parallel tool calls bool.value
- The default presence penalty.value
- The provider name.value
- The default region.value
- The default response format.value
- The default return full completion bool.value
- The default seed value.value
- The default stateful bool.value
- The default stop value.value
- The default stream bool.value
- The default stream options.value
- The default system message.value
- The default tags.value
- The default temperature.value
- The default tool choice.value
- The default tools.value
- The default top logprobs.value
- The default top p value.value
- The default traced bool.value
- The default use custom keys bool.value
- The messages to append to the default.user_message
- A string containing the user message.system_message
- An optional string containing the system message. Thismessages
- A list of messages comprising the conversation so far, orfrequency_penalty
- Number between -2.0 and 2.0. Positive values penalize newlogit_bias
- Modify the likelihood of specified tokens appearing in thelogprobs
- Whether to return log probabilities of the output tokens or not.top_logprobs
- An integer between 0 and 20 specifying the number of mostmax_completion_tokens
- The maximum number of tokens that can be generated inn
- How many chat completion choices to generate for each input message. Notepresence_penalty
- Number between -2.0 and 2.0. Positive values penalize newresponse_format
- An object specifying the format that the model must output.seed
- If specified, a best effort attempt is made to samplestop
- Up to 4 sequences where the API will stop generating further tokens.stream
- If True, generates content as a stream. If False, generates contentstream_options
- Options for streaming response. Only set this when you setstream
- true.temperature
- What sampling temperature to use, between 0 and 2.top_p
- An alternative to sampling with temperature, called nucleus sampling,tools
- A list of tools the model may call. Currently, only functions aretool_choice
- Controls which (if any) tool is called by theparallel_tool_calls
- Whether to enable parallel function calling during tooluse_custom_keys
- Whether to use custom API keys or our unified API keystags
- Arbitrary number of tags to classify this API query as needed. Helpfuldrop_params
- Whether or not to drop unsupported OpenAI params by theregion
- A string used to represent the region where the endpoint islog_query_body
- Whether to log the contents of the query json body.log_response_body
- Whether to log the contents of the response json body.stateful
- Whether the conversation history is preserved within the messagesreturn_full_completion
- If False, only return the message contentcache
- If True, then the arguments will be stored in a local cache file, andextra_headers
- Additional “passthrough” headers for the request which areextra_query
- Additional “passthrough” query parameters for the request whichkwargs
- Additional “passthrough” JSON properties for the body of theUnifyError
: If an error occurs during content generation.BadRequestError
- If there was an HTTP error.ValueError
- If there was an error parsing the JSON response.Unify
instance), with the
exact same configuration as this asynchronous (AsyncUnify
) client.
Returns:
A Unify
instance with the same configuration as this AsyncUnify
instance.