Skip to content

Commit

Permalink
tests: add test files
Browse files Browse the repository at this point in the history
Signed-off-by: Xin Liu <sam@secondstate.io>
  • Loading branch information
apepkuss committed Sep 23, 2024
1 parent 01b48d7 commit dc424c3
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 0 deletions.
20 changes: 20 additions & 0 deletions tests/test_chat.hurl
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# test /v1/chat/completions endpoint
POST http://localhost:10086/v1/chat/completions
Accept: application/json
Content-Type: application/json
```json
{
"messages": [
{
"role": "user",
"content": "What is the capital of France?"
}
],
"model": "Qwen2.5-0.5B-Instruct",
"stream": false
}
```
HTTP 200
[Asserts]
jsonpath "$.model" == "Qwen2.5-0.5B-Instruct"
jsonpath "$.choices[0].message.content" contains "Paris"
7 changes: 7 additions & 0 deletions tests/test_whisper.hurl
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# test /v1/audio/transcriptions endpoint
POST http://localhost:10087/v1/audio/transcriptions
[MultipartFormData]
file: file,test.wav;
HTTP 200
[Asserts]
jsonpath "$.text" contains "This is a test record"

0 comments on commit dc424c3

Please # to comment.