# Class ChatRequest.Builder

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

Enclosing class:
  `ChatRequest`

public static final class ChatRequest.Builder extends Object

- ## Method Summary

  Modifier and Type
  Method
  Description
  `ChatRequest.Builder`
  `addMessage(ChatMessage m)`
  `ChatRequest`
  `build()`
  `ChatRequest.Builder`
  `maxTokens(Integer n)`
  `ChatRequest.Builder`
  `messages(List<ChatMessage> messages)`
  `ChatRequest.Builder`
  `metadata(Map<String,String> meta)`
  `ChatRequest.Builder`
  `model(String model)`
  `ChatRequest.Builder`
  `responseFormat(ResponseFormat f)`
  `ChatRequest.Builder`
  `safetyFilter(SafetyFilter f)`
  `ChatRequest.Builder`
  `seed(Long seed)`
  `ChatRequest.Builder`
  `stopSequences(List<String> stops)`
  `ChatRequest.Builder`
  `temperature(Float t)`
  `ChatRequest.Builder`
  `toolChoice(ToolChoice choice)`
  `ChatRequest.Builder`
  `tools(List<Tool> tools)`
  `ChatRequest.Builder`
  `topP(Float p)`

  ### Methods inherited from class Object

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

- ## Method Details

  - ### model

    public ChatRequest.Builder model(String model)

  - ### messages

    public ChatRequest.Builder messages(List<ChatMessage> messages)

  - ### addMessage

    public ChatRequest.Builder addMessage(ChatMessage m)

  - ### temperature

    public ChatRequest.Builder temperature(Float t)

  - ### maxTokens

    public ChatRequest.Builder maxTokens(Integer n)

  - ### topP

    public ChatRequest.Builder topP(Float p)

  - ### stopSequences

    public ChatRequest.Builder stopSequences(List<String> stops)

  - ### seed

    public ChatRequest.Builder seed(Long seed)

  - ### responseFormat

    public ChatRequest.Builder responseFormat(ResponseFormat f)

  - ### tools

    public ChatRequest.Builder tools(List<Tool> tools)

  - ### toolChoice

    public ChatRequest.Builder toolChoice(ToolChoice choice)

  - ### metadata

    public ChatRequest.Builder metadata(Map<String,String> meta)

  - ### safetyFilter

    public ChatRequest.Builder safetyFilter(SafetyFilter f)

  - ### build

    public ChatRequest build()