(
body: ChatCompletionCreateParams,
signal: AbortSignal,
)
| 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[], |
nothing calls this directly
no test coverage detected