Class VertexAiChatModel

java.lang.Object
dev.langchain4j.model.vertexai.VertexAiChatModel
All Implemented Interfaces:
dev.langchain4j.model.chat.ChatLanguageModel

public class VertexAiChatModel extends Object implements dev.langchain4j.model.chat.ChatLanguageModel
Represents a Google Vertex AI language model with a chat completion interface, such as chat-bison. See details here.
Please follow these steps before using this model:
1. Authentication
When developing locally, you can use one of:
a) Google Cloud SDK
b) Service account When using service account, ensure that GOOGLE_APPLICATION_CREDENTIALS environment variable points to your JSON service account key.
2. Authorization
3. Prerequisites
  • Constructor Details

  • Method Details

    • generate

      public dev.langchain4j.model.output.Response<dev.langchain4j.data.message.AiMessage> generate(List<dev.langchain4j.data.message.ChatMessage> messages)
      Specified by:
      generate in interface dev.langchain4j.model.chat.ChatLanguageModel
    • builder

      public static VertexAiChatModel.Builder builder()