Metadata-Version: 2.4
Name: langchain-openzoo
Version: 0.1.0
Summary: LangChain integration for OpenZoo - OpenAI-compatible inference with no signup
Author-email: staccDOTsol <jarettrsdunn@gmail.com>
License-Expression: MIT
Project-URL: Homepage, https://openzoo.fun
Project-URL: Issues, https://github.com/staccDOTsol/langchain-openzoo/issues
Requires-Python: >=3.10
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: langchain-openai>=0.2
Requires-Dist: langchain-core>=0.3
Dynamic: license-file

# langchain-openzoo

[LangChain](https://python.langchain.com/) integration for [OpenZoo](https://openzoo.fun) — an OpenAI-compatible inference endpoint with **no signup**: any API key value works and billing happens per call via x402 or card.

## Installation

```bash
pip install -U langchain-openzoo
```

No API key is required. Optionally:

```bash
export OPENZOO_API_KEY=sk-openzoo   # any value works; useful for tagging calls
export OPENZOO_BASE_URL=http://localhost:8402/v1   # route through a local `npx openzoo` gateway
```

## Chat model

`ChatOpenZoo` is a thin subclass of `ChatOpenAI` pointed at `https://api.openzoo.fun/v1`. Everything `ChatOpenAI` supports (streaming, tool calling, structured output, async) works the same way.

```python
from langchain_openzoo import ChatOpenZoo

llm = ChatOpenZoo(model="z-ai/glm-5.3-flash")
llm.invoke("Sing about zebras")   # note: billed per call
```

With parameters:

```python
llm = ChatOpenZoo(
    model="z-ai/glm-5.3-flash",
    temperature=0.2,
    max_tokens=512,
    # api_key="sk-anything",                 # optional
    # base_url="http://localhost:8402/v1",   # optional local gateway
)
```

Browse the free model catalog at [https://api.openzoo.fun/v1/models](https://api.openzoo.fun/v1/models) — model ids look like `z-ai/glm-5.3-flash`.

## Development

```bash
python -m venv venv && source venv/bin/activate
pip install -e . pytest
pytest
```

The tests only cover instantiation and configuration — no network calls are made.
