Metadata-Version: 2.2
Name: gllm-inference-binary
Version: 0.5.43
Summary: A library containing components related to model inferences in Gen AI applications.
Author-email: Henry Wicaksono <henry.wicaksono@gdplabs.id>, Resti Febrina <resti.febrina@gdplabs.id>
Requires-Python: <3.14,>=3.11
Description-Content-Type: text/markdown
Requires-Dist: poetry<3.0.0,>=2.1.3
Requires-Dist: gllm-core-binary<0.4.0,>=0.3.0
Requires-Dist: aiohttp<4.0.0,>=3.12.14
Requires-Dist: filetype<2.0.0,>=1.2.0
Requires-Dist: httpx<0.29.0,>=0.28.0
Requires-Dist: jinja2<4.0.0,>=3.1.4
Requires-Dist: jsonschema<5.0.0,>=4.24.0
Requires-Dist: langchain<0.4.0,>=0.3.0
Requires-Dist: pandas<3.0.0,>=2.2.3
Requires-Dist: protobuf<7.0.0,>=5.29.4
Requires-Dist: python-magic<0.5.0,>=0.4.27; sys_platform != "win32"
Requires-Dist: python-magic-bin<0.5.0,>=0.4.14; sys_platform == "win32"
Requires-Dist: sentencepiece<0.3.0,>=0.2.0
Provides-Extra: dev
Requires-Dist: coverage<8.0.0,>=7.4.4; extra == "dev"
Requires-Dist: mypy<2.0.0,>=1.15.0; extra == "dev"
Requires-Dist: pre-commit<4.0.0,>=3.7.0; extra == "dev"
Requires-Dist: pytest<9.0.0,>=8.1.1; extra == "dev"
Requires-Dist: pytest-asyncio<0.24.0,>=0.23.6; extra == "dev"
Requires-Dist: pytest-cov<6.0.0,>=5.0.0; extra == "dev"
Requires-Dist: ruff<0.7.0,>=0.6.7; extra == "dev"
Provides-Extra: anthropic
Requires-Dist: anthropic<0.61.0,>=0.60.0; extra == "anthropic"
Provides-Extra: bedrock
Requires-Dist: aioboto3<16.0.0,>=15.0.0; extra == "bedrock"
Provides-Extra: cohere
Requires-Dist: cohere<6.0.0,>=5.18.0; extra == "cohere"
Provides-Extra: datasaur
Requires-Dist: openai<2.0.0,>=1.98.0; extra == "datasaur"
Provides-Extra: google
Requires-Dist: google-genai<=1.36,>=1.23; extra == "google"
Provides-Extra: huggingface
Requires-Dist: huggingface-hub<0.31.0,>=0.30.0; extra == "huggingface"
Requires-Dist: transformers<5.0.0,>=4.52.0; extra == "huggingface"
Provides-Extra: openai
Requires-Dist: openai<2.0.0,>=1.98.0; extra == "openai"
Provides-Extra: litellm
Requires-Dist: litellm<2.0.0,>=1.69.2; extra == "litellm"
Provides-Extra: twelvelabs
Requires-Dist: twelvelabs<0.5.0,>=0.4.4; extra == "twelvelabs"
Provides-Extra: voyage
Requires-Dist: voyageai<0.4.0,>=0.3.0; python_version < "3.13" and extra == "voyage"
Provides-Extra: xai
Requires-Dist: xai_sdk<2.0.0,>=1.0.0; extra == "xai"

# GLLM Inference

## Description

A library containing components related to model inferences in Gen AI applications.

## Installation

### Prerequisites
1. Python 3.11+ - [Install here](https://www.python.org/downloads/)
2. Pip (if using Pip) - [Install here](https://pip.pypa.io/en/stable/installation/)
3. Poetry (automatically installed via Makefile) - [Install here](https://python-poetry.org/docs/#installation)
4. Git (if using Git) - [Install here](https://git-scm.com/downloads)
5. gcloud CLI (for authentication) - [Install here](https://cloud.google.com/sdk/docs/install)
6. For git installation, access to the [GDP Labs SDK github repository](https://github.com/GDP-ADMIN/gl-sdk)

### 1. Installation from Artifact Registry
Choose one of the following methods to install the package:

#### Using pip
```bash
pip install gllm-inference-binary
```

#### Using Poetry
```bash
poetry add gllm-inference-binary
```

### 2. Development Installation (Git)
For development purposes, you can install directly from the Git repository:
```bash
poetry add "git+ssh://git@github.com/GDP-ADMIN/gen-ai-internal.git#subdirectory=libs/gllm-inference"
```

Available extras:
- `anthropic`: Install Anthropic models dependencies
- `google-genai`: Install Google Generative AI models dependencies
- `google-vertexai`: Install Google Vertex AI models dependencies
- `huggingface`: Install HuggingFace models dependencies
- `openai`: Install OpenAI models dependencies
- `twelvelabs`: Install TwelveLabs models dependencies

## Local Development Setup

### Quick Setup (Recommended)
For local development with editable gllm packages, use the provided Makefile:

```bash
# Complete setup: installs Poetry, configures auth, installs packages, sets up pre-commit
make setup
```

The following are the available Makefile targets:

1. `make setup` - Complete development setup (recommended for new developers)
2. `make install-poetry` - Install or upgrade Poetry to the latest version
3. `make auth` - Configure authentication for internal repositories
4. `make install` - Install all dependencies
5. `make install-pre-commit` - Set up pre-commit hooks
6. `make update` - Update dependencies
### Manual Development Setup (Legacy)
If you prefer to manage dependencies manually:

1. Go to root folder of `gllm-inference` module, e.g. `cd libs/gllm-inference`.
2. Run `poetry shell` to create a virtual environment.
3. Run `poetry lock` to create a lock file if you haven't done it yet.
4. Run `poetry install` to install the `gllm-inference` requirements for the first time.
5. Run `poetry update` if you update any dependency module version at `pyproject.toml`.


## Contributing
Please refer to this [Python Style Guide](https://docs.google.com/document/d/1uRggCrHnVfDPBnG641FyQBwUwLoFw0kTzNqRm92vUwM/edit?usp=sharing)
to get information about code style, documentation standard, and SCA that you need to use when contributing to this project

### Getting Started with Development
1. Clone the repository and navigate to the gllm-inference directory
2. Run `make setup` to set up your development environment
3. Run `which python` to get the path to be referenced at Visual Studio Code interpreter path (`Ctrl`+`Shift`+`P` or `Cmd`+`Shift`+`P`)
4. Try running the unit test to see if it's working:
```bash
poetry run pytest -s tests/unit_tests/
```
5. When you want to update the dependencies, run `make update`
