mirror of
https://github.com/katanemo/plano.git
synced 2026-07-02 15:51:02 +02:00
add tests
This commit is contained in:
parent
898136470a
commit
f4462d1ed5
4 changed files with 72 additions and 0 deletions
|
|
@ -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"
|
||||||
|
|
@ -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/
|
||||||
19
demos/samples_python/weather_forecast/hurl_tests/simple.hurl
Normal file
19
demos/samples_python/weather_forecast/hurl_tests/simple.hurl
Normal file
|
|
@ -0,0 +1,19 @@
|
||||||
|
POST http://localhost:10000/v1/chat/completions
|
||||||
|
Content-Type: application/json
|
||||||
|
|
||||||
|
{
|
||||||
|
"messages": [
|
||||||
|
{
|
||||||
|
"role": "user",
|
||||||
|
"content": "how is the weather in seattle for next 5 days"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
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" matches /Seattle/
|
||||||
|
jsonpath "$.choices[0].message.role" == "assistant"
|
||||||
|
|
@ -0,0 +1,17 @@
|
||||||
|
POST http://localhost:10000/v1/chat/completions
|
||||||
|
Content-Type: application/json
|
||||||
|
|
||||||
|
{
|
||||||
|
"messages": [
|
||||||
|
{
|
||||||
|
"role": "user",
|
||||||
|
"content": "how is the weather in seattle for next 5 days"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"stream": true
|
||||||
|
}
|
||||||
|
HTTP 200
|
||||||
|
[Asserts]
|
||||||
|
header "content-type" matches /text\/event-stream/
|
||||||
|
body matches "(?s).*\"name\":\"get_current_weather\".*"
|
||||||
|
body matches "(?s).*\"model\":\"gpt-4o-mini.*"
|
||||||
Loading…
Add table
Add a link
Reference in a new issue