# RAGnificentAI - Your Magnificent RAG-Powered Chatbot Toolkit



RAGnificentAI is a Python package that enables developers to quickly build powerful chatbots with seamless tool integration and Retrieval-Augmented Generation (RAG) capabilities, supporting any OpenAI-compatible LLM.
## Why RAGnificentAI?
- **LLM Agnostic** - Works with Groq, OpenAI, Gemini, and any OpenAI-compatible API
- **Easy Tool Integration** - Add custom functions as tools with minimal code
- **Conversation Management** - Efficient short-term memory management with summarization technique
- **Prompt Customization** - Flexible system and summary prompts
- **Lightweight** - Minimal dependencies, maximum functionality
## Installation
1. Install using pip:
```bash
pip install RAGnificentAI
```
## Quick Start
```python
from RAGnificentAI import ChatAI, AgentParams
def add(x: int, y: int) -> int:
"""Add two numbers together."""
return x + y
tools = [add]
# For OpenAI-compatible endpoints
rag = ChatAI()
chatbot = rag.initiate_chatbot(
params=AgentParams(
model="gpt-3.5-turbo", # Or any other model
api_key="your_api_key",
base_url="https://api.openai.com/v1", # Or your custom endpoint
system_prompt="You are a helpful AI assistant.",
summary_prompt="Summarize the conversation concisely.",
thread_id='1',
tools=tools, # Optional
temperature=0.7 # Optional
)
)
while True:
user_input = input("You (q to quit): ")
if user_input.lower() == 'q':
break
response = chatbot.run(messages=user_input)
print("AI:", response)
```
## Configuration Options
### AgentParams
| Parameter | Type | Description | Required |
|-------------------|----------------|----------------------------------------------|----------|
| `model` | str | Model name (e.g. "gpt-3.5-turbo") | Yes |
| `api_key` | str | Your API key | Yes |
| `base_url` | str | API base URL (default: OpenAI) | No |
| `system_prompt` | str | Initial system prompt | Yes |
| `summary_prompt` | str | Prompt for conversation summaries | Yes |
| `thread_id` | str | Conversation thread identifier | Yes |
| `user_information`| dict | User metadata for personalization | No |
| `tools` | list[callable] | Custom tools/functions to integrate | No |
## Supported LLM Providers
- OpenAI (including Azure OpenAI)
- Groq
- Gemini
- Any OpenAI-compatible API (LocalAI, vLLM, etc.)
- Anthropic Claude (via OpenAI compatibility layer)
## Adding Custom Tools
```python
def multiply(a: int, b: int) -> int:
"""Multiply two numbers together."""
return a * b
def get_weather(city: str) -> str:
"""Get current weather for a given city."""
return f"Weather in {city}: Sunny"
tools = [multiply, get_weather]
```
## Best Practices
1. Use environment variables for API keys
2. Include clear docstrings for your tools
3. Use type hints for better tool understanding
4. Keep system prompts concise but descriptive
5. Handle sensitive user information appropriately
## License
**RAGnificentAI** is licensed under the **RAGnificentAI Custom License**:
```text
Copyright (c) 2025 [K. M. Abul Farhad-Ibn-Alam]
Permission is hereby granted to any person obtaining a copy of this software
and associated documentation files (the "Software") to use, modify, and distribute
the Software for any purpose, subject to the following conditions:
1. Redistributions must retain this copyright notice.
2. Commercial use requires written permission from the author.
3. The author is not liable for any damages arising from Software use.
All rights not expressly granted are reserved by the author.
Raw data
{
"_id": null,
"home_page": "https://github.com/Abul-Farhad/RAGnificentAI",
"name": "RAGnificentAI",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.9",
"maintainer_email": null,
"keywords": "llm chatbot rag openai groq gemini",
"author": "K. M. Abul Farhad-Ibn-Alam",
"author_email": "abulfarhad.ibnalam@gmail.com",
"download_url": "https://files.pythonhosted.org/packages/33/f5/6da829826ac1a86c962b3fc35d8bf89154d36f026a7a288c7a0f97f2a562/ragnificentai-1.2.tar.gz",
"platform": null,
"description": "# RAGnificentAI - Your Magnificent RAG-Powered Chatbot Toolkit\n\n\n\n\n\nRAGnificentAI is a Python package that enables developers to quickly build powerful chatbots with seamless tool integration and Retrieval-Augmented Generation (RAG) capabilities, supporting any OpenAI-compatible LLM.\n\n## Why RAGnificentAI?\n\n- **LLM Agnostic** - Works with Groq, OpenAI, Gemini, and any OpenAI-compatible API\n- **Easy Tool Integration** - Add custom functions as tools with minimal code\n- **Conversation Management** - Efficient short-term memory management with summarization technique\n- **Prompt Customization** - Flexible system and summary prompts\n- **Lightweight** - Minimal dependencies, maximum functionality\n\n## Installation\n\n1. Install using pip:\n\n```bash\npip install RAGnificentAI\n```\n\n## Quick Start\n\n```python\nfrom RAGnificentAI import ChatAI, AgentParams\n\ndef add(x: int, y: int) -> int:\n \"\"\"Add two numbers together.\"\"\"\n return x + y\n\n\ntools = [add]\n\n# For OpenAI-compatible endpoints\nrag = ChatAI()\nchatbot = rag.initiate_chatbot(\n params=AgentParams(\n model=\"gpt-3.5-turbo\", # Or any other model\n api_key=\"your_api_key\",\n base_url=\"https://api.openai.com/v1\", # Or your custom endpoint\n system_prompt=\"You are a helpful AI assistant.\",\n summary_prompt=\"Summarize the conversation concisely.\",\n thread_id='1',\n tools=tools, # Optional\n temperature=0.7 # Optional\n )\n)\n\nwhile True:\n user_input = input(\"You (q to quit): \")\n if user_input.lower() == 'q':\n break\n response = chatbot.run(messages=user_input)\n print(\"AI:\", response)\n```\n\n## Configuration Options\n\n### AgentParams\n\n| Parameter | Type | Description | Required |\n|-------------------|----------------|----------------------------------------------|----------|\n| `model` | str | Model name (e.g. \"gpt-3.5-turbo\") | Yes |\n| `api_key` | str | Your API key | Yes |\n| `base_url` | str | API base URL (default: OpenAI) | No |\n| `system_prompt` | str | Initial system prompt | Yes |\n| `summary_prompt` | str | Prompt for conversation summaries | Yes |\n| `thread_id` | str | Conversation thread identifier | Yes |\n| `user_information`| dict | User metadata for personalization | No |\n| `tools` | list[callable] | Custom tools/functions to integrate | No |\n\n## Supported LLM Providers\n\n- OpenAI (including Azure OpenAI)\n- Groq\n- Gemini\n- Any OpenAI-compatible API (LocalAI, vLLM, etc.)\n- Anthropic Claude (via OpenAI compatibility layer)\n\n## Adding Custom Tools\n\n```python\ndef multiply(a: int, b: int) -> int:\n \"\"\"Multiply two numbers together.\"\"\"\n return a * b\n\ndef get_weather(city: str) -> str:\n \"\"\"Get current weather for a given city.\"\"\"\n return f\"Weather in {city}: Sunny\"\n\ntools = [multiply, get_weather]\n```\n\n## Best Practices\n\n1. Use environment variables for API keys\n2. Include clear docstrings for your tools\n3. Use type hints for better tool understanding\n4. Keep system prompts concise but descriptive\n5. Handle sensitive user information appropriately\n\n\n## License\n\n**RAGnificentAI** is licensed under the **RAGnificentAI Custom License**: \n\n```text\nCopyright (c) 2025 [K. M. Abul Farhad-Ibn-Alam]\n\nPermission is hereby granted to any person obtaining a copy of this software\nand associated documentation files (the \"Software\") to use, modify, and distribute\nthe Software for any purpose, subject to the following conditions:\n\n1. Redistributions must retain this copyright notice.\n2. Commercial use requires written permission from the author.\n3. The author is not liable for any damages arising from Software use.\n\nAll rights not expressly granted are reserved by the author.\n",
"bugtrack_url": null,
"license": "Custom",
"summary": "A simple RAG chatbot supporting multiple LLM providers",
"version": "1.2",
"project_urls": {
"Homepage": "https://github.com/Abul-Farhad/RAGnificentAI",
"Source": "https://github.com/Abul-Farhad/RAGnificentAI"
},
"split_keywords": [
"llm",
"chatbot",
"rag",
"openai",
"groq",
"gemini"
],
"urls": [
{
"comment_text": null,
"digests": {
"blake2b_256": "861859d410b19191288aaaad4ad2a5d575feca3a8090f04c28dcc045dc197184",
"md5": "25cf4d688cf6296856229b1c9c6bee3c",
"sha256": "0a07e7c02ec45607dc7068160845e94d79014d693b2decc6dd557acfe3db8faa"
},
"downloads": -1,
"filename": "ragnificentai-1.2-py3-none-any.whl",
"has_sig": false,
"md5_digest": "25cf4d688cf6296856229b1c9c6bee3c",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.9",
"size": 8906,
"upload_time": "2025-07-17T13:36:50",
"upload_time_iso_8601": "2025-07-17T13:36:50.753007Z",
"url": "https://files.pythonhosted.org/packages/86/18/59d410b19191288aaaad4ad2a5d575feca3a8090f04c28dcc045dc197184/ragnificentai-1.2-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": null,
"digests": {
"blake2b_256": "33f56da829826ac1a86c962b3fc35d8bf89154d36f026a7a288c7a0f97f2a562",
"md5": "27e98aba27c2d2c6fe9d072152f58449",
"sha256": "29067686bd39afd77d913ed03d200f35f07092626334918cce75fe28dfdef514"
},
"downloads": -1,
"filename": "ragnificentai-1.2.tar.gz",
"has_sig": false,
"md5_digest": "27e98aba27c2d2c6fe9d072152f58449",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.9",
"size": 6984,
"upload_time": "2025-07-17T13:36:54",
"upload_time_iso_8601": "2025-07-17T13:36:54.539493Z",
"url": "https://files.pythonhosted.org/packages/33/f5/6da829826ac1a86c962b3fc35d8bf89154d36f026a7a288c7a0f97f2a562/ragnificentai-1.2.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2025-07-17 13:36:54",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "Abul-Farhad",
"github_project": "RAGnificentAI",
"travis_ci": false,
"coveralls": false,
"github_actions": false,
"requirements": [
{
"name": "pydantic",
"specs": []
},
{
"name": "langchain",
"specs": []
},
{
"name": "langchain-core",
"specs": []
},
{
"name": "langchain-community",
"specs": []
},
{
"name": "langchain-groq",
"specs": []
},
{
"name": "langchain-openai",
"specs": []
},
{
"name": "langgraph",
"specs": []
},
{
"name": "python-dotenv",
"specs": []
},
{
"name": "setuptools",
"specs": []
}
],
"lcname": "ragnificentai"
}