DashScope
DashScope is a platform developed by Alibaba Cloud. It provides an interface for model visualization, monitoring, and debugging, particularly when working with AI/ML models in production environments. The platform allows users to visualize performance metrics, track model behavior, and identify potential issues early on in the deployment cycle.
Qwen models are a series of generative AI models developed by Alibaba Cloud. The Qwen family of models are specifically designed for tasks like text generation, summarization, question answering, and various NLP tasks.
You can refer to DashScope Document for more details. LangChain4j integrates with DashScope by Using DashScope Java SDK
Maven Dependency
Since 1.0.0-alpha1
, langchain4j-dashscope
has migrated to langchain4j-community
and is renamed to
langchain4j-community-dashscope
.
Before 1.0.0-alpha1
:
<dependency>
<groupId>dev.langchain4j</groupId>
<artifactId>langchain4j-dashscope</artifactId>
<version>${previous version here}</version>
</dependency>
1.0.0-alpha1
and later:
<dependency>
<groupId>dev.langchain4j</groupId>
<artifactId>langchain4j-community-dashscope</artifactId>
<version>${latest version here}</version>
</dependency>
Or, you can use BOM to manage dependencies consistently:
<dependencyManagement>
<dependency>
<groupId>dev.langchain4j</groupId>
<artifactId>langchain4j-community-bom</artifactId>
<version>${latest version here}</version>
<typ>pom</typ>
<scope>import</scope>
</dependency>
</dependencyManagement>
Configurable Parameters
QwenEmbeddingModel
has following parameters to configure when you initialize it:
Property | Description | Default Value |
---|---|---|
baseUrl | The URL to connect to. You can use HTTP or websocket to connect to DashScope | https://dashscope.aliyuncs.com/api/v1/services/embeddings/text-embedding/text-embedding |
apiKey | The API Key | |
modelName | The model to use. | text-embedding-v2 |