Skip to main content
The IBM WatsonX model provides access to IBM’s language models.

Parameters

ParameterTypeDefaultDescription
idstr"meta-llama/llama-3-1-70b-instruct"The id of the IBM WatsonX model to use
namestr"IBMWatsonx"The name of the model
providerstr"IBM"The provider of the model
api_keyOptional[str]NoneThe API key for IBM WatsonX (defaults to WATSONX_API_KEY env var)
base_urlstr"https://us-south.ml.cloud.ibm.com/ml/v1/text/chat"The base URL for the IBM WatsonX API
project_idOptional[str]NoneThe project ID for IBM WatsonX (defaults to WATSONX_PROJECT_ID env var)
| retries | int | 0 | Number of retries to attempt before raising a ModelProviderError | | delay_between_retries | int | 1 | Delay between retries, in seconds | | exponential_backoff | bool | False | If True, the delay between retries is doubled each time | IBM WatsonX extends the OpenAI-compatible interface and supports most parameters from OpenAI.