Connection configuration

更新时间:
复制 MD 格式

When you develop Application Flows, you need to access external services like models and databases. You can create reusable connections to store access credentials and configurations, and then select these connections directly in Application Flow nodes.

Model service connection

A Model Service connection manages the various model services invoked in a LangStudio workflow.

To configure a connection, go to LangStudio > Connection > Model Service, and click New Connection. The following table describes the key parameters for different connection types.

Connection type

Description

General LLM Service

Configures an LLM service that is compatible with the OpenAI protocol.

  • Service Provider:

    • PAI-EAS Model Service: Select an LLM service deployed to EAS. EAS automatically populates the base_url and api_key fields with the service's VPC endpoint and token.

    • Third-party Model Service: Use a third-party service that is compatible with the OpenAI protocol. You must manually enter the base_url and api_key.

  • Model Name: The value of the model parameter in the OpenAI API request.

    For models from Model Gallery, the model name is on the model details page. To open it, click the model's card on the Model Gallery page.
  • Tool Call: Specifies whether the model supports the OpenAI API's Tool Call feature. When using an Agent node, you must select a model that supports Tool Call.

General Embedding Model Service

Configures an embedding model service deployed to EAS or a third-party platform.

General Multimodal Embedding Model Service

Configures a multimodal embedding model service deployed to EAS or a third-party platform. It supports the vectorization of multimodal data, including images and text.

Alibaba Cloud Model Studio Service

Enter an api_key from the same region as the base_url. For more information, see Get API Key.

DeepSeek Model Service

api_key: Go to the DeepSeek official website to create or find your api_key.

AI Search Open Platform Model Service

You must first activate the service. Then, refer to Get Service Endpoint and Manage API Keys to configure the endpoint and api_key.

Multimodal Label Model

Enables intelligent labeling of multimodal data.

General reranker service

Reranks the top-k documents that an embedding model returns. Only supports model services deployed from Model Gallery.

Database connection

A Database connection stores the access configurations for various databases.

To configure a connection, go to LangStudio > Connection > Database, and click New Connection. The following table describes the key parameters.

Database

Description

Search and Analysis Service - Elasticsearch

  • uri: The format is http://<private address>:<private port>. Log on to the Elasticsearch console and obtain the required values from the Basic Information section on the details page of the target Elasticsearch instance.

  • username/password: The default username is elastic, and the password is the login password that you set when you created the instance. If you forget the login password, you can reset the instance access password.

OpenSearch

  • url: The public access address of your OpenSearch Vector Search Edition instance.

    Note

    You must enable public access for the OpenSearch Vector Search Edition instance and add the IP addresses for EAS access to public or internal resources to the allowlist.

  • username/password: The username and password you entered when you created the OpenSearch Vector Search Edition instance.

Milvus

  • uri: The format is http://<Milvus internal access address>. Log on to the Milvus console and obtain the address from the Access Address section on the details page of the target instance.

  • token: The username and password for the Milvus instance. The format is <yourUsername>:<yourPassword>.

  • database: The database name (default: default).

Hologres

  • host/port: In the Hologres console, find the host and port for your VPC in the Network Information section of the instance's details page.

  • database: The database name you set when you create a database.

  • user/password: The username and password for a custom user that you created. For more information, see Create a custom user. When selecting the member role, choose Instance Super Administrator (SuperUser).

ApsaraDB RDS for MySQL

Search service connection

Create a connection for Alibaba Cloud IQS Internet Search to enable real-time internet search for LLM applications.

Prerequisites

Ensure that you have activated Alibaba Cloud Information Query Service. For more information, see New User Guide.

Configuration steps

  1. Go to LangStudio and select a region and Workspace.

  2. Go to the Connection > Search Service tab and click New Connection.

Custom connection

If the Model Service, Database, and Search Service connections do not meet your needs, you can create a Custom connection using a key-value pair.

Example: Configure a SerpApi connection.

  • Custom key: Enter api_key.

  • Custom value: Enter your SerpApi API Key.

    You can register for an account and get an API Key from the official SerpApi website (the free plan provides 100 searches per month).

Next steps

After you create a connection, you can use it in Application Flow development.