A collection of tools for LLM interactions like prompt refinement and idea generation. It also provides a console chat client with speech to text feature.
Project description
sokrates
A collection of tools for LLM interactions and system monitoring, designed to facilitate working with Large Language Models (LLMs) through modular components, well-documented APIs, and production-ready utilities.
Table of Contents
Description
sokrates is a comprehensive framework for working with Large Language Models (LLMs). It provides:
- Advanced prompt refinement tools
- System monitoring for resource tracking during LLM operations
- An extensive CLI interface for rapid experimentation
- Modular components and well-documented APIs
The project includes utilities for:
- Managing configuration settings
- Interacting with OpenAI-compatible LLM APIs
- Processing and cleaning LLM-generated text
- Monitoring system resources in real-time
- Executing complex workflows for idea generation and prompt refinement
Installation via pip
pip install sokrates
# or via uv
uv pip install sokrates
# test the installation
list-models --api-endpoint http://localhost:1234/v1
# or via uv
uv run list-models --api-endpoint http://localhost:1234/v1
Installation for development purposes
Prerequisites: Python 3.9 or higher
git clone https://github.com/Kubementat/sokrates.git
cd sokrates
uv sync
Configuration
You can configure the library via a configuration file in $HOME/.sokrates/.env
# Copy
cp .env.example $HOME/.sokrates/.env
# adjust to your needs
vim $HOME/.sokrates/.env
Whisper dependencies
brew install ffmpeg
brew install whisper-cpp
Usage
Basic Command Structure
Most commands follow this structure:
command --option1 value1 --option2 value2
You can always display the help via:
command --help
e.g.
uv run list-models --help
Available Commands
benchmark-model: Benchmark LLM modelsbenchmark-results-merger: Merge benchmark resultsbenchmark-results-to-markdown: Convert benchmark results to markdownexecute-tasks: Executes a list of tasks sequentially from a given task list in json format (generated bybreakdown_task)fetch-to-md: Fetch content and convert to markdowngenerate-mantra: Generate mantras or affirmationslist-models: List available LLM modelsidea-generator: Generate ideas using a multi-stage workflowrefine-and-send-prompt: Refine and send prompts to a LLMrefine-prompt: Refine prompts for better LLM performancebreakdown-task: Break down complex tasks into manageable stepssend-prompt: Send a prompt to a LLM APIllmchat: Chat with LLMs via the command line
Example Usage
# Getting help for a command and usage instructions
uv run refine-prompt --help
# List available models
uv run list-models --api-endpoint http://localhost:1234/v1
# Generate ideas
uv run idea-generator --output-directory tmp/ideas --verbose
# Benchmark a model
uv run benchmark-model --model qwen/qwen3-8b --iterations 5
Features
- Prompt Refinement: Optimize LLM input/output with advanced refinement tools
- System Monitoring: Real-time tracking of resource usage during LLM operations
- CLI Interface: Extensive command-line tools for rapid experimentation
- Modular Architecture: Easily extendable and customizable components
- Testing Infrastructure: Built-in test framework with pytest integration
Contributing
- Fork the repository and create a new branch
- Make your changes and add tests if necessary
- Submit a pull request with a clear description of your changes
Please read CONTRIBUTING.md for more details.
License
This project is licensed under the MIT License. See LICENSE for details.
Contact
- julianweberdev@gmail.com
- GitHub: @julweber
- Linked.in : Julian Weber
Changelog
View our CHANGELOG.md for a detailed changelog.
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 sokrates-0.3.0.tar.gz.
File metadata
- Download URL: sokrates-0.3.0.tar.gz
- Upload date:
- Size: 276.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.7.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
035744fff8e459916080886344fb8ee776fd66e7022d0d4344f32b30f2f11442
|
|
| MD5 |
a185d85b2e38af37bf406aec6366bd6f
|
|
| BLAKE2b-256 |
5376bff982f885d7040c33233a9262190bebcc3b103861036ca511ef3bfc17f5
|
File details
Details for the file sokrates-0.3.0-py3-none-any.whl.
File metadata
- Download URL: sokrates-0.3.0-py3-none-any.whl
- Upload date:
- Size: 87.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.7.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
95532362cbe3de0e44e64c1a537e7adf917850e25e24ef21ebdc1172762215ba
|
|
| MD5 |
396672141ab9bf088e48cf3ebaac2d42
|
|
| BLAKE2b-256 |
3113b8ba0a9c998bc7a733ce973b3b8a6ed7630c8ee416131345c4dd95a6fb2d
|