MCPcopy Create free account
hub / github.com/Hello-Application-XH/HelloGML / start

Function start

src/chat.ts:462–470  ·  view source on GitHub ↗
(controller)

Source from the content-addressed store, hash-verified

460 const encoder = new TextEncoder();
461 return new ReadableStream({
462 start(controller) {
463 controller.enqueue(encoder.encode(`data: ${JSON.stringify({
464 id: "", model: MODEL_NAME, object: "chat.completion.chunk",
465 choices: [{ index: 0, delta: { role: "assistant", content: "服务暂时不可用,第三方响应错误" }, finish_reason: "stop" }],
466 usage: { prompt_tokens: 1, completion_tokens: 1, total_tokens: 2 },
467 created: unixTimestamp(),
468 })}\n\n`));
469 controller.close();
470 }
471 });
472 }
473 return createTransStream(model, response.body!, (convId: string) => {

Callers

nothing calls this directly

Calls 7

unixTimestampFunction · 0.90
createParserFunction · 0.90
attemptFunction · 0.90
isErrorFunction · 0.90
isArrayFunction · 0.90
isStringFunction · 0.90
parseToolCallsFunction · 0.85

Tested by

no test coverage detected