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

Function openai_tool_stream_init

ds4_server.c:5673–5707  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

5671 double v = 0.0;
5672 if (!json_number(&p, &v)) {
5673 free(key);
5674 goto bad;
5675 }
5676 r->min_p = (float)v;
5677 r->min_p_set = true;
5678 } else if (!strcmp(key, "top_k")) {
5679 if (!json_int(&p, &r->top_k)) {
5680 free(key);
5681 goto bad;
5682 }
5683 r->top_k_set = true;
5684 } else if (!strcmp(key, "seed")) {
5685 double v = 0.0;
5686 if (!json_number(&p, &v)) {
5687 free(key);
5688 goto bad;
5689 }
5690 r->seed = v > 0.0 ? (uint64_t)v : 0;
5691 } else if (!strcmp(key, "stream")) {
5692 if (!json_bool(&p, &r->stream)) {
5693 free(key);
5694 goto bad;
5695 }
5696 } else if (!strcmp(key, "stream_options")) {
5697 if (!parse_stream_options(&p, &r->stream_include_usage)) {
5698 free(key);
5699 goto bad;
5700 }
5701 } else if (!strcmp(key, "thinking")) {
5702 if (!parse_thinking_control_value(&p, &thinking_enabled)) {
5703 free(key);
5704 goto bad;
5705 }
5706 got_thinking = true;
5707 } else if (!strcmp(key, "reasoning_effort")) {
5708 if (!parse_reasoning_effort_value(&p, &reasoning_effort)) {
5709 free(key);
5710 goto bad;

Callers 1

openai_sse_stream_updateFunction · 0.85

Calls 2

openai_tool_stream_freeFunction · 0.85
raw_full_litFunction · 0.85

Tested by

no test coverage detected