UI tool for LLM frameworks
Project description
Hayloft
UI tool for LLM frameworks to make easy prompt/completion tracking, store and comparison of different sessions.
Installation
Install package with pip
pip install hayloft
Usage
Start hayloft server
hayloft start
Trace logs of your script on http://localhost:7000
LlamaIndex
Install llama-index, create example.py file as below. Put examples folder from llama_index repo near the file.
import os
os.environ["OPENAI_API_KEY"] = 'YOUR_OPENAI_API_KEY'
from llama_index import SimpleDirectoryReader, VectorStoreIndex
from hayloft.llama_index import grab_logs
grab_logs()
documents = SimpleDirectoryReader("examples/paul_graham_essay/data").load_data()
index = VectorStoreIndex.from_documents(documents)
query_engine = index.as_query_engine()
query_engine.query("What did the author do growing up?")
Or you can start live sessions from hayloft ui, just modify code like here
import os
os.environ["OPENAI_API_KEY"] = 'YOUR_OPENAI_API_KEY'
from llama_index import SimpleDirectoryReader, VectorStoreIndex
from hayloft.llama_index import listen
def agent(query: str):
documents = SimpleDirectoryReader("examples/paul_graham_essay/data").load_data()
index = VectorStoreIndex.from_documents(documents)
query_engine = index.as_query_engine()
query_engine.query(query)
listen(agent)
Start this script
python example.py
BabyAGI
Clone BabyAGI fork repo, setup virtual env and install all dependencies
git clone git@github.com:eturchenkov/babyagi-hayloft.git && cd babyagi-hayloft
pip install -r requirements.txt
Adjust config in .env file and start babyagi.py script
python babyagi.py
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
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 hayloft-0.4.1.tar.gz.
File metadata
- Download URL: hayloft-0.4.1.tar.gz
- Upload date:
- Size: 70.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.5.1 CPython/3.9.16 Linux/6.1.31-2-MANJARO
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6d8449ec3d494e49544fb2700ccbc7b69a3b2ea65c4c158c08e36976f44ecda4
|
|
| MD5 |
fb85274b02ac2e83bcddc45d0c119660
|
|
| BLAKE2b-256 |
32140000dfbf1c049724e8d956831813832dccd4168f5b1003fef036919fe3f5
|
File details
Details for the file hayloft-0.4.1-py3-none-any.whl.
File metadata
- Download URL: hayloft-0.4.1-py3-none-any.whl
- Upload date:
- Size: 71.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.5.1 CPython/3.9.16 Linux/6.1.31-2-MANJARO
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3fb8856f75a6fe6209d8ea7d7a202e05f95ce920f4536e5fb1d6fdfd614445e7
|
|
| MD5 |
6c7d917fa88eb3ac4a77c3faf66bc045
|
|
| BLAKE2b-256 |
4dac6738a93edf2722da220d608767d5242bd7915cf1ae4596f9a16b46432622
|