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

Function tool_memory_remember

ds4_server.c:8103–8112  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

8101 buf_free(&b);
8102 free(items);
8103 return ok;
8104}
8105
8106static bool final_response(int fd, bool enable_cors,
8107 const request *r, const char *id, const char *text,
8108 const char *reasoning, const tool_calls *calls, const char *finish,
8109 int prompt_tokens, int completion_tokens) {
8110 buf b = {0};
8111 long now = (long)time(NULL);
8112 if (r->kind == REQ_CHAT) {
8113 buf_printf(&b, "{\"id\":\"%s\",\"object\":\"chat.completion\",\"created\":%ld,\"model\":", id, now);
8114 json_escape(&b, r->model);
8115 buf_puts(&b, ",\"choices\":[{\"index\":0,\"message\":{\"role\":\"assistant\",\"content\":");

Callers 2

generate_jobFunction · 0.85

Calls 1

tool_memory_put_lockedFunction · 0.85

Tested by 1