Skip to content

RepositoryResource

Base classes

Name Children Inherits
BaseResource
llmling.config.models
Base class for all resource types.

⋔ Inheritance diagram

graph TD
  2664830277["models.RepositoryResource"]
  1028592330["models.BaseResource"]
  330168112["schema.Schema"]
  3879467795["main.BaseModel"]
  2751680898["builtins.object"]
  1028592330 --> 2664830277
  330168112 --> 1028592330
  3879467795 --> 330168112
  2751680898 --> 3879467795

🛈 DocStrings

Bases: BaseResource

Git repository content.

Source code in src/llmling/config/models.py
class RepositoryResource(BaseResource):
    """Git repository content."""

    type: Literal["repository"] = Field("repository", init=False)
    repo_url: str
    """URL of the git repository."""

    ref: str = "main"
    """Git reference (branch, tag, or commit)."""

    path: str = ""
    """Path within the repository."""

    sparse_checkout: list[str] | None = None
    """Optional list of paths for sparse checkout."""

    user: str | None = None
    """Optional user name for authentication."""

    password: SecretStr | None = None
    """Optional password for authentication."""

    def validate_resource(self) -> list[str]:
        return [
            f"Repository {self.repo_url} has user but no password"
            for _ in [None]
            if self.user and not self.password
        ]

password class-attribute instance-attribute

password: SecretStr | None = None

Optional password for authentication.

path class-attribute instance-attribute

path: str = ''

Path within the repository.

ref class-attribute instance-attribute

ref: str = 'main'

Git reference (branch, tag, or commit).

repo_url instance-attribute

repo_url: str

URL of the git repository.

sparse_checkout class-attribute instance-attribute

sparse_checkout: list[str] | None = None

Optional list of paths for sparse checkout.

user class-attribute instance-attribute

user: str | None = None

Optional user name for authentication.

:fa-brands-github: Show source on GitHub