mirror of
https://github.com/huggingface/text-generation-inference.git
synced 2025-06-07 18:02:07 +00:00
Add json_schema alias for GrammarType
This commit is contained in:
parent
065aabb13d
commit
67a696fad9
@ -209,7 +209,8 @@ pub(crate) enum GrammarType {
|
|||||||
///
|
///
|
||||||
/// JSON Schema is a declarative language that allows to annotate JSON documents
|
/// JSON Schema is a declarative language that allows to annotate JSON documents
|
||||||
/// with types and descriptions.
|
/// with types and descriptions.
|
||||||
#[serde(rename = "json")]
|
#[serde(rename = "json_schema")]
|
||||||
|
#[serde(alias = "json")]
|
||||||
#[serde(alias = "json_object")]
|
#[serde(alias = "json_object")]
|
||||||
#[schema(example = json ! ({"properties": {"location":{"type": "string"}}}))]
|
#[schema(example = json ! ({"properties": {"location":{"type": "string"}}}))]
|
||||||
Json(serde_json::Value),
|
Json(serde_json::Value),
|
||||||
|
Loading…
Reference in New Issue
Block a user