# Class EmbeddingRequest.Builder

java.lang.Object
com.codename1.ai.EmbeddingRequest.Builder

Enclosing class:
  `EmbeddingRequest`

public static final class EmbeddingRequest.Builder extends Object
Mutable builder for an immutable `EmbeddingRequest`.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `EmbeddingRequest.Builder`
  `addInput(String s)`
  `EmbeddingRequest`
  `build()`
  `EmbeddingRequest.Builder`
  `dimensions(Integer d)`
  `EmbeddingRequest.Builder`
  `inputs(List<String> in)`
  Replaces all input strings.
  `EmbeddingRequest.Builder`
  `model(String m)`

  ### Methods inherited from class Object

  `clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Method Details

  - ### model

    public EmbeddingRequest.Builder model(String m)
    Parameters:
      `m` - provider model id, or `null` for client default
    Returns:
      this builder

  - ### inputs

    public EmbeddingRequest.Builder inputs(List<String> in)
    Replaces all input strings.
    Parameters:
      `in` - strings to embed; `null` clears the list
    Returns:
      this builder

  - ### addInput

    public EmbeddingRequest.Builder addInput(String s)
    Parameters:
      `s` - input string to append
    Returns:
      this builder

  - ### dimensions

    public EmbeddingRequest.Builder dimensions(Integer d)
    Parameters:
      `d` - requested vector dimensions, or `null` for model default
    Returns:
      this builder

  - ### build

    public EmbeddingRequest build()
    Returns:
      validated immutable request
    Throws:
      `IllegalStateException` - when no input strings were supplied