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 details)

Uploaded Source

File details

Details for the file langBOTs-0.0.33.tar.gz.

File metadata

  • Download URL: langBOTs-0.0.33.tar.gz
  • Upload date:
  • Size: 5.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.8

File hashes

Hashes for langBOTs-0.0.33.tar.gz
Algorithm Hash digest
SHA256 656f421cd2ef52acd2b21fb906097a56e9ecc52cd21eaddd07e4a427c0a70d74
MD5 c8f8104c58a86d7546bff6d1efd8fbda
BLAKE2b-256 10bb7bcc650b975c009c28ba2cc2fe7a74951c342c9bad15fbb4baf5957a641c

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