Skip to content

v0.99.0

Compare
Choose a tag to compare
@lgrammel lgrammel released this 16 Dec 19:52

Added

  • You can now specify numberOfGenerations on text generation models and access multiple generations by using the fullResponse: true option. Example:

    // generate 2 texts:
    const { texts } = await generateText(
      openai.CompletionTextGenerator({
        model: "gpt-3.5-turbo-instruct",
        numberOfGenerations: 2,
        maxGenerationTokens: 1000,
      }),
      "Write a short story about a robot learning to love:\n\n",
      { fullResponse: true }
    );
  • breaking change: Text generation models now use a generalized numberOfGenerations parameter (instead of model specific parameters) to specify the number of generations.

Changed

  • breaking change: Renamed maxCompletionTokens text generation model setting to maxGenerationTokens.