fix: copilot's openai tool description cannot use long text (#1700)

This commit is contained in:
yetone
2025-03-24 19:54:06 +08:00
committed by GitHub
parent e20a3ff111
commit 25e9b1c111
5 changed files with 18 additions and 8 deletions

View File

@@ -37,7 +37,7 @@ function M:transform_tool(tool)
local input_schema_properties, required = Utils.llm_tool_param_fields_to_json_schema(tool.param.fields)
return {
name = tool.name,
description = tool.description,
description = tool.get_description and tool.get_description() or tool.description,
input_schema = {
type = "object",
properties = input_schema_properties,