Skip to main content

Eunomia SDK for LangChain

This project has been archived.

The maintainers of this project have marked this project as archived. No new releases are expected.

Project description

Eunomia SDK for LangChain

This package allows to streamline LangChain's loaders resources and their metadata to the Eunomia server for an easier policy configuration process.

Installation

Install the eunomia-sdk-langchain package via pip:

pip install eunomia-sdk-langchain

Usage

The EunomiaLoader class is a wrapper around any loader class from LangChain.

Assume you want to use the CSVLoader, you can do the following:

from eunomia_sdk_langchain import EunomiaLoader
from langchain_community.document_loaders.csv_loader import CSVLoader

loader = CSVLoader(...)
wrapped_loader = EunomiaLoader(loader, server_url="http://localhost:8000")

You can then call any of the load methods:

# Synchronous loading
docs = wrapped_loader.load()

# Synchronous lazy loading
docs = []
for doc in wrapped_loader.lazy_load():
    docs.append(doc)

# Asynchronous loading
import asyncio

asyncio.run(wrapped_loader.aload())

# Asynchronous lazy loading
docs = []
async for doc in wrapped_loader.alazy_load():
    docs.append(doc)

All loaded documents will be automatically sent to the Eunomia server which will assign an identifier to each document and store their metadata. The identifiers and metadata can then be used to configure policies in the Eunomia server.

Documentation

For detailed usage, check out the SDK's documentation.

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

eunomia_sdk_langchain-0.1.0.tar.gz (2.8 kB view details)

Uploaded Source

Built Distribution

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

eunomia_sdk_langchain-0.1.0-py3-none-any.whl (3.7 kB view details)

Uploaded Python 3

File details

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

File metadata

File hashes

Hashes for eunomia_sdk_langchain-0.1.0.tar.gz
Algorithm Hash digest
SHA256 89f3e8c307ac209eeea2f519d43f8d4e10dd7691b125e4827c2ddfba65929ffc
MD5 68bee6b650d367039009f92caaa9b617
BLAKE2b-256 30ce463481cb9dbe91c3423edefe99b04cad391149b3b1f0ff2eef8e078dec72

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for eunomia_sdk_langchain-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 420f0bc8a15774bffe603ca5d7c7c7ad671611020726a9b24743a1eb17042238
MD5 569556a27e99bee3e017cb511c0005fe
BLAKE2b-256 904faa79c19e0f42ce60e0057caa152bcce2531c3363b5e2cfbe91ffb3165d79

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