A mini framework built on top of Langchain and Llamaindex to provide LLM powered Autonomous Agents as a simplified service to assist users with their tasks
Project description
ServifAI
A mini framework built on top of Langchain and Llamaindex to provide LLM powered Autonomous Agents as a simplified service to assist users with their tasks.
Overview
ServifAI (Task-based Agent) = LLM + Memory + Planning + Toolbox
Instead of feeding all kinds of tools to a single agent and confusing it while selection, ServifAI narrows down the selection by combining only necessary tools on basis of the task at hand.
Read this article to get an overview on Agents.
Currently we only support OpenAI
models. If you are privacy concerned you should apply for Azure OpenAI
services. The reason for not yet supporting opensource local
models are:
- You need a lot of money - either to buy a great GPU or host it on cloud with a great GPU
- even if you tick the first point, it won't help you much as currently opensource models are good for chat but lag behind
OpenAI
models in enabling complex agent workflows
Current Supported Tasks:
Tasks | Toolbox Tools | Required File Extensions |
---|---|---|
default |
DuckDuckGo + LLM Math + PAL Math | None |
qna_local_docs |
Vector Index + Knowledge Graphs | PDF /DOCX |
Installation
Works best with Poetry
poetry add servifai
With pip, you might have to install dependencies manually
pip install servifai
Usage
Create a .env
file for openai
OPENAI_API_KEY='sk-...'
Run Python Code
from servifai import ServifAI
myagent = ServifAI()
while True:
text_input = input("Me: ")
if text_input == "exit":
break
response = myagent.chat(text_input)
print(f'ServifAI: {response}\n')
Output
Me: I am feeling bored at home, provide me a list of places in bengaluru to chill out on a sunday.
ServifAI: Here is a list of places in Bengaluru to chill out on a Sunday:
1. Cubbon Park
2. Rasta Cafe
3. Skandagiri
4. Uttari Betta Sunrise
5. Ranganathaswamy Betta
6. Adventure Camping at Nandi Hills
7. Riverside Manchanabele
8. Caving at AntaraGange
9. Clubbing at Hard Rock Café
10. High Ultra lounge
11. Toit
12. Dinning at Empire Hotel
These are just a few options, and there are many more places in Bengaluru where you can relax and have a good time on a Sunday.
Me: Too many options for a day. Provide a itinerary instead for one day
ServifAI: Based on the search results, here is a suggested one-day itinerary for Bengaluru:
Morning: Start your day with a visit to Cubbon Park and enjoy the greenery. Join the locals on their early morning walk.
Afternoon: Indulge in a classic South Indian breakfast and then head to Savandurga, a famous place known for its temples and rock climbing.
Evening: Explore the vibrant streets of Bengaluru and visit popular spots like MG Road or Brigade Road for shopping and dining.
Night: End your day by experiencing the nightlife of Bengaluru at one of the city's popular clubs or lounges.
Please note that this is just a suggested itinerary and you can customize it based on your preferences and interests.
Me: Do you think this would be possible to complete based on today's weather?
ServifAI: Based on the weather forecast, it is possible to complete the activity you mentioned. The maximum temperature in Bengaluru is expected to be around 32 degrees Celsius today.
Me: exit
Check Examples for more.
TODO:
- Add support for popular unstructured data formats
- Add support for other VectorDBs
- Add other task based tools
- Add support for structured data formats
- Support for OpenAI funcs
Project details
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
File details
Details for the file servifai-0.2.3.tar.gz
.
File metadata
- Download URL: servifai-0.2.3.tar.gz
- Upload date:
- Size: 10.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.5.1 CPython/3.10.8 Linux/5.15.0-1041-azure
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | dbc2133cbde0e163c188ad2c9a52bf8a8083507951125ba10f51b3eaaa846ebf |
|
MD5 | 29956669f633b3c0e73372434975a3c8 |
|
BLAKE2b-256 | a9fcaad1e356d9af5b5d186670e779643d56af360a5f5404cc85734f492baadd |
File details
Details for the file servifai-0.2.3-py3-none-any.whl
.
File metadata
- Download URL: servifai-0.2.3-py3-none-any.whl
- Upload date:
- Size: 11.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.5.1 CPython/3.10.8 Linux/5.15.0-1041-azure
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0f81e8be121461a64ecc8ffa99d46a0da99b64518d227f05ef46ea157a738497 |
|
MD5 | cafbb684bd4148949220f1e0fd425822 |
|
BLAKE2b-256 | 630ab0c325b5a8abb0d408f040465526b703f45ba6a6f8a2a6738468174d0f77 |