import { AbstractChatCompletionRunner, } from "./AbstractChatCompletionRunner.mjs";
import { isAssistantMessage } from "./chatCompletionUtils.mjs";
export class ChatCompletionRunner extends AbstractChatCompletionRunner {
    static runFunctions(completions, params, options) {
        const runner = new ChatCompletionRunner();
        runner._run(() => runner._runFunctions(completions, params, options));
        return runner;
    }
    static runTools(completions, params, options) {
        const runner = new ChatCompletionRunner();
        runner._run(() => runner._runTools(completions, params, options));
        return runner;
    }
    _addMessage(message) {
        super._addMessage(message);
        if (isAssistantMessage(message) && message.content) {
            this._emit('content', message.content);
        }
    }
}
//# sourceMappingURL=ChatCompletionRunner.mjs.map