Class SpringAIDashscopeEmbeddingConfig

java.lang.Object
com.bytedesk.ai.springai.providers.dashscope.SpringAIDashscopeEmbeddingConfig

@Configuration @ConditionalOnProperty(prefix="spring.ai.dashscope.embedding", name="enabled", havingValue="true", matchIfMissing=false) public class SpringAIDashscopeEmbeddingConfig extends Object
阿里云 DashScope 向量嵌入配置 https://java2ai.com/docs/dev/get-started/ 阿里云百炼大模型获取api key:https://bailian.console.aliyun.com/?apiKey=1#/api-key 阿里云百炼大模型模型列表:https://bailian.console.aliyun.com/?spm=a2c4g.11186623.0.0.11c67980m5X2VR#/model-market 阿里云百炼支持的embedding模型:text-embedding-v1, text-embedding-v2, text-embedding-v3
  • Field Details

    • dashscopeBaseUrl

      @Value("${spring.ai.dashscope.base-url:https://dashscope.aliyuncs.com}") private String dashscopeBaseUrl
    • dashscopeApiKey

      @Value("${spring.ai.dashscope.api-key:}") private String dashscopeApiKey
    • dashscopeEmbeddingApiKey

      @Value("${spring.ai.dashscope.embedding.api-key:${spring.ai.dashscope.api-key:}}") private String dashscopeEmbeddingApiKey
    • dashscopeEmbeddingModel

      @Value("${spring.ai.dashscope.embedding.options.model:text-embedding-v1}") private String dashscopeEmbeddingModel
  • Constructor Details

    • SpringAIDashscopeEmbeddingConfig

      public SpringAIDashscopeEmbeddingConfig()
  • Method Details

    • bytedeskDashscopeEmbeddingApi

      @Bean("bytedeskDashscopeEmbeddingApi") @Primary com.alibaba.cloud.ai.dashscope.api.DashScopeApi bytedeskDashscopeEmbeddingApi()
    • bytedeskDashscopeEmbeddingOptions

      @Bean("bytedeskDashscopeEmbeddingOptions") com.alibaba.cloud.ai.dashscope.embedding.DashScopeEmbeddingOptions bytedeskDashscopeEmbeddingOptions()
    • dashscopeEmbeddingModel

      @Bean("dashscopeEmbeddingModel") @ConditionalOnProperty(name="spring.ai.model.embedding", havingValue="dashscope", matchIfMissing=false) com.alibaba.cloud.ai.dashscope.embedding.DashScopeEmbeddingModel dashscopeEmbeddingModel()