Class WorkersAiChatCompletionRequest

java.lang.Object
dev.langchain4j.model.workersai.client.WorkersAiChatCompletionRequest

public class WorkersAiChatCompletionRequest extends Object
Represents a request for AI chat completion. Contains a list of messages that form part of the chat conversation.
  • Constructor Details

    • WorkersAiChatCompletionRequest

      public WorkersAiChatCompletionRequest()
      Constructs an empty WorkerAiChatCompletionRequest with an empty list of messages.
    • WorkersAiChatCompletionRequest

      public WorkersAiChatCompletionRequest(WorkersAiChatCompletionRequest.MessageRole role, String content)
      Constructs a WorkerAiChatCompletionRequest with an initial message.
      Parameters:
      role - The role of the initial message.
      content - The content of the initial message.
  • Method Details