Metadata-Version: 2.4
Name: ui-chat-model
Version: 0.1.0
Summary: A LangChain-compatible chat model that extracts responses via UI automation
Requires-Python: >=3.9
Requires-Dist: asyncio
Requires-Dist: langchain-core
Requires-Dist: playwright
Provides-Extra: dev
Requires-Dist: black; extra == 'dev'
Requires-Dist: pytest; extra == 'dev'
Description-Content-Type: text/markdown

# UI Chat Model (ChatUIBridge)

A LangChain-compatible chat model that extracts responses by automating a web UI via Playwright.

## Installation

```bash
pip install ui-chat-model
playwright install chromium
```

## Usage

```python
from ui_chat_model import ChatUIBridge

# Initialize the model pointing to your hosted UI
model = ChatUIBridge(
    url="https://your-frontend-url.com",
    model_name="llama-3.1-8b-instant"
)

# Use it like any other LangChain chat model
response = model.invoke("Hello, how are you?")
print(response.content)
```

## How it works
This library uses Playwright to open a browser, navigate to a specified UI, type the prompt into a textarea, and extract the resulting text from the UI. It's designed to bridge web-only AI interfaces into LangChain workflows.
