Example

Groq Params

ParameterTypeDefaultDescription
idstr"llama3-groq-70b-8192-tool-use-preview"The specific model ID used for generating responses.
namestr"Groq"The name identifier for the agent.
providerstr"Groq"The provider of the model.
frequency_penaltyOptional[float]-A number between -2.0 and 2.0. Positive 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.
logit_biasOptional[Any]-A JSON object that modifies the likelihood of specified tokens appearing in the completion by mapping token IDs to bias values between -100 and 100.
logprobsOptional[bool]-Whether to return log probabilities of the output tokens.
max_tokensOptional[int]-The maximum number of tokens to generate in the chat completion.
presence_penaltyOptional[float]-A number between -2.0 and 2.0. Positive values penalize new tokens based on whether they appear in the text so far, increasing the model's likelihood to talk about new topics.
response_formatOptional[Dict[str, Any]]-Specifies the format that the model must output. Setting to { "type": "json_object" } enables JSON mode, ensuring the message generated is valid JSON.
seedOptional[int]-A seed value for deterministic sampling, ensuring repeated requests with the same seed and parameters return the same result.
stopOptional[Union[str, List[str]]]-Up to 4 sequences where the API will stop generating further tokens.
temperatureOptional[float]-The sampling temperature to use, between 0 and 2. Higher values like 0.8 make the output more random, while lower values like 0.2 make it more focused and deterministic.
top_logprobsOptional[int]-The number of top log probabilities to return for each generated token.
top_pOptional[float]-Nucleus sampling parameter. The model considers the results of the tokens with top_p probability mass.
userOptional[str]-A unique identifier representing your end-user, helping to monitor and detect abuse.
request_paramsOptional[Dict[str, Any]]-Additional parameters to include in the request.
api_keyOptional[str]-The API key for authenticating requests to the service.
base_urlOptional[Union[str, httpx.URL]]-The base URL for making API requests to the service.
timeoutOptional[int]-The timeout duration for requests, specified in seconds.
max_retriesOptional[int]-The maximum number of retry attempts for failed requests.
client_paramsOptional[Dict[str, Any]]-Additional parameters for client configuration.
groq_clientOptional[GroqClient]-An instance of GroqClient provided for making API requests.

Groq is a subclass of the Model class and has access to the same params.