Optional
apiOptional
cacheOptional
callbackOptional
callbacksOptional
logprobsWhether to return log probabilities of the output tokens or not. If true, returns the log probabilities of each output token returned in the content of message.
Optional
maxThe maximum number of concurrent calls that can be made.
Defaults to Infinity
, which means no limit.
Optional
maxThe maximum number of retries that can be made for a single call, with an exponential backoff between each attempt. Defaults to 6.
Optional
maxMaximum number of tokens to generate in the completion. -1 returns as many tokens as possible given the prompt and the model's maximum context size.
Optional
metadataModel name to use
Optional
modelHolds any additional parameters that are valid to pass to openai.createCompletion
that are not explicitly specified on this class.
Model name to use
Alias for model
Number of completions to generate for each prompt
Optional
onCustom handler to handle failed attempts. Takes the originally thrown error object as input, and should itself throw an error if the input error is not retryable.
Optional
prefixChatGPT messages to pass as a prefix to the prompt
Optional
stopList of stop words to use when generating
Alias for stopSequences
Optional
stopList of stop words to use when generating
Optional
streamWhether or not to include token usage data in streamed chunks.
Whether to stream the results or not. Enabling disables tokenUsage reporting
Optional
supportsWhether the model supports the strict
argument when passing in tools.
If undefined
the strict
argument will not be passed to OpenAI.
Optional
tagsSampling temperature to use
Optional
timeoutTimeout to use when making requests to OpenAI.
Optional
togetherAIApiThe TogetherAI API key to use for requests.
Alias for apiKey
Optional
topAn integer between 0 and 5 specifying the number of most likely tokens to return at each token position, each with an associated log probability. logprobs must be set to true if this parameter is used.
Total probability mass of tokens to consider at each step
Optional
userUnique string identifier representing your end-user, which can help OpenAI to monitor and detect abuse.
Optional
verbose
The TogetherAI API key to use for requests.