Skip to content

FunctionToolParam constructor missing the "description" parameter #583

@lywing-god

Description

@lywing-god

The ToolParamOfFunction constructor does not expose a description parameter, even though FunctionToolParam defines a Description field.

type FunctionToolParam struct {
	Strict param.Opt[bool] `json:"strict,omitzero,required"`
	Parameters map[string]any `json:"parameters,omitzero,required"` 
	Name string `json:"name,required"`
	Description param.Opt[string] `json:"description,omitzero"`
	Type constant.Function `json:"type,required"`
	paramObj
}
func ToolParamOfFunction(name string, parameters map[string]any, strict bool) ToolUnionParam {
	var function FunctionToolParam
	function.Name = name
	function.Parameters = parameters
	function.Strict = param.NewOpt(strict)
	return ToolUnionParam{OfFunction: &function}
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions