fix(relaykit): preserve parameterless tools in Claude conversion (#6862)
This commit is contained in:
@@ -0,0 +1,16 @@
|
||||
package claude
|
||||
|
||||
func FunctionParametersToInputSchema(parameters any) map[string]any {
|
||||
params, _ := parameters.(map[string]any)
|
||||
schema := make(map[string]any, len(params)+2)
|
||||
for key, value := range params {
|
||||
schema[key] = value
|
||||
}
|
||||
if schema["type"] == nil {
|
||||
schema["type"] = "object"
|
||||
}
|
||||
if schema["properties"] == nil {
|
||||
schema["properties"] = map[string]any{}
|
||||
}
|
||||
return schema
|
||||
}
|
||||
Reference in New Issue
Block a user