Skip to content

Commit

Permalink
Add logging
Browse files Browse the repository at this point in the history
  • Loading branch information
eddumelendez committed Aug 26, 2024
1 parent 49f035d commit e0fa56d
Showing 1 changed file with 7 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.ai.chat.client.ChatClient;
import org.springframework.ai.chat.client.advisor.SimpleLoggerAdvisor;
import org.springframework.ai.chat.model.ChatModel;
import org.springframework.ai.converter.BeanOutputConverter;
import org.springframework.beans.factory.annotation.Autowired;
Expand All @@ -18,7 +19,8 @@
import static org.assertj.core.api.Assertions.assertThat;

@SpringBootTest(classes = { ContainersConfiguration.class, IngestionConfiguration.class },
webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT)
webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT,
properties = { "logging.level.org.springframework.ai.chat.client.advisor=DEBUG" })
class TestcontainersHelpControllerTest {

private static final Logger logger = LoggerFactory.getLogger(TestcontainersHelpControllerTest.class);
Expand All @@ -39,7 +41,10 @@ class TestcontainersHelpControllerTest {

@BeforeEach
void setUp() {
this.chatClient = ChatClient.builder(this.chatModel).defaultSystem(this.systemPrompt).build();
this.chatClient = ChatClient.builder(this.chatModel)
.defaultSystem(this.systemPrompt)
.defaultAdvisors(new SimpleLoggerAdvisor())
.build();
}

private final BeanOutputConverter<ValidatorAgentResponse> outputParser = new BeanOutputConverter<>(
Expand Down

0 comments on commit e0fa56d

Please sign in to comment.