Setting up connection assets
watsonx Code Assistant Standard plan
A connection asset contains the connection details of your vector store. Watsonx Code Assistant uses the connection asset to connect to your vector store and fetch the context for your instructions in the chat.
Before you begin
- Review the use case scenarios. For more information, see Use case scenarios.
- Ensure that you have an IBM Cloud account.
- Provision an instance of Milvus or Elasticsearch DB on IBM Cloud.
- Obtain the list of indexed code repositories and document in the vector store.
Creating a connection asset
Watsonx Code Assistant uses connection assets in your deployment space to access code repository content that is indexed in your vector store. Create a connection asset for each index in your vector store.
The name of the connection asset must match the name of the code repository. For example, if the repository url is git@github.ibm.com:my-org/mycode.git
, the name of the connection asset must be mycode
. If you create
connection asset for the documentation indexes, the name of the connection asset must be in the docs_<name>
format. You can replace <name>
with the name of the indexed document with the prefix docs
.
Watsonx Code Assistant uses the description section of the connection asset to read more configuration details about your vector store.
To create a connection asset:
-
Open your watsonx Code Assistant service instance.
-
Click the Navigation Menu icon
, then select Deployments.
-
Select your deployment space.
-
Go to the Assets tab of your deployment space.
-
Go to Import assets > Data access > Connection.
-
Select the Elasticsearch or Milvus connection type in Add connection.
-
For the Elasticsearch connection type, add the following fields:
Elasticsearch connection type settings Parameter Description Name Enter the name of the Elasticsearch connection. The Elasticsearch connection name must be the same as the repository name to use the @repo
command or start withdocs_
to use the@docs
command.Description Enter the additional information of the connection asset in the JSON format with the following fields:
{
"index_name": "add the name of your index",
"db_type": "elasticsearch",
"ssl_assert_fingerprint": "your_fingerprint",
"embedding_details": {
"model_id": "msmarco-MiniLM-L-6-v3"
}
}URL Enter the connection URL for your Elasticsearch instance. Username and Password Enter the credentials of your Elasticsearch instance. SSL Certificate Optional: Enter the SSL certificate to create a secure connection with the Elasticsearch instance. You can't test your Elasticsearch connection without an SSL Certificate, but you can click Save connection anyway to save the connection. -
For the Milvus connection type, add the following fields:
Milvus connection type settings Parameter Description Name Enter the name of the Milvus connection. The Milvus connection name must be the same as the repository name the @repo
command or start withdocs_
to use the@docs
command.Description Enter the additional information of the connection asset in the JSON format with the following fields:
{
"index_name": ""add the name of your index",
"db_type": "milvus",
"embedding_details": {
"model_id": "msmarco-MiniLM-L-6-v3"
}
}Host Enter the host URL for your Milvus instance. Port Enter the port number for your Milvus instance. Database Set the Database parameter to default. Username and Password Set the username to ibmlhapikey
and enter an API key that is generated from the IBM Cloud account with the IBM watsonx.data instance in the Password field.SSL Certificate Optional: Enter the SSL certificate to create a secure connection with the Milvus instance. You can test your Milvus connection without an SSL Certificate.
-
-
Click Create.