Skip to main content

A LangChain-compatible chat model that extracts responses via UI automation

Project description

UI Chat Model (ChatUIBridge)

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

Installation

pip install ui-chat-model
playwright install chromium

Usage

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.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

ui_chat_model-0.1.0.tar.gz (2.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

ui_chat_model-0.1.0-py3-none-any.whl (2.9 kB view details)

Uploaded Python 3

File details

Details for the file ui_chat_model-0.1.0.tar.gz.

File metadata

  • Download URL: ui_chat_model-0.1.0.tar.gz
  • Upload date:
  • Size: 2.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.3

File hashes

Hashes for ui_chat_model-0.1.0.tar.gz
Algorithm Hash digest
SHA256 d775d933134ae83fa61e52b851f89ed510467228a3851c3511dc83f8877fc4ff
MD5 c2d64025dd60233aa4ef781b1e53d0c4
BLAKE2b-256 58e107ef6550daea23ba05d45f96e093ada3ec085d049b63cb98dcacfa4cd64d

See more details on using hashes here.

File details

Details for the file ui_chat_model-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: ui_chat_model-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 2.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.3

File hashes

Hashes for ui_chat_model-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 4b540c38b0cf0a61576e2f67ef1982558615f2441e37d6b62d4b7e0489912af1
MD5 9a4e43b9f56ac841f8c929a9b65e0c48
BLAKE2b-256 4b1620f3533fa86fbdafb652d11b7e1dcb2e78b3d71b75344fcf8b9423bff948

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page