MCPcopy Create free account
hub / github.com/continuedev/continue / _streamChat

Method _streamChat

core/llm/llms/CustomLLM.ts:30–53  ·  view source on GitHub ↗
(
    messages: ChatMessage[],
    signal: AbortSignal,
    options: CompletionOptions,
  )

Source from the content-addressed store, hash-verified

28 }
29
30 protected async *_streamChat(
31 messages: ChatMessage[],
32 signal: AbortSignal,
33 options: CompletionOptions,
34 ): AsyncGenerator<ChatMessage> {
35 if (this.customStreamChat) {
36 for await (const content of this.customStreamChat(
37 messages,
38 signal,
39 options,
40 (...args) => this.fetch(...args),
41 )) {
42 if (typeof content === "string") {
43 yield { role: "assistant", content };
44 } else {
45 yield content;
46 }
47 }
48 } else {
49 for await (const update of super._streamChat(messages, signal, options)) {
50 yield update;
51 }
52 }
53 }
54
55 protected async *_streamComplete(
56 prompt: string,

Callers

nothing calls this directly

Calls 1

fetchMethod · 0.65

Tested by

no test coverage detected