MCPcopy Create free account
hub / github.com/antirez/ds4 / append_tool_calls_json

Function append_tool_calls_json

ds4_server.c:4746–4764  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

4744 if (!json_string(p, &key)) goto item_fail;
4745 json_ws(p);
4746 if (**p != ':') {
4747 free(key);
4748 goto item_fail;
4749 }
4750 (*p)++;
4751 if (!strcmp(key, "type")) {
4752 if (!json_string_replace(p, &type)) {
4753 free(key);
4754 goto item_fail;
4755 }
4756 } else if (!strcmp(key, "role")) {
4757 if (!json_string_replace(p, &role)) {
4758 free(key);
4759 goto item_fail;
4760 }
4761 } else if (!strcmp(key, "content")) {
4762 if (!parse_responses_content_array_multimodal(
4763 p, &content, &content_images)) {
4764 free(key);
4765 goto item_fail;
4766 }
4767 } else if (!strcmp(key, "name")) {

Callers 2

final_responseFunction · 0.85

Calls 4

buf_putcFunction · 0.85
buf_putsFunction · 0.85
json_escapeFunction · 0.85