v0.99.0
Added
-
You can now specify
numberOfGenerations
on text generation models and access multiple generations by using thefullResponse: 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 tomaxGenerationTokens
.