Class HuggingFaceModel.Builder

    • Constructor Detail

      • Builder

        public Builder()
    • 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