[Developer] add KB Select AI Team ORDS MCP tool
This commit is contained in:
@@ -17,7 +17,7 @@ public record BackofficeProperties(
|
||||
public record Token(int maxDays) {
|
||||
}
|
||||
|
||||
public record Ords(String baseUrl, Duration timeout) {
|
||||
public record Ords(String baseUrl, Duration timeout, Duration agentTimeout) {
|
||||
}
|
||||
|
||||
public record Ai(
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
package com.cloudhandson.vpdbackoffice.config;
|
||||
|
||||
import java.time.Duration;
|
||||
import org.springframework.beans.factory.annotation.Qualifier;
|
||||
import org.springframework.boot.web.client.RestTemplateBuilder;
|
||||
import org.springframework.context.annotation.Bean;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
@@ -17,4 +18,14 @@ public class OrdsClientConfig {
|
||||
.setReadTimeout(timeout)
|
||||
.build();
|
||||
}
|
||||
|
||||
@Bean
|
||||
@Qualifier("ordsAgentRestTemplate")
|
||||
RestTemplate ordsAgentRestTemplate(BackofficeProperties properties) {
|
||||
Duration timeout = properties.ords().agentTimeout();
|
||||
return new RestTemplateBuilder()
|
||||
.setConnectTimeout(timeout)
|
||||
.setReadTimeout(timeout)
|
||||
.build();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user