forked from Sanders/TelegaBot
35 lines
787 B
Java
35 lines
787 B
Java
package ru.cathub.telegabot.configuration;
|
|
|
|
import lombok.Getter;
|
|
import lombok.Setter;
|
|
import org.springframework.boot.context.properties.ConfigurationProperties;
|
|
import org.springframework.boot.context.properties.EnableConfigurationProperties;
|
|
import org.springframework.context.annotation.Configuration;
|
|
|
|
@Configuration
|
|
@EnableConfigurationProperties
|
|
@ConfigurationProperties(prefix = "openrouter.api")
|
|
@Setter
|
|
public class OpenRouterConfig {
|
|
private String key;
|
|
private String url;
|
|
private String model;
|
|
|
|
@Bean
|
|
public RestTemplate restTemplate() {
|
|
return new RestTemplate();
|
|
}
|
|
|
|
public String getKey() {
|
|
return key;
|
|
}
|
|
|
|
public String getUrl() {
|
|
return url;
|
|
}
|
|
|
|
public String getModel() {
|
|
return model;
|
|
}
|
|
}
|