-
Notifications
You must be signed in to change notification settings - Fork 78
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Added OpenAI Test Cases * Update BuildAndRun.yml
- Loading branch information
1 parent
acfa542
commit 975a938
Showing
10 changed files
with
140 additions
and
116 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
28 changes: 1 addition & 27 deletions
28
FlySpring/edgechain-app/src/test/java/com/edgechain/redis/RedisClientTest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,34 +1,8 @@ | ||
package com.edgechain.redis; | ||
|
||
import org.junit.jupiter.api.BeforeEach; | ||
import org.junit.jupiter.api.DisplayName; | ||
import org.junit.jupiter.api.Test; | ||
import org.slf4j.Logger; | ||
import org.slf4j.LoggerFactory; | ||
import org.springframework.boot.test.context.SpringBootTest; | ||
import org.springframework.boot.test.web.server.LocalServerPort; | ||
|
||
@SpringBootTest(webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT) | ||
@SpringBootTest | ||
public class RedisClientTest { | ||
|
||
@LocalServerPort int randomServerPort; | ||
|
||
private Logger logger = LoggerFactory.getLogger(this.getClass()); | ||
|
||
@BeforeEach | ||
public void setup() { | ||
System.setProperty("server.port", "" + randomServerPort); | ||
} | ||
|
||
@Test | ||
@DisplayName("Test Redis Endpoint Upsert With OpenAI") | ||
public void testRedisEndpoint_UpsertWithOpenAiShouldAssertNoErrors() {} | ||
|
||
@Test | ||
@DisplayName("Test Redis Endpoint Similarity Search With OpenAI") | ||
public void testRedisEndpoint_SimilaritySearchWithOpenAiShouldAssertNoErrors() {} | ||
|
||
@Test | ||
@DisplayName("Test Redis Endpoint Delete By Pattern") | ||
public void testRedisEndpoint_DeleteByPatternShouldAssertNoErrors() {} | ||
} |
9 changes: 9 additions & 0 deletions
9
FlySpring/edgechain-app/src/test/java/resources/ChatCompletionRequest.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
{ | ||
"model" : "gpt-3.5-turbo", | ||
"temperature" : 0.7, | ||
"messages" : [ { | ||
"role" : "user", | ||
"content" : "Can you write two unique sentences on Java Language?" | ||
} ], | ||
"stream" : false | ||
} |
18 changes: 18 additions & 0 deletions
18
FlySpring/edgechain-app/src/test/java/resources/ChatCompletionResponse.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
{ | ||
"id" : "chatcmpl-7cCBttNGLwPkAMswN8074tMYdd3Zm", | ||
"object" : "chat.completion", | ||
"created" : 1689337681, | ||
"model" : "gpt-3.5-turbo-0613", | ||
"choices" : [ { | ||
"index" : 0, | ||
"message" : { | ||
"role" : "assistant", | ||
"content" : "1. Java language is a versatile, object-oriented programming language used for developing various applications such as mobile applications, desktop applications, and web services.\n2. Known for its write once, run anywhere feature, Java offers robust security and cross-platform compatibility making it a popular choice among developers." | ||
}, | ||
"finish_reason" : "stop" | ||
} ], | ||
"usage" : { | ||
"prompt_tokens" : 880, | ||
"total_tokens" : 1396 | ||
} | ||
} |