Class VertexAiLanguageModel

java.lang.Object
dev.langchain4j.model.vertexai.VertexAiLanguageModel
All Implemented Interfaces:
LanguageModel

@Deprecated(since="1.0.0-beta4", forRemoval=true) public class VertexAiLanguageModel extends Object implements LanguageModel
Deprecated, for removal: This API element is subject to removal in a future version.
The "Bison" models have been discontinued by Google. Please use one of the "Gemini" models with VertexAiGeminiChatModel from the langchain4j-vertex-ai-gemini module instead.
Represents a Google Vertex AI language model with a text interface, such as text-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

    • VertexAiLanguageModel

      public VertexAiLanguageModel(String endpoint, String project, String location, String publisher, String modelName, Double temperature, Integer maxOutputTokens, Integer topK, Double topP, Integer maxRetries)
      Deprecated, for removal: This API element is subject to removal in a future version.
  • Method Details

    • generate

      public Response<String> generate(String prompt)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Description copied from interface: LanguageModel
      Generate a response to the given prompt.
      Specified by:
      generate in interface LanguageModel
      Parameters:
      prompt - the prompt.
      Returns:
      the response.
    • builder

      public static VertexAiLanguageModel.Builder builder()
      Deprecated, for removal: This API element is subject to removal in a future version.