import { Task as n } from "./Task.js";
class r extends n {
  rawText;
  index = 0;
  get length() {
    return this.rawText.length;
  }
  constructor(t) {
    super(), this.rawText = t;
  }
  hasMoreConversations() {
    return this.index < this.rawText.length;
  }
  nextConversation() {
    if (this.index >= this.rawText.length)
      return null;
    const t = {
      role: "assistant",
      content: this.rawText[this.index]
    };
    return this.index++, [t];
  }
  nextTokens(t) {
    if (this.index >= this.rawText.length)
      return null;
    const e = t.encodeSequence(this.rawText[this.index]);
    return this.index++, e;
  }
  shuffle() {
    this.index = 0;
  }
  async estimateTokens(t) {
    return (await t.encodeConversation([
      {
        role: "assistant",
        content: this.rawText[0]
      }
    ])).length * this.length;
  }
}
export {
  r as default
};
