llm-axe 🪓
llm-axe is a handy little axe for developing llm powered applications.
It allows you to quickly implement complex interactions for local LLMs, such as function callers, online agents, pre-made generic agents, and more.
Installation
pip install llm-axe
Example Snippets
-
Online Chat Demo: Demo chat app showcasing an LLM with internet access
-
Function Calling
A function calling LLM can be created with just 3 lines of code:
No need for premade schemas, templates, special prompts, or specialized functions.
prompt = "I have 500 coins, I just got 200 more. How many do I have?"
llm = OllamaChat(model="llama3:instruct")
fc = FunctionCaller(llm, [get_time, get_date, get_location, add, multiply])
result = fc.get_function(prompt)
- Online Agent
prompt = "Tell me a bit about this website: https://toscrape.com/?"
llm = OllamaChat(model="llama3:instruct")
searcher = OnlineAgent(llm)
resp = searcher.search(prompt)
#output: Based on information from the internet, it appears that https://toscrape.com/ is a website dedicated to web scraping.
# It provides a sandbox environment for beginners and developers to learn and validate their web scraping technologies...
- PDF Reader
llm = OllamaChat(model="llama3:instruct")
files = ["../FileOne.pdf", "../FileTwo.pdf"]
agent = PdfReader(llm)
resp = agent.ask("Summarize these documents for me", files)
- Data Extractor
llm = OllamaChat(model="llama3:instruct")
info = read_pdf("../Example.pdf")
de = DataExtractor(llm, reply_as_json=True)
resp = de.ask(info, ["name", "email", "phone", "address"])
#output: {'Name': 'Frodo Baggins', 'Email': 'frodo@gmail.com', 'Phone': '555-555-5555', 'Address': 'Bag-End, Hobbiton, The Shire'}
How to setup llm-axe with your own LLM
Features
- Local LLM internet access with Online Agent
- PDF Document Reader Agent
- Premade utility Agents for common tasks
- Compatible with any LLM, local or externally hosted
- Built-in support for Ollama
Important Notes
The results you get from the agents are highly dependent on the capability of your LLM. An inadequate LLM will not be able to provide results that are usable with llm-axe
Testing in development was done using llama3 8b:instruct 4 bit quant
Metadata
Release files for llm-axe 1.1.9
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| llm_axe-1.1.9.tar.gz | 18.0 kB | Without provenance | Details for llm_axe-1.1.9.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| llm_axe-1.1.9-py3-none-any.whl | Python 3 | none | any | Details for llm_axe-1.1.9-py3-none-any.whl |
Total release size: 34.9 kB
Release files / llm_axe-1.1.9.tar.gz
| Download URL | llm_axe-1.1.9.tar.gz |
|---|---|
| Size | 18.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
8b3f55cb78e65a6f79256238a3680c39eff47e0830e6c0ff8c2c006e4aebabb6
|
|
BLAKE2b-256 checksum How to use checksums |
c8f2e8f430860279e9065ceb9a1125f240b50e4b03d9c952824b4db00b5146ad
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.0.0 CPython/3.10.6
|
Release files / llm_axe-1.1.9-py3-none-any.whl
| Download URL | llm_axe-1.1.9-py3-none-any.whl |
|---|---|
| Size | 16.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
7f5da796e75856de134caecfc8da2cd8af55300666e58caa3e6f37ccef09895e
|
|
BLAKE2b-256 checksum How to use checksums |
46e7b9816cd124035b36c8499844c7d9e2eb967409428fbe6fe81ae62a943a1a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.0.0 CPython/3.10.6
|
Security for llm-axe 1.1.9
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.