makeSamples(_:targetCount:sessionProvider:validator:)
Generates synthetic data based on this dataset and returns a stream of new samples.
Declaration
func makeSamples(_ prompt: Prompt, targetCount: Int, sessionProvider: (@Sendable () -> LanguageModelSession)? = nil, validator: (nonisolated(nonsending) @Sendable (Element) async throws -> Bool)? = nil) -> some AsyncSequence<Element, any Error>
Discussion
For more control over generation, create a SampleGenerator directly.