Setup
Accessing watsonx models can be done either through watsonx SaaS on IBM Cloud or using a dedicated watsonx.ai Software instance.watsonx.ai SaaS - IBM Cloud
To get started with watsonx SaaS, visit the registration page. If you do not have an existing IBM Cloud account, you can sign up for a free trial. To authenticate to watsonx.ai SaaS with Continue, you will need to create a project and set up an API key. Then, in continue:- Set apiBase to your watsonx SaaS endpoint, e.g.
https://us-south.ml.cloud.ibm.com
for US South region. - Set projectId to your watsonx project ID.
- Set apiKey to your watsonx API Key.
watsonx.ai Software
To authenticate to your watsonx.ai Software instance with Continue, you can use eitherusername/password
or ZenApiKey
method:
- Option 1 (Recommended): using
ZenApiKey
authentication:- Set apiBase to your watsonx software endpoint, e.g.
https://cpd-watsonx.apps.example.com
. - Set projectId to your watsonx project ID.
- Set apiKey to your watsonx Zen API Key. To generate it:
- Log in to the CPD web client.
- From the toolbar, click your avatar.
- Click Profile and settings.
- Click API key > Generate new key.
- Click Generate.
- Click Copy and save your key somewhere safe. You cannot recover this key if you lose it.
- Generate your ZenApiKey by running the following command in your preferred terminal:
echo "<username>:<apikey>" | base64
, replacing<username>
with your CPD username and<apikey>
with the API Key you just created.
- Set apiBase to your watsonx software endpoint, e.g.
- Option 2: using
username/password
authentication:- Set apiBase to your watsonx software endpoint, e.g.
https://cpd-watsonx.apps.example.com
. - Set projectId to your watsonx project ID.
- Set API Key to your watsonx Username and Password using
username:password
as format.
- Set apiBase to your watsonx software endpoint, e.g.
Configuration
Add the following configuration:config.yaml
apiVersion
is optional and defaults to the latest version.
If you are using a custom deployment endpoint, set deploymentID
to the model’s deployment ID. You can find it in the watsonx.ai Prompt Lab UI by selecting the corresponding model and opening the </>
tab on the right, which will display the endpoint’s URL containing the deployment ID.
config.yaml
Configuration Options
Make sure to specify a template name, such asgranite
or llama3
, and to set the contextLength
to the model’s context window size.
You can also configure generation parameters, such as temperature, topP, topK, frequency penalty, and stop sequences:
config.yaml
Tab Auto Complete Model
Granite models are recommended for tab auto complete. The configuration is similar to that of the chat models:config.yaml
Embeddings Model
To view the list of available embeddings models, visit this page.config.yaml
Reranker
config.yaml