Class SpringAIOpenrouterConfig

java.lang.Object
com.bytedesk.ai.springai.providers.openrouter.SpringAIOpenrouterConfig

@Configuration @ConditionalOnProperty(name="spring.ai.openrouter.chat.enabled", havingValue="true", matchIfMissing=false) public class SpringAIOpenrouterConfig extends Object
Openrouter
  • Field Details

    • baseUrl

      @Value("${spring.ai.openrouter.base-url:https://api.openrouter.com}") private String baseUrl
    • apiKey

      @Value("${spring.ai.openrouter.api-key:sk-xxx}") private String apiKey
    • model

      @Value("${spring.ai.openrouter.chat.options.model:gpt-4o}") private String model
    • temperature

      @Value("${spring.ai.openrouter.chat.options.temperature:0.7}") private Double temperature
  • Constructor Details

    • SpringAIOpenrouterConfig

      public SpringAIOpenrouterConfig()
  • Method Details

    • openrouterApi

      @Bean("openrouterApi") org.springframework.ai.openai.api.OpenAiApi openrouterApi()
    • openrouterChatOptions

      @Bean("openrouterChatOptions") org.springframework.ai.openai.OpenAiChatOptions openrouterChatOptions()
    • openrouterChatModel

      @Bean("openrouterChatModel") org.springframework.ai.openai.OpenAiChatModel openrouterChatModel()
    • openrouterChatClient

      @Bean("openrouterChatClient") org.springframework.ai.chat.client.ChatClient openrouterChatClient()