Skip to content

Commit

Permalink
feat : removes test case which doesnt adds context
Browse files Browse the repository at this point in the history
  • Loading branch information
rajadilipkolli committed May 27, 2024
1 parent 434e4c5 commit 57be6b2
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 19 deletions.
5 changes: 0 additions & 5 deletions chatbot-ollama-springai/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -49,11 +49,6 @@
<artifactId>rest-assured</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-testcontainers</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.springframework.ai</groupId>
<artifactId>spring-ai-spring-boot-testcontainers</artifactId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,24 +27,12 @@ void setUp() {
RestAssured.port = localServerPort;
}

@Test
void contextLoads() {
given().contentType(ContentType.JSON)
.body(new AIChatRequest("Hello?"))
.when()
.post("/api/ai/chat")
.then()
.statusCode(HttpStatus.SC_OK)
.contentType(ContentType.JSON)
.body("answer", containsString("help"));
}

@Test
void chat() {
given().contentType(ContentType.JSON)
.body(
new AIChatRequest(
"As a cricketer, how many centuries did Sachin Tendulkar scored adding up both One Day International (ODI) and Test centuries ?"))
"As a cricketer, how many centuries did Sachin Tendulkar scored adding up both One Day International (ODI) and Test centuries ?"))
.when()
.post("/api/ai/chat")
.then()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ OllamaContainer ollama() {
@Bean
@ServiceConnection
ChromaDBContainer chromadb() {
return new ChromaDBContainer(DockerImageName.parse("chromadb/chroma:0.5.0"));
return new ChromaDBContainer(DockerImageName.parse("chromadb/chroma").withTag("0.5.0"));
}

public static void main(String[] args) {
Expand Down

0 comments on commit 57be6b2

Please sign in to comment.