Skip to content

add default value to the parameters #506

@feng-1985

Description

@feng-1985

Prerequisites

What are you trying to do that currently feels hard or impossible?

In the tools.yaml, have config the default value of limit, but using the toolbox, it not parsed. (toolbox v0.25.0, toolbox-langchai [0.5.7])

Image
course_tools = toolbox.load_toolset('course_information_tools')
course_tools[5].name
Out[11]: 'get_course_by_date'
course_tools[5].args
Out[10]: 
{'date': {'description': '\n输入日期。\r\nFormat: YYYY-MM-DD.\r\nIf not provided by the user, using the current system time by default.\r\n',
  'title': 'Date',
  'type': 'string'},
 'limit': {'anyOf': [{'type': 'integer'}, {'type': 'null'}],
  'default': None,
  'description': '输入返回结果数量。',
  'title': 'Limit'}}```


### Suggested Solution(s)

_No response_

### Alternatives Considered

_No response_

### Additional Details

_No response_

Metadata

Metadata

Assignees

Labels

type: feature request‘Nice-to-have’ improvement, new feature or different behavior or design.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions