Chatoyant - v0.2.1
    Preparing search index...

    Function genStreamAccumulate

    • Stream text and accumulate the full response.

      Parameters

      • prompt: string

        User prompt

      • Optionaloptions: GenStreamOptions

        Optional configuration

      Returns Promise<string>

      Full accumulated text

      const story = await genStreamAccumulate("Tell me a story", {
      onDelta: (chunk) => process.stdout.write(chunk),
      });

      console.log("\n\nFull story:", story);