Chatoyant - v0.2.1
    Preparing search index...

    Function genText

    • Generate text from an LLM in a single call.

      Parameters

      • prompt: string

        User prompt

      • Optionaloptions: GenTextOptions

        Optional configuration

      Returns Promise<string>

      Generated text

      // Simplest possible
      const answer = await genText("What is 2+2?");

      // With system prompt
      const poem = await genText("Write a haiku about coding", {
      system: "You are a creative poet",
      });

      // With model and options
      const analysis = await genText("Analyze this data", {
      model: "gpt-4o",
      system: "You are a data analyst",
      temperature: 0.3,
      });