主题
千帆(Qianfan)
Maven 依赖
你可以在纯 Java 或 Spring Boot 应用中使用千帆与 LangChain4j。
纯 Java
NOTE
自 1.0.0-alpha1 起,langchain4j-qianfan 已迁移至 langchain4j-community,并更名为 langchain4j-community-qianfan。
在 1.0.0-alpha1 之前:
xml
<dependency>
<groupId>dev.langchain4j</groupId>
<artifactId>langchain4j-qianfan</artifactId>
<version>${previous version here}</version>
</dependency>1
2
3
4
5
2
3
4
5
1.0.0-alpha1 及更高版本:
xml
<dependency>
<groupId>dev.langchain4j</groupId>
<artifactId>langchain4j-community-qianfan</artifactId>
<version>${latest version here}</version>
</dependency>1
2
3
4
5
2
3
4
5
Spring Boot
NOTE
自 1.0.0-alpha1 起,langchain4j-qianfan-spring-boot-starter 已迁移至 langchain4j-community,并更名为 langchain4j-community-qianfan-spring-boot-starter。
在 1.0.0-alpha1 之前:
xml
<dependency>
<groupId>dev.langchain4j</groupId>
<artifactId>langchain4j-qianfan-spring-boot-starter</artifactId>
<version>${previous version here}</version>
</dependency>1
2
3
4
5
6
2
3
4
5
6
1.0.0-alpha1 及更高版本:
xml
<dependency>
<groupId>dev.langchain4j</groupId>
<artifactId>langchain4j-community-qianfan-spring-boot-starter</artifactId>
<version>${latest version here}</version>
</dependency>1
2
3
4
5
6
2
3
4
5
6
或者,你可以使用 BOM 来统一管理依赖:
xml
<dependencyManagement>
<dependency>
<groupId>dev.langchain4j</groupId>
<artifactId>langchain4j-community-bom</artifactId>
<version>${latest version here}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
</dependencyManagement>1
2
3
4
5
6
7
8
9
10
2
3
4
5
6
7
8
9
10
API
QianfanEmbeddingModel