MCPcopy
hub / github.com/continuedev/continue / openAIAdapterNonStream

Function openAIAdapterNonStream

core/llm/index.ts:1055–1068  ·  view source on GitHub ↗
(
    body: ChatCompletionCreateParams,
    signal: AbortSignal,
  )

Source from the content-addressed store, hash-verified

1053 }
1054
1055 private async *openAIAdapterNonStream(
1056 body: ChatCompletionCreateParams,
1057 signal: AbortSignal,
1058 ): AsyncGenerator<ChatMessage> {
1059 const response = await this.openaiAdapter!.chatCompletionNonStream(
1060 { ...body, stream: false },
1061 signal,
1062 );
1063 this.lastRequestId = response.id ?? this.lastRequestId;
1064 const messages = fromChatResponse(response as any);
1065 for (const msg of messages) {
1066 yield msg;
1067 }
1068 }
1069
1070 private async *responsesStream(
1071 messages: ChatMessage[],

Callers

nothing calls this directly

Calls 2

fromChatResponseFunction · 0.85

Tested by

no test coverage detected