add hurl tests for currency exchange demo (#435)

This commit is contained in:
Adil Hafeez 2025-03-17 14:21:41 -07:00 committed by GitHub
parent 6072d6ef30
commit d2cb1427fb
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 69 additions and 4 deletions

View file

@ -0,0 +1,19 @@
POST http://localhost:10000/v1/chat/completions
Content-Type: application/json
{
"messages": [
{
"role": "user",
"content": "convert 100 eur"
}
]
}
HTTP 200
[Asserts]
header "content-type" == "application/json"
jsonpath "$.model" matches /^gpt-4o/
jsonpath "$.metadata.x-arch-state" != null
jsonpath "$.usage" != null
jsonpath "$.choices[0].message.content" != null
jsonpath "$.choices[0].message.role" == "assistant"

View file

@ -0,0 +1,17 @@
POST http://localhost:10000/v1/chat/completions
Content-Type: application/json
{
"messages": [
{
"role": "user",
"content": "convert 100 eur"
}
],
"stream": true
}
HTTP 200
[Asserts]
header "content-type" matches /text\/event-stream/
body matches /^data: .*?currency_exchange.*?\n/
body matches /^data: .*?EUR.*?\n/