fix: add test snapshots and avoid docs change

This commit is contained in:
drbh 2025-02-20 23:45:15 +00:00
parent 5e6ac4ff63
commit 92025e4b67
4 changed files with 50 additions and 4 deletions

View File

@ -1746,7 +1746,7 @@
"type": {
"type": "string",
"enum": [
"json_schema"
"json"
]
},
"value": {
@ -2406,4 +2406,4 @@
"description": "Hugging Face Text Generation Inference API"
}
]
}
}

View File

@ -0,0 +1,23 @@
{
"choices": [
{
"finish_reason": "stop",
"index": 0,
"logprobs": null,
"message": {
"content": "{ \"unit\": \"fahrenheit\", \"temperature\": [ 72, 79, 88 ] }",
"role": "assistant"
}
}
],
"created": 1740095072,
"id": "",
"model": "TinyLlama/TinyLlama-1.1B-Chat-v1.0",
"object": "chat.completion",
"system_fingerprint": "3.1.1-dev0-native",
"usage": {
"completion_tokens": 29,
"prompt_tokens": 135,
"total_tokens": 164
}
}

View File

@ -0,0 +1,23 @@
{
"choices": [
{
"finish_reason": "stop",
"index": 0,
"logprobs": null,
"message": {
"content": "{ \"unit\": \"fahrenheit\", \"temperature\": [ 72, 79, 88 ] }",
"role": "assistant"
}
}
],
"created": 1740095073,
"id": "",
"model": "TinyLlama/TinyLlama-1.1B-Chat-v1.0",
"object": "chat.completion",
"system_fingerprint": "3.1.1-dev0-native",
"usage": {
"completion_tokens": 29,
"prompt_tokens": 135,
"total_tokens": 164
}
}

View File

@ -223,8 +223,8 @@ pub(crate) enum GrammarType {
///
/// JSON Schema is a declarative language that allows to annotate JSON documents
/// with types and descriptions.
#[serde(rename = "json_schema")]
#[serde(alias = "json")]
#[serde(rename = "json")]
#[serde(alias = "json_schema")]
#[serde(alias = "json_object")]
#[schema(example = json ! ({"properties": {"location":{"type": "string"}}}))]
Json(serde_json::Value),