Skip to main content

Scrape, Langchain, Deploy !

Project description

LangBOTs

A silly library which combines scraping, langchain and flask. Inspired by prompt engineering

Installation

Use the package manager pip to install.

pip install langBOTs

Usage

Default scrapes from example.com

from langBOTs.scrapsplitvec import SSV
from langBOTs.query import Query
from langBOTs.chain import MDL

retriever = SSV(chunk_size = 400, chunk_overlap = 100)
ret = retriever.ret()

chain = MDL(retriever = ret, device = 0).chain()

Q = Query(chain=chain)
Q.qury("hello how are you")

API Note: Requires ngrok token for tunneling.

$ ngrok config add-authtoken <enter auth-token>

also make sure you have flask pyngrok flask_ngrok flask_cors (1 of them is not rquired ig)

from langBOTs.query import API
from langBOTs.query import process_second_string
from langBOTs.query import start

r = API(qury_object="Q") 
start(r)

I will post details on how to change the model and other aprameters soon.

Flow

(scrape->load->split->[dwnld_instructor_e]->create_vec_graph->save(optional)->[download_model->]initialise_chain->query->)->api

Contributing

Yo

License

MIT

By

Rajat

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

langBOTs-0.0.33.tar.gz (5.8 kB view hashes)

Uploaded Source

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