Package dev.langchain4j.model.github
Class GitHubModelsEmbeddingModel.Builder
java.lang.Object
dev.langchain4j.model.github.GitHubModelsEmbeddingModel.Builder
- Enclosing class:
GitHubModelsEmbeddingModel
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionbuild()
customHeaders
(Map<String, String> customHeaders) dimensions
(Integer dimensions) embeddingsClient
(com.azure.ai.inference.EmbeddingsClient embeddingsClient) Sets the Azure AI Inference API client.Sets the GitHub Models endpoint.gitHubToken
(String gitHubToken) Sets the GitHub token to access GitHub Models.logRequestsAndResponses
(boolean logRequestsAndResponses) maxRetries
(Integer maxRetries) modelName
(GitHubModelsEmbeddingModelName modelName) Sets the model name in Azure AI Inference API.proxyOptions
(com.azure.core.http.ProxyOptions proxyOptions) serviceVersion
(com.azure.ai.inference.ModelServiceVersion serviceVersion) Sets the Azure OpenAI API service version.userAgentSuffix
(String userAgentSuffix)
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
endpoint
Sets the GitHub Models endpoint. The default endpoint will be used if this isn't set.- Parameters:
endpoint
- The GitHub Models endpoint in the format: https://models.inference.ai.azure.com- Returns:
- builder
-
serviceVersion
public GitHubModelsEmbeddingModel.Builder serviceVersion(com.azure.ai.inference.ModelServiceVersion serviceVersion) Sets the Azure OpenAI API service version. If left blank, the latest service version will be used.- Parameters:
serviceVersion
- The Azure OpenAI API service version in the format: 2023-05-15- Returns:
- builder
-
gitHubToken
Sets the GitHub token to access GitHub Models.- Parameters:
gitHubToken
- The GitHub token.- Returns:
- builder
-
modelName
Sets the model name in Azure AI Inference API. This is a mandatory parameter.- Parameters:
modelName
- The Model name.- Returns:
- builder
-
modelName
-
timeout
-
maxRetries
-
proxyOptions
public GitHubModelsEmbeddingModel.Builder proxyOptions(com.azure.core.http.ProxyOptions proxyOptions) -
logRequestsAndResponses
-
embeddingsClient
public GitHubModelsEmbeddingModel.Builder embeddingsClient(com.azure.ai.inference.EmbeddingsClient embeddingsClient) Sets the Azure AI Inference API client. This is an optional parameter, if you need more flexibility than the common parameters.- Parameters:
embeddingsClient
- The Azure AI Inference API client.- Returns:
- builder
-
userAgentSuffix
-
dimensions
-
customHeaders
-
build
-