After you install watsonx Code
Assistant, you can enable checking to confirm if a generated
code suggestion is similar to other code sources.
Procedure
-
Create an IBM
Cloud account. For more
information, see https://www.ibm.com/cloud.
- Create a service ID and API key for your IBM
Cloud account. For more information, see Creating and working with service IDs.
- Verify you can connect to IBM
Cloud from
your Red Hat®
OpenShift® cluster where Cloud Pak for Data is installed.
- Create the following environment variable for your API key:
export API_KEY=<your-api-key>
- Replace
<your-api-key> with the API key for your service
ID.
- Run the following commands from your cluster:
oc create secret generic wca-similarity-service-key \
--namespace=${PROJECT_CPD_INST_OPERANDS} \
--from-literal=apiKey=${API_KEY}
oc patch wca wca-cr \
--namespace=${PROJECT_CPD_INST_OPERANDS} \
--type=merge \
--patch='{"spec":{"similarity_feature":{"enabled":true}}}'