MCPcopy
hub / github.com/di-sukharev/opencommit / _addChatCompletion

Method _addChatCompletion

out/cli.cjs:81815–81822  ·  view source on GitHub ↗
(chatCompletion)

Source from the content-addressed store, hash-verified

81813var DEFAULT_MAX_CHAT_COMPLETIONS = 10;
81814var AbstractChatCompletionRunner = class extends EventStream {
81815 constructor() {
81816 super(...arguments);
81817 _AbstractChatCompletionRunner_instances.add(this);
81818 this._chatCompletions = [];
81819 this.messages = [];
81820 }
81821 _addChatCompletion(chatCompletion) {
81822 this._chatCompletions.push(chatCompletion);
81823 this._emit("chatCompletion", chatCompletion);
81824 const message = chatCompletion.choices[0]?.message;
81825 if (message)

Callers 3

_createChatCompletionMethod · 0.80
_createChatCompletionMethod · 0.80
_fromReadableStreamMethod · 0.80

Calls 3

pushMethod · 0.45
_emitMethod · 0.45
_addMessageMethod · 0.45

Tested by

no test coverage detected