Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/sergiotapia/kryten
Kryten is a CLI tool to ask questions and get sourced answers from any .pdf, .doc, .docx, and many more documents.
https://github.com/sergiotapia/kryten
ai chatgpt cli openai pineconedb rag retrieval-augmented-generation
Last synced: about 2 months ago
JSON representation
Kryten is a CLI tool to ask questions and get sourced answers from any .pdf, .doc, .docx, and many more documents.
- Host: GitHub
- URL: https://github.com/sergiotapia/kryten
- Owner: sergiotapia
- License: mit
- Created: 2024-01-21T21:26:18.000Z (12 months ago)
- Default Branch: master
- Last Pushed: 2024-01-23T16:14:19.000Z (12 months ago)
- Last Synced: 2024-01-24T01:19:24.455Z (12 months ago)
- Topics: ai, chatgpt, cli, openai, pineconedb, rag, retrieval-augmented-generation
- Language: Nim
- Homepage:
- Size: 46.4 MB
- Stars: 6
- Watchers: 1
- Forks: 0
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Kryten
Kryten is a CLI tool to help you easily ask questions and get clear
sourced answers directly from your documents.```
./kryten ask ~/directives.pdf question "What's Space Core Directive 997?"Work done by an officer's doppleganger in a parallel universe
cannot be claimed as overtime. (directives.pdf, page 1)
```## Goals:
Kryten is portable, snappy, and works across all platforms with
minimal resource usage. For real.- **CLI only**
- Tiny footprint: Kryten is only 1.6MB.
- SQLite for portability and easy backups.
- Ask any question you want.
- Show your chat history for a single file.
- Show your chat history across all files.
- Documents are cached so questions are snappy.
- Run without ceremony. No need for configurations.My intent is for Kryten to be used by other apps to power their RAG workflows.
## Usage Guide:
Set these three Environment variables:
```
OPENAI_API_KEY="sk-123123"
PINECONE_API_KEY="123123"
PINECONE_ENDPOINT="https://some-index.svc.some-random-id.pinecone.io"
```Call the `kryten` binary.
```
./kryten ask ~/directives.pdf question "What's Space Core Directive 997?"Work done by an officer's doppleganger in a parallel universe
cannot be claimed as overtime. (directives.pdf, page 1)
```## Requirements:
### OpenAI for ChatPGT
You can create your own API key here: https://platform.openai.com/api-keys
### Pinecone Serverless for Vector Database RAG.
### Java Runtime to run Tika App.
Tika App is used to extract the content of your documents. You'll
need the Java Runtime Environment installed on your machine so this
can run properly.## Local Development:
```
nimble install
nimble build && ./kryten ask ~/directives.pdf question "What is Space Core Directive 196156?"
```## Contributing:
TODO