EmbeddingRequest constructor

const EmbeddingRequest({
  1. String? model,
  2. required List<String> input,
  3. String? user,
})

Implementation

const factory EmbeddingRequest({
  /// ID of the model to use. You can use the
  /// [List models API](https://beta.openai.com/docs/api-reference/models/list)
  /// to see all of your available models, or see our
  /// [Model overview](https://beta.openai.com/docs/models/overview)
  /// for descriptions of them.
  final String? model,

  /// Input text to get embeddings for, encoded as a string or array of tokens.
  ///
  /// To get embeddings for multiple inputs in a single request, pass an array
  /// of strings or array of token arrays. Each input must not exceed 8192
  /// tokens in length.
  required final List<String> input,

  /// A unique identifier representing your end-user, which can help OpenAI to
  /// monitor and detect abuse.
  ///
  /// [Lear more](https://beta.openai.com/docs/guides/safety-best-practices/end-user-ids)
  final String? user,
}) = _EmbeddingRequest;