7 小时以前 9bad721754fe8bbe2e5f459d0706e0fefac569f3
yudao-module-ai/src/main/java/cn/iocoder/yudao/module/ai/framework/ai/config/YudaoAiProperties.java
@@ -3,14 +3,27 @@
import lombok.Data;
import org.springframework.boot.context.properties.ConfigurationProperties;
import java.time.Duration;
/**
 * 芋道 AI 配置类
 * 超级管理员 AI 配置类
 */
@ConfigurationProperties(prefix = "yudao.ai")
@Data
public class YudaoAiProperties {
    /**
     * 单次大模型调用超时。
     * <p>
     * 必须有默认值:模型排队时若不设超时,请求会一直挂到 TCP 层超时,
     * 同期没有超时的前端 axios 也不会主动断开,用户界面会永远转圈。
     */
    private Duration timeout = Duration.ofSeconds(60);
    private WebSearch webSearch;
    /** 向量库配置 */
    private VectorStore vectorStore = new VectorStore();
    @Data
    public static class WebSearch {
@@ -18,4 +31,28 @@
        private String apiKey;
    }
    @Data
    public static class VectorStore {
        /** 向量库类型:milvus */
        private String type = "milvus";
        /** Milvus 配置 */
        private Milvus milvus = new Milvus();
        @Data
        public static class Milvus {
            /** 是否初始化 Schema */
            private boolean initializeSchema = true;
            /** 数据库名称 */
            private String databaseName = "default";
            /** 集合名称 */
            private String collectionName = "knowledge_segment";
            /** 主机地址 */
            private String host = "127.0.0.1";
            /** 端口 */
            private int port = 19530;
        }
    }
}