首页>代码>IDEA + maven + SpringAI + 讯飞星火大模型实现简单智能对话>/studyAI/src/main/java/cn/temptation/config/SparkConfig.java
package cn.temptation.config;

import io.github.briqt.spark4j.SparkClient;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

@Configuration
@ConfigurationProperties(prefix = "xunfei.client")
public class SparkConfig {
    private String appid;
    private String apiSecret;
    private String apiKey;

    @Bean
    public SparkClient sparkClient() {
        SparkClient sparkClient = new SparkClient();
        sparkClient.appid = this.appid;
        sparkClient.apiSecret = this.apiSecret;
        sparkClient.apiKey = this.apiKey;

        return sparkClient;
    }
}
最近下载更多
最代码官方  LV168 11月15日
最近浏览更多
GakkiMarryMe  LV9 昨天
yunannan  LV2 12月8日
dapeng0011  LV15 12月5日
Rommel  LV27 12月4日
wanglinddad  LV55 12月2日
冰枫xjz8  LV31 12月1日
Empty001 11月30日
暂无贡献等级
zq1685  LV4 11月26日
暂无贡献等级
顶部 客服 微信二维码 底部
>扫描二维码关注最代码为好友扫描二维码关注最代码为好友