> ## Documentation Index
> Fetch the complete documentation index at: https://docs.tokenlab.sh/llms.txt
> Use this file to discover all available pages before exploring further.

# Graphiti

> Sử dụng TokenLab làm nhà cung cấp LLM Graphiti tương thích với OpenAI

## Tổng quan

Graphiti hỗ trợ các endpoint `/v1` tương thích với OpenAI thông qua `OpenAIGenericClient`. Hãy trỏ client đó tới TokenLab và chọn một model của TokenLab.

<Note>
  **Loại**: Khung bộ nhớ đồ thị tri thức (Knowledge graph memory framework)

  **Đường dẫn chính**: Chat Completions tương thích với OpenAI

  **Độ tin cậy hỗ trợ**: Đường dẫn tương thích với OpenAI đã được hỗ trợ
</Note>

## Môi trường

```bash theme={null}
export TOKENLAB_API_KEY="sk-your-tokenlab-key"
```

## LLM Client

```python theme={null}
import os

from graphiti_core.llm_client.config import LLMConfig
from graphiti_core.llm_client.openai_generic_client import OpenAIGenericClient

llm_config = LLMConfig(
    api_key=os.environ["TOKENLAB_API_KEY"],
    model="claude-sonnet-5",
    small_model="gpt-5.4-mini",
    base_url="https://api.tokenlab.sh/v1",
)

llm_client = OpenAIGenericClient(config=llm_config)
```

Truyền `llm_client` vào instance `Graphiti(...)` của bạn cùng với cấu hình cơ sở dữ liệu đồ thị và bộ nhúng (embedder) của bạn.

## Lưu ý về Endpoint

Đường dẫn tương thích với OpenAI của Graphiti được định hướng theo chat-completions. Hãy sử dụng các model có khả năng trả về JSON có cấu trúc một cách đáng tin cậy cho các tác vụ trích xuất và khử trùng lặp.
