Metadata-Version: 2.2
Name: gllm-retrieval-binary
Version: 0.6.5b1
Summary: A library containing retrieval related components in Gen AI applications.
Author-email: Kevin Yauris <kevin.yauris@gdplabs.id>, Dimitrij Ray <dimitrij.ray@gdplabs.id>, Henry Wicaksono <henry.wicaksono@gdplabs.id>, Resti Febriana <resti.febriana@gdplabs.id>
Requires-Python: <3.13,>=3.11
Description-Content-Type: text/markdown
Requires-Dist: gllm-core-binary<0.5.0,>=0.3.0
Requires-Dist: gllm-inference-binary<0.7.0,>=0.5.0
Requires-Dist: gllm-datastore-binary[chroma,kg]<0.6.0,>=0.5.0
Requires-Dist: boto3<2.0.0,>=1.34.0
Requires-Dist: botocore<2.0.0,>=1.34.0
Requires-Dist: jsonschema<5.0.0,>=4.21.1
Requires-Dist: langchain<2.0.0,>=0.3.0
Requires-Dist: langchain-core<2.0.0,>=1.2.28
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: sqlglot<27.0.0,>=26.3.9
Requires-Dist: aiohttp>=3.14.0
Requires-Dist: urllib3>=2.7.0
Requires-Dist: pyasn1>=0.6.3
Requires-Dist: protobuf<7.0.0,>=6.33.5
Requires-Dist: cryptography>=46.0.7
Requires-Dist: pillow>=12.2.0
Requires-Dist: nltk<4.0.0,>=3.9.4
Requires-Dist: smart-search-sdk>=0.0.12
Requires-Dist: requests<3.0.0,>=2.33.0
Requires-Dist: tinytag<3.0.0,>=2.2.1
Requires-Dist: lightrag-hku<2.0.0,>=1.4.13
Requires-Dist: python-multipart<1.0.0,>=0.0.27
Requires-Dist: banks<3.0.0,>=2.4.2
Requires-Dist: langchain-core<2.0.0,>=1.3.3
Requires-Dist: langsmith<1.0.0,>=0.8.0
Requires-Dist: idna<4.0.0,>=3.15
Requires-Dist: starlette<2.0.0,>=1.0.1
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<10.0.0,>=9.0.3; extra == "dev"
Requires-Dist: pytest-asyncio<2.0.0,>=1.0.0; 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: cohere
Requires-Dist: cohere<6.0.0,>=5.0.0; extra == "cohere"
Provides-Extra: elasticsearch
Requires-Dist: langchain-elasticsearch<2.0.0,>=0.3.0; extra == "elasticsearch"
Provides-Extra: flag-embedding
Requires-Dist: FlagEmbedding<2.0.0,>=1.2.5; extra == "flag-embedding"
Requires-Dist: lxml<7.0.0,>=6.1.0; extra == "flag-embedding"
Requires-Dist: numpy<2.0.0,>=1.26; python_version < "3.12" and extra == "flag-embedding"
Requires-Dist: numpy<3.0.0,>=1.26; (python_version >= "3.12" and python_version < "3.13") and extra == "flag-embedding"
Requires-Dist: numpy<3.0.0,>=2.2; python_version >= "3.13" and extra == "flag-embedding"
Requires-Dist: peft<0.13.0,>=0.12.0; extra == "flag-embedding"
Requires-Dist: transformers<5.0.0,>=4.52.4; extra == "flag-embedding"
Requires-Dist: torch<3.0.0,>2.0.0; extra == "flag-embedding"
Provides-Extra: kg
Requires-Dist: llama-index-embeddings-openai<1.0.0,>=0.3.0; extra == "kg"
Requires-Dist: llama-index-llms-openai<1.0.0,>=0.3.0; extra == "kg"
Requires-Dist: gllm-datastore-binary[kg]<0.6.0,>=0.5.73; extra == "kg"
Provides-Extra: sql
Requires-Dist: sqlglot<27.0.0,>=26.3.9; extra == "sql"

# GLLM Retrieval

## Description
A library containing retrieval related components in Gen AI applications.

---

## Installation

### Prerequisites

Mandatory:
1. Python 3.11+ — [Install here](https://www.python.org/downloads/)
2. pip — [Install here](https://pip.pypa.io/en/stable/installation/)
3. uv — [Install here](https://docs.astral.sh/uv/getting-started/installation/)
4. gcloud CLI (for authentication) — [Install here](https://cloud.google.com/sdk/docs/install), then log in using:
   ```bash
   gcloud auth login
   ```

---

### Install from Artifact Registry

This requires authentication via the `gcloud` CLI.

```bash
uv pip install \
  --extra-index-url "https://oauth2accesstoken:$(gcloud auth print-access-token)@glsdk.gdplabs.id/gen-ai-internal/simple/" \
  gllm-retrieval
```

---

## Local Development Setup

### Prerequisites

1. Python 3.11+ — [Install here](https://www.python.org/downloads/)
2. pip — [Install here](https://pip.pypa.io/en/stable/installation/)
3. uv — [Install here](https://docs.astral.sh/uv/getting-started/installation/)
4. gcloud CLI — [Install here](https://cloud.google.com/sdk/docs/install), then log in using:

   ```bash
   gcloud auth login
   ```
5. Git — [Install here](https://git-scm.com/downloads)
6. Access to the [GDP Labs SDK GitHub repository](https://github.com/GDP-ADMIN/gl-sdk)

---

### 1. Clone Repository

```bash
git clone git@github.com:GDP-ADMIN/gl-sdk.git
cd gl-sdk/libs/gllm-retrieval
```

---

### 2. Setup Authentication

Set the following environment variables to authenticate with internal package indexes:

```bash
export UV_INDEX_GEN_AI_INTERNAL_USERNAME=oauth2accesstoken
export UV_INDEX_GEN_AI_INTERNAL_PASSWORD="$(gcloud auth print-access-token)"
export UV_INDEX_GEN_AI_USERNAME=oauth2accesstoken
export UV_INDEX_GEN_AI_PASSWORD="$(gcloud auth print-access-token)"
```

---

### 3. Quick Setup

Run:

```bash
make setup
```

---

### 4. Activate Virtual Environment

```bash
source .venv/bin/activate
```

---

## Local Development Utilities

The following Makefile commands are available for quick operations:

### Install uv

```bash
make install-uv
```

### Install Pre-Commit

```bash
make install-pre-commit
```

### Install Dependencies

```bash
make install
```

### Update Dependencies

```bash
make update
```

### Run Tests

```bash
make test
```

---

## Contributing

Please refer to the [Python Style Guide](https://docs.google.com/document/d/1uRggCrHnVfDPBnG641FyQBwUwLoFw0kTzNqRm92vUwM/edit?usp=sharing)
for information about code style, documentation standards, and SCA requirements.
