跳至主要內容

千帆(文言一心)接入

起凡小于 1 分钟

千帆(文言一心)接入

通用配置

请参考通用配置

依赖配置

<dependency>
    <groupId>org.springframework.ai</groupId>
    <artifactId>spring-ai-qianfan-spring-boot-starter</artifactId>
</dependency>

密钥配置

千帆 API Key和Secret Key申请open in new window

spring:
  ai:
    # 百度千帆
    qian-fan:
      api-key: xxx
      secret-key: xxx

使用

private final QianFanChatModel qianFanChatModel;

消息发送案例

请参考消息发送