continue watsonx
1.0.0
Simple CustomLLM definition to leverage IBM watsonx LLMs on Continue extentions.
Note: watsonx is now available natively as a provider in continue !
granite-34b-code-instruct
.~/.continue/
directory
cd ~/.continue/
git clone https://github.com/NoeSamaille/continue-watsonx.git
mv ~/.continue/config.ts ~/.continue/config-backup.ts
config-sample.ts
to replace ~/.continue/config.ts
:
cp ~/.continue/continue-watsonx/src/config-sample.ts ~/.continue/config.ts
config.ts
, manually add the code to load the Watsonx
module and use Watsonx.addConfig()
:
import {watsonx_modifyConfig} from "./continue-watsonx/src/watsonx";
export function modifyConfig(config: Config): Config {
return watsonx_modifyConfig(config);
}
src/watsonxenv.ts.sample
to src/watsonxenv.ts
and update WatsonxEnv
with your target configuration:
cp ~/.continue/continue-watsonx/src/watsonxenv.ts.sample ~/.continue/continue-watsonx/src/watsonxenv.ts
YOUR_WATSONX_URL
with your watsonx SaaS endpoint, e.g. https://us-south.ml.cloud.ibm.com
for US South region.YOUR_WATSONX_APIKEY
with your watsonx API Key.YOUR_WATSONX_PROJECT_ID
with your watsonx project ID.YOUR_WATSONX_URL
with your watsonx software endpoint, e.g. https://cpd-watsonx.apps.example.com
.YOUR_WATSONX_USERNAME
with your watsonx username, e.g. cpadmin
.YOUR_WATSONX_PASSWORD
with your watsonx password.YOUR_WATSONX_PROJECT_ID
with your watsonx project ID.YOUR_WATSONX_URL
with your watsonx software endpoint, e.g. https://cpd-watsonx.apps.example.com
.YOUR_WATSONX_ZENAPIKEY
with your watsonx Zen API Key. To generate it:
echo ":" | base64
, replacing
with your CPD username and
with the API Key you just created.YOUR_WATSONX_PROJECT_ID
with your watsonx project ID.Note: if using watsonx software instance with self-signed/untrusted TLS certificates, uncomment the following lines in ~/.continue/continue-watsonx/src/watsonx.ts
to bypass SSL certificate verification:
declare var process : {
env: {
NODE_TLS_REJECT_UNAUTHORIZED: any
}
}
process.env["NODE_TLS_REJECT_UNAUTHORIZED"] = 0;
models
to comment/uncomment/edit model list based on LLMs deployed in your watsonx instance.