use passed in model name in chat completion request (#445)

This commit is contained in:
Adil Hafeez 2025-03-21 15:56:17 -07:00 committed by GitHub
parent bd8004d1ae
commit eb48f3d5bb
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
20 changed files with 364 additions and 89 deletions

View file

@ -0,0 +1,24 @@
POST http://localhost:12000/v1/chat/completions
Content-Type: application/json
{
"messages": [
{
"role": "system",
"content": "You are a helpful assistant.\n"
},
{
"role": "user",
"content": "I want to sell red shoes"
}
],
"stream": false
}
HTTP 200
[Asserts]
header "content-type" == "application/json"
jsonpath "$.model" matches /^gpt-4o-mini/
jsonpath "$.usage" != null
jsonpath "$.choices[0].message.content" != null
jsonpath "$.choices[0].message.role" == "assistant"