OptionalcallbacksOptionalconfigurableRuntime values for attributes previously made configurable on this Runnable, or sub-Runnables.
OptionalfrequencyPositive values penalize new tokens based on their existing frequency in the text so far, decreasing the model's likelihood to repeat the same line verbatim.
OptionalheadersOptionallogitIncreasing or decreasing probability of tokens being selected during generation; a positive bias makes a token more likely to appear, while a negative bias makes it less likely.
OptionallogprobsWhether 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.
Optionalls_Describes the format of structured outputs. This should be provided if an output is considered to be structured
An object containing the method used for structured output (e.g., "jsonMode").
Optionalschema?: JsonSchema7TypeThe JSON schema describing the expected output structure.
OptionalmaxThe maximum number of tokens that can be generated in the chat completion. The total length of input tokens and generated tokens is limited by the model's context length. Set to 0 for the model's configured max generated tokens.
OptionalmaxMaximum number of parallel calls to make.
OptionalmaxOptionalmaxThe maximum number of tokens that can be generated in the chat completion. The total length of input tokens and generated tokens is limited by the model's context length. Set to 0 for the model's configured max generated tokens. This value is now deprecated in favor of maxCompletionTokens. If specified together with maxCompletionTokens, maxTokens will be ignored.
OptionalmetadataMetadata for this call and any sub-calls (eg. a Chain calling an LLM). Keys should be strings, values should be JSON-serializable.
OptionalnHow many chat completion choices to generate for each input message. Note that you will be charged based on the number of generated tokens across all of the choices. Keep n as 1 to minimize costs.
OptionalpresencePositive values penalize new tokens based on whether they appear in the text so far, increasing the model's likelihood to talk about new topics.
OptionalprojectThe project that contains the resource. Either space_id or project_id has to be given.
OptionalpromptOptionalrecursionMaximum number of times a call can recurse. If not provided, defaults to 25.
OptionalresponseThe chat response format parameters.
OptionalrunUnique identifier for the tracer run for this call. If not provided, a new UUID will be generated.
OptionalrunName for the tracer run for this call. Defaults to the name of the class.
OptionalseedRandom number generator seed to use in sampling mode for experimental repeatability.
OptionalsignalAbort signal for this call. If provided, the call will be aborted when the signal is aborted.
OptionalspaceThe space that contains the resource. Either space_id or project_id has to be given.
OptionalstopStop sequences are one or more strings which will cause the text generation to stop if/when they are produced as part of the output. Stop sequences encountered prior to the minimum number of tokens being generated will be ignored.
OptionalstreamingOptionaltagsTags for this call and any sub-calls (eg. a Chain calling an LLM). You can use these to filter calls.
OptionaltemperatureWhat sampling temperature to use,. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic.
We generally recommend altering this or top_p but not both.
OptionaltimeTime limit in milliseconds - if not completed within this time, generation will stop. The text generated so far will be returned along with the `TIME_LIMIT`` stop reason. Depending on the users plan, and on the model being used, there may be an enforced maximum time limit.
OptionaltimeoutTimeout for this call in milliseconds.
OptionaltoolUsing none means the model will not call any tool and instead generates a message.
The following options (auto and required) are not yet supported.
Using auto means the model can pick between generating a message or calling one or more tools. Using
required means the model must call one or more tools.
Only one of tool_choice_option or tool_choice must be present.
Optionaltool_Specifies how the chat model should use tools.
undefined
Possible values:
- "auto": The model may choose to use any of the provided tools, or none.
- "any": The model must use one of the provided tools.
- "none": The model must not use any tools.
- A string (not "auto", "any", or "none"): The name of a specific tool the model must use.
- An object: A custom schema specifying tool choice parameters. Specific to the provider.
Note: Not all providers support tool_choice. An error will be thrown
if used with an unsupported model.
OptionaltoolsTool functions that can be called with the response.
OptionaltopAn integer specifying the number of most likely tokens to return at each token position, each with an
associated log probability. The option logprobs must be set to true if this parameter is used.
OptionaltopPAn alternative to sampling with temperature, called nucleus sampling, where the model considers the results of the tokens with top_p probability mass. So 0.1 means only the tokens comprising the top 10% probability mass are considered.
We generally recommend altering this or temperature but not both.
Optionalwatsonx
Callbacks for this call and any sub-calls (eg. a Chain calling an LLM). Tags are passed to all callbacks, metadata is passed to handle*Start callbacks.