Skip to main content

No project description provided

Project description

pylangdb

pylangdb is a Python package for interacting with LangDb APIs. Please find out more at https://langdb.ai/.

Installation

To install pylangdb, use pip:

pip install pylangdb

Usage

Initialize LangDb

from pylangdb import LangDb, MessageRequest

langdb = LangDb(CLIENT_ID, CLIENT_SECRET)

Query

query = "select * from langdb.models"
self.langdb.query_df(query)

Execute View

langdb.execute_view({
    "view_name": "view_name", 
    "params": {
        "param_a": ".."
    }
})

Invoke Model

msg = MessageRequest(
            model_name='review',
            message='You are a terrible product',
            parameters={},
            include_history=False
        )
response = langdb.invoke_model(msg)

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

pylangdb-0.1.1.tar.gz (3.5 kB view hashes)

Uploaded Source

Built Distribution

pylangdb-0.1.1-py3-none-any.whl (4.1 kB view hashes)

Uploaded Python 3

Supported by

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