add preliminary support for llm agents (#432)

This commit is contained in:
Adil Hafeez 2025-03-19 15:21:34 -07:00 committed by GitHub
parent 8d66fefded
commit 84cd1df7bf
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
29 changed files with 1388 additions and 121 deletions

View 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"

View file

@ -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.*"