Skip to content

Commit

Permalink
polish
Browse files Browse the repository at this point in the history
  • Loading branch information
rajadilipkolli committed May 16, 2024
1 parent 6ba20b1 commit 09eb687
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ public class LoggingConfig {
private static final Logger LOGGER = LoggerFactory.getLogger(LoggingConfig.class);

@Bean
public RestClientCustomizer restClientCustomizer() {
RestClientCustomizer restClientCustomizer() {
return restClientBuilder -> restClientBuilder
.requestFactory(new BufferingClientHttpRequestFactory(new HttpComponentsClientHttpRequestFactory()))
.requestInterceptor((request, body, execution) -> {
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
package com.example.ai.config;

import io.swagger.v3.oas.annotations.OpenAPIDefinition;
import io.swagger.v3.oas.annotations.info.Info;
import io.swagger.v3.oas.annotations.servers.Server;
import org.springframework.context.annotation.Configuration;

@Configuration(proxyBeanMethods = false)
@OpenAPIDefinition(info = @Info(title = "chatmodel-springai", version = "v1.0.0"), servers = @Server(url = "/"))
public class SwaggerConfig {}
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
public class RestClientBuilderConfig {

@Bean
public RestClientCustomizer restClientCustomizer() {
RestClientCustomizer restClientCustomizer() {
return restClientBuilder -> restClientBuilder.requestFactory(
ClientHttpRequestFactories.get(ClientHttpRequestFactorySettings.DEFAULTS
.withConnectTimeout(Duration.ofSeconds(60))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
public class ResponseHeadersModification {

@Bean
public RestClientCustomizer restClientCustomizer() {
RestClientCustomizer restClientCustomizer() {
return restClientBuilder -> restClientBuilder.requestInterceptor((request, body, execution) -> {
ClientHttpResponse response = execution.execute(request, body);
return new CustomClientHttpResponse(response);
Expand Down

0 comments on commit 09eb687

Please sign in to comment.