No project description provided
Project description
langchain-utils
LangChain Utilities
Prompt generation using LangChain document loaders
Optimized to feed into a chat interface (like ChatGPT) manually in one or multiple (to get around context length limits) goes.
urlprompt
$ urlprompt --help
usage: urlprompt [-h] [-V] [-c] [-m model] [-S] [-M] [-s chunk_size] [-w WHAT] [-j] [-n] URL
Get a prompt consisting the text content of a webpage
positional arguments:
URL URL
options:
-h, --help show this help message and exit
-V, --version show program's version number and exit
-c, --copy Copy the prompt to clipboard (default: False)
-m model, --model model
Model to use (default: gpt-3.5-turbo)
-S, --split Split the prompt into multiple parts (default: False)
-M, --merge Merge contents of all pages before processing (default: False)
-s chunk_size, --chunk-size chunk_size
Chunk size when splitting transcript, also used to determine whether to split (default: 2000)
-w WHAT, --what WHAT Initial knowledge you want to insert before the PDF content in the prompt (default: the content of a PDF file)
-j, --javascript Use JavaScript to render the page (default: False)
-n, --dry-run Dry run (default: False)
pdfprompt
$ pdfprompt --help
usage: pdfprompt [-h] [-V] [-c] [-m model] [-S] [-M] [-s chunk_size] [-w WHAT]
[-n]
PDF Path
Get a prompt consisting the text content of a PDF file
positional arguments:
PDF Path Path to the PDF file
options:
-h, --help show this help message and exit
-V, --version show program's version number and exit
-c, --copy Copy the prompt to clipboard (default: False)
-m model, --model model
Model to use (default: gpt-3.5-turbo)
-S, --split Split the prompt into multiple parts (default: False)
-M, --merge Merge contents of all pages before processing
(default: False)
-s chunk_size, --chunk-size chunk_size
Chunk size when splitting transcript, also used to
determine whether to split (default: 2000)
-w WHAT, --what WHAT Initial knowledge you want to insert before the PDF
content in the prompt (default: the content of a PDF
file)
-n, --dry-run Dry run (default: False)
ytprompt
$ ytprompt --help
usage: ytprompt [-h] [-V] [-c] [-m model] [-S] [-s chunk_size] [-n]
YouTube URL
Get a prompt consisting Title and Transcript of a YouTube Video
positional arguments:
YouTube URL YouTube URL
options:
-h, --help show this help message and exit
-V, --version show program's version number and exit
-c, --copy Copy the prompt to clipboard (default: False)
-m model, --model model
Model to use (default: gpt-3.5-turbo)
-S, --split Split the prompt into multiple parts (default: False)
-s chunk_size, --chunk-size chunk_size
Chunk size when splitting transcript, also used to
determine whether to split (default: 2000)
-n, --dry-run Dry run (default: False)
Installation
pipx
This is the recommended installation method.
$ pipx install langchain-utils
pip
$ pip install langchain-utils
Develop
$ git clone https://github.com/tddschn/langchain-utils.git
$ cd langchain-utils
$ poetry install
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
langchain_utils-0.2.0.tar.gz
(6.4 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file langchain_utils-0.2.0.tar.gz.
File metadata
- Download URL: langchain_utils-0.2.0.tar.gz
- Upload date:
- Size: 6.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.4.0 CPython/3.11.2 Darwin/22.4.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
421961ef9ea0935c2da841a2bbcc99200018c808e88df3e8af5e5ed82e87adae
|
|
| MD5 |
4947bcf83f3aa7031047974b21282730
|
|
| BLAKE2b-256 |
e820656ce37af367748c74bddb8150ca6f28eb3f64659ca072f933e8bb3812b9
|
File details
Details for the file langchain_utils-0.2.0-py3-none-any.whl.
File metadata
- Download URL: langchain_utils-0.2.0-py3-none-any.whl
- Upload date:
- Size: 9.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.4.0 CPython/3.11.2 Darwin/22.4.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a12d536626fc94b2a004ca4a54204ca96c170aaa6ace2415c6f92b7c11c34144
|
|
| MD5 |
f8ad5d38db960481cffce139a05793db
|
|
| BLAKE2b-256 |
ed909bc4ef16936764d898cd0fbcfa8693f44f28eedffffbee197053f8746377
|