Some fixes on model server (#362)

* Some fixes on model server

* Remove prompt_prefilling message

* Fix logging

* Fix poetry issues

* Improve logging and update the support for text truncation

* Fix tests

* Fix tests

* Fix tests

* Fix modelserver tests

* Update modelserver tests
This commit is contained in:
Shuguang Chen 2025-01-10 16:45:36 -08:00 committed by GitHub
parent ebda682b30
commit 88a02dc478
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
25 changed files with 1090 additions and 1666 deletions

View file

@ -5,8 +5,7 @@ test_cases:
- role: "user"
content: "what is the weather forecast for seattle?"
tools:
- id: "weather-112"
type: "function"
- type: "function"
function:
name: "get_current_weather"
description: "Get current weather at a location."
@ -14,17 +13,18 @@ test_cases:
type: "object"
properties:
location:
type: "str"
type: "string"
description: "The location to get the weather for"
format: "City, State"
days:
type: "int"
description: "the number of days for the request."
required: ["location", "days"]
type: "integer"
description: "The number of days for the request."
required:
- location
- days
expected:
- type: "metadata"
hallucination: false
prompt_prefilling: true
- type: "metadata"
hallucination: false
- id: "[WEATHER AGENT] - single turn, single tool, hallucination"
input:
@ -32,8 +32,7 @@ test_cases:
- role: "user"
content: "what is the weather in Seattle in days?"
tools:
- id: "weather-112"
type: "function"
- type: "function"
function:
name: "get_current_weather"
description: "Get current weather at a location."
@ -51,7 +50,6 @@ test_cases:
expected:
- type: "metadata"
hallucination: true
prompt_prefilling: true
- id: "[WEATHER AGENT] - multi turn, single tool, all params passed"
input:
@ -85,8 +83,6 @@ test_cases:
expected:
- type: "metadata"
hallucination: true
prompt_prefilling: true
- id: "[WEATHER AGENT] - multi turn, single tool, clarification"
input:
@ -120,7 +116,7 @@ test_cases:
expected:
- type: "metadata"
hallucination: false
prompt_prefilling: true
- id: "[SALE AGENT] - single turn, single tool, hallucination region"
input:
messages:
@ -148,7 +144,6 @@ test_cases:
expected:
- type: "metadata"
hallucination: true
prompt_prefilling: true
- id: "[SALE AGENT] - single turn, single tool, hallucination industry"
input:
@ -177,7 +172,6 @@ test_cases:
expected:
- type: "metadata"
hallucination: true
prompt_prefilling: true
- id: "[PRODUCT AGENT] - single turn, single tool, hallucination industry"
input:
@ -261,4 +255,3 @@ test_cases:
expected:
- type: "metadata"
hallucination: true
prompt_prefilling: true