MCPcopy Create free account
hub / github.com/aurora-develop/aurora / extractArguments

Function extractArguments

internal/toolcall/parser.go:321–336  ·  view source on GitHub ↗
(obj map[string]any)

Source from the content-addressed store, hash-verified

319}
320
321func extractArguments(obj map[string]any) any {
322 for _, k := range []string{"arguments", "parameters", "args"} {
323 if v, ok := obj[k]; ok {
324 return v
325 }
326 }
327 // 没有 arguments 字段:把其余字段都当作 arguments(对齐 Python 行为)
328 remaining := make(map[string]any, len(obj))
329 for k, v := range obj {
330 if k == "name" || k == "tool" || k == "tool_name" || k == "function" {
331 continue
332 }
333 remaining[k] = v
334 }
335 return remaining
336}
337
338func marshalArguments(v any) string {
339 switch t := v.(type) {

Callers 1

buildToolCallFromObjectFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected