feat: add title field for data types (#410)
* feat(model): add title field to various structs * fix(test): fix test json schema * fix(model): allow boxed type in `ts_union` macro
This commit is contained in:
parent
fdd6bc0565
commit
1b70f5b032
1 changed files with 219 additions and 73 deletions
|
|
@ -15,6 +15,9 @@ use super::JsonObject;
|
|||
pub struct Tool {
|
||||
/// The name of the tool
|
||||
pub name: Cow<'static, str>,
|
||||
/// A human-readable title for the tool
|
||||
#[serde(skip_serializing_if = "Option::is_none")]
|
||||
pub title: Option<String>,
|
||||
/// A description of what the tool does
|
||||
#[serde(skip_serializing_if = "Option::is_none")]
|
||||
pub description: Option<Cow<'static, str>>,
|
||||
|
|
@ -138,6 +141,7 @@ impl Tool {
|
|||
{
|
||||
Tool {
|
||||
name: name.into(),
|
||||
title: None,
|
||||
description: Some(description.into()),
|
||||
input_schema: input_schema.into(),
|
||||
output_schema: None,
|
||||
|
|
|
|||
Loading…
Reference in a new issue