Class HuggingFaceModel.Builder
- java.lang.Object
-
- com.oracle.bmc.generativeai.model.HuggingFaceModel.Builder
-
- Enclosing class:
- HuggingFaceModel
public static class HuggingFaceModel.Builder extends Object
-
-
Constructor Summary
Constructors Constructor Description Builder()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description HuggingFaceModel.BuilderaccessToken(String accessToken)Hugging Face access token to authenticate requests for restricted models.HuggingFaceModel.Builderbranch(String branch)The name of the branch in the Hugging Face repository to import the model from.HuggingFaceModelbuild()HuggingFaceModel.Buildercommit(String commit)The commit hash in the Hugging Face repository to import the model from.HuggingFaceModel.Buildercopy(HuggingFaceModel model)HuggingFaceModel.BuildermodelId(String modelId)The full model OCID from Hugging Face, typically in the format “org/model-name” (e.g., “meta-llama/Llama-2-7b”).
-
-
-
Method Detail
-
modelId
public HuggingFaceModel.Builder modelId(String modelId)
The full model OCID from Hugging Face, typically in the format “org/model-name” (e.g., “meta-llama/Llama-2-7b”).- Parameters:
modelId- the value to set- Returns:
- this builder
-
accessToken
public HuggingFaceModel.Builder accessToken(String accessToken)
Hugging Face access token to authenticate requests for restricted models.This token will be securely stored in OCI Vault.
- Parameters:
accessToken- the value to set- Returns:
- this builder
-
branch
public HuggingFaceModel.Builder branch(String branch)
The name of the branch in the Hugging Face repository to import the model from.If not specified, “main” will be used by default. If you provide both a branch and a commit hash, the model will be imported from the specified commit.
- Parameters:
branch- the value to set- Returns:
- this builder
-
commit
public HuggingFaceModel.Builder commit(String commit)
The commit hash in the Hugging Face repository to import the model from.If both a branch and a commit are provided, the commit hash will be used.
- Parameters:
commit- the value to set- Returns:
- this builder
-
build
public HuggingFaceModel build()
-
copy
public HuggingFaceModel.Builder copy(HuggingFaceModel model)
-
-