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

Method _runChatCompletion

out/cli.cjs:81920–81925  ·  view source on GitHub ↗
(client, params, options)

Source from the content-addressed store, hash-verified

81918 this.controller.abort();
81919 signal.addEventListener("abort", () => this.controller.abort());
81920 }
81921 __classPrivateFieldGet10(this, _AbstractChatCompletionRunner_instances, "m", _AbstractChatCompletionRunner_validateParams).call(this, params);
81922 const chatCompletion = await client.chat.completions.create({ ...params, stream: false }, { ...options, signal: this.controller.signal });
81923 this._connected();
81924 return this._addChatCompletion(parseChatCompletion(chatCompletion, params));
81925 }
81926 async _runChatCompletion(client, params, options) {
81927 for (const message of params.messages) {
81928 this._addMessage(message, false);

Callers 1

createChatCompletionMethod · 0.80

Calls 2

_addMessageMethod · 0.45
_createChatCompletionMethod · 0.45

Tested by

no test coverage detected