Package dev.langchain4j.model.vertexai
Class VertexAiChatModel
java.lang.Object
dev.langchain4j.model.vertexai.VertexAiChatModel
- All Implemented Interfaces:
ChatModel
@Deprecated(since="1.0.0-beta4",
forRemoval=true)
public class VertexAiChatModel
extends Object
implements ChatModel
Deprecated, for removal: This API element is subject to removal in a future version.
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
2. Authorization
3. Prerequisites
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
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic class
Deprecated, for removal: This API element is subject to removal in a future version. -
Constructor Summary
ConstructorsConstructorDescriptionVertexAiChatModel
(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 Summary
Modifier and TypeMethodDescriptionstatic VertexAiChatModel.Builder
builder()
Deprecated, for removal: This API element is subject to removal in a future version.chat
(ChatRequest chatRequest) Deprecated, for removal: This API element is subject to removal in a future version.This is the main API to interact with the chat model.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface dev.langchain4j.model.chat.ChatModel
chat, chat, chat, defaultRequestParameters, doChat, listeners, provider, supportedCapabilities
-
Constructor Details
-
VertexAiChatModel
public VertexAiChatModel(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
-
chat
Deprecated, for removal: This API element is subject to removal in a future version.Description copied from interface:ChatModel
This is the main API to interact with the chat model.- Specified by:
chat
in interfaceChatModel
- Parameters:
chatRequest
- aChatRequest
, containing all the inputs to the LLM- Returns:
- a
ChatResponse
, containing all the outputs from the LLM
-
builder
Deprecated, for removal: This API element is subject to removal in a future version.
-
VertexAiGeminiChatModel
from thelangchain4j-vertex-ai-gemini
module instead.