rdai 1.0.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (40) hide show
  1. rdai-1.0.0/.gitignore +17 -0
  2. rdai-1.0.0/LICENSE +23 -0
  3. rdai-1.0.0/PKG-INFO +200 -0
  4. rdai-1.0.0/README.md +165 -0
  5. rdai-1.0.0/examples/basic_chat.py +16 -0
  6. rdai-1.0.0/examples/custom_brain.py +23 -0
  7. rdai-1.0.0/examples/smart_failover.py +15 -0
  8. rdai-1.0.0/pyproject.toml +66 -0
  9. rdai-1.0.0/rdai/__init__.py +182 -0
  10. rdai-1.0.0/rdai/cli/commands/__init__.py +0 -0
  11. rdai-1.0.0/rdai/cli/commands/about.py +34 -0
  12. rdai-1.0.0/rdai/cli/commands/benchmark.py +67 -0
  13. rdai-1.0.0/rdai/cli/commands/config.py +39 -0
  14. rdai-1.0.0/rdai/cli/commands/doctor.py +106 -0
  15. rdai-1.0.0/rdai/cli/commands/health.py +40 -0
  16. rdai-1.0.0/rdai/cli/commands/init.py +172 -0
  17. rdai-1.0.0/rdai/cli/main.py +86 -0
  18. rdai-1.0.0/rdai/config/__init__.py +35 -0
  19. rdai-1.0.0/rdai/config/discovery.py +170 -0
  20. rdai-1.0.0/rdai/config/loader.py +182 -0
  21. rdai-1.0.0/rdai/core/engine.py +90 -0
  22. rdai-1.0.0/rdai/core/failover.py +76 -0
  23. rdai-1.0.0/rdai/core/registry.py +36 -0
  24. rdai-1.0.0/rdai/core/router.py +48 -0
  25. rdai-1.0.0/rdai/providers/aws_bedrock.py +36 -0
  26. rdai-1.0.0/rdai/providers/base.py +22 -0
  27. rdai-1.0.0/rdai/providers/claude.py +29 -0
  28. rdai-1.0.0/rdai/providers/deepseek.py +27 -0
  29. rdai-1.0.0/rdai/providers/gemini.py +32 -0
  30. rdai-1.0.0/rdai/providers/groq.py +27 -0
  31. rdai-1.0.0/rdai/providers/huggingface.py +32 -0
  32. rdai-1.0.0/rdai/providers/llama.py +29 -0
  33. rdai-1.0.0/rdai/providers/mistral.py +27 -0
  34. rdai-1.0.0/rdai/providers/openai.py +27 -0
  35. rdai-1.0.0/rdai/providers/qwen.py +31 -0
  36. rdai-1.0.0/rdai/providers/vertexai.py +23 -0
  37. rdai-1.0.0/requirements.txt +10 -0
  38. rdai-1.0.0/setup.py +45 -0
  39. rdai-1.0.0/tests/test_failover.py +71 -0
  40. rdai-1.0.0/tests/test_router.py +62 -0
rdai-1.0.0/.gitignore ADDED
@@ -0,0 +1,17 @@
1
+ __pycache__/
2
+ *.py[cod]
3
+ *$py.class
4
+ .pytest_cache/
5
+ .ruff_cache/
6
+ .coverage
7
+ coverage.xml
8
+ htmlcov/
9
+ .venv/
10
+ venv/
11
+ dist/
12
+ build/
13
+ *.egg-info/
14
+
15
+ # Local provider credentials
16
+ .env
17
+
rdai-1.0.0/LICENSE ADDED
@@ -0,0 +1,23 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Ranajit Dhar
4
+ Website: https://ranajitdhar.in
5
+ Email: contact@ranajitdhar.in
6
+
7
+ Permission is hereby granted, free of charge, to any person obtaining a copy
8
+ of this software and associated documentation files (the "Software"), to deal
9
+ in the Software without restriction, including without limitation the rights
10
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
11
+ copies of the Software, and to permit persons to whom the Software is
12
+ furnished to do so, subject to the following conditions:
13
+
14
+ The above copyright notice and this permission notice shall be included in all
15
+ copies or substantial portions of the Software.
16
+
17
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
18
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
20
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
21
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
22
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
23
+ SOFTWARE.
rdai-1.0.0/PKG-INFO ADDED
@@ -0,0 +1,200 @@
1
+ Metadata-Version: 2.4
2
+ Name: rdai
3
+ Version: 1.0.0
4
+ Summary: One interface for resilient, multi-provider AI generation.
5
+ Project-URL: Homepage, https://github.com/ranajitdhar/rdai
6
+ Project-URL: Repository, https://github.com/ranajitdhar/rdai
7
+ Project-URL: Issues, https://github.com/ranajitdhar/rdai/issues
8
+ Author: Ranajit Dhar
9
+ License: MIT
10
+ License-File: LICENSE
11
+ Keywords: ai,cli,failover,gemini,groq,llm,openai
12
+ Classifier: Development Status :: 4 - Beta
13
+ Classifier: Intended Audience :: Developers
14
+ Classifier: License :: OSI Approved :: MIT License
15
+ Classifier: Programming Language :: Python :: 3
16
+ Classifier: Programming Language :: Python :: 3 :: Only
17
+ Classifier: Programming Language :: Python :: 3.10
18
+ Classifier: Programming Language :: Python :: 3.11
19
+ Classifier: Programming Language :: Python :: 3.12
20
+ Classifier: Topic :: Software Development :: Libraries
21
+ Requires-Python: >=3.10
22
+ Requires-Dist: google-genai>=1.0.0
23
+ Requires-Dist: groq>=0.11.0
24
+ Requires-Dist: openai>=1.54.0
25
+ Requires-Dist: python-dotenv>=1.0.1
26
+ Requires-Dist: pyyaml>=6.0.2
27
+ Requires-Dist: questionary>=2.0.1
28
+ Requires-Dist: rich>=13.9.0
29
+ Requires-Dist: typer>=0.12.5
30
+ Provides-Extra: dev
31
+ Requires-Dist: pytest-cov>=5.0.0; extra == 'dev'
32
+ Requires-Dist: pytest>=8.3.0; extra == 'dev'
33
+ Requires-Dist: ruff>=0.8.0; extra == 'dev'
34
+ Description-Content-Type: text/markdown
35
+
36
+ <div align="center">
37
+ <pre>
38
+ ██████╗ ██████╗ █████╗ ██╗
39
+ ██╔══██╗██╔══██╗██╔══██╗██║
40
+ ██████╔╝██║ ██║███████║██║
41
+ ██╔══██╗██║ ██║██╔══██║██║
42
+ ██║ ██║██████╔╝██║ ██║██║
43
+ ╚═╝ ╚═╝╚═════╝ ╚═╝ ╚═╝╚═╝
44
+ </pre>
45
+ </div>
46
+
47
+ # 🚀 rdai (Ranajit Dhar AI) - Multi-Brain AI Orchestrator
48
+
49
+ > **One Interface. Any AI. Unbreakable Auto-Failover.**
50
+
51
+ **Version:** v1.0.0
52
+ **👑 Created by:** Ranajit Dhar
53
+ **🌐 Website:** [https://ranajitdhar.in](https://ranajitdhar.in)
54
+
55
+ `rdai` is a Quantum-Ready, Self-Healing AI Operating System and Python SDK. It allows you to call multiple AI models (Gemini, OpenAI, Claude, DeepSeek, and more) through one single, unified interface. It automatically discovers your API keys, selects the best provider based on your strategy, and features a limitless **Circuit Breaker** that silently auto-failovers to a backup provider when rate limits, crashes, or timeouts occur.
56
+
57
+ Zero downtime. 100% Reliability.
58
+
59
+ ---
60
+
61
+ ## ✨ Key Features
62
+
63
+ * 🧠 **11+ Built-in AI Brains:** Native support for Gemini, OpenAI, Groq, Claude, DeepSeek, Qwen, Llama, Mistral, VertexAI, AWS Bedrock, and HuggingFace.
64
+ * ⚡ **Unbreakable Auto-Failover:** If your primary model crashes or hits a rate limit, the system instantly and silently routes the prompt to the next available model.
65
+ * 🛠️ **Bring-Your-Own-Model (BYOM):** Inject any custom/private AI API into the failover chain without changing the core framework.
66
+ * 🩺 **Live Ping Diagnostics:** The built-in CLI doctor actually pings the AI servers to report real-time ALIVE/ERROR status and latency.
67
+ * 🪄 **Smart Auto-Setup:** Automatically installs missing required SDKs in the background during initialization. Prevents accidental configuration overwrites.
68
+
69
+ ---
70
+
71
+ ## 📦 Installation
72
+
73
+ ```bash
74
+ pip install rdai
75
+ # Or if using local source: pip install -r requirements.txt
76
+ ```
77
+ ---
78
+ ## 🚦 Quick Start (The CLI Wizard)
79
+
80
+ `rdai` comes with a powerful CLI dashboard. To configure your multi-brain environment, simply run:
81
+
82
+ ```bash
83
+ rdai init
84
+ ```
85
+
86
+ This interactive wizard will let you select your AI providers, define your failover strategy, auto-install missing packages, and generate your `.env` and `rdai.yaml` files.
87
+
88
+ Next, add your API keys to the generated `.env` file:Code snippet
89
+
90
+ ```env
91
+ GEMINI_API_KEY=your_key_here
92
+ GROQ_API_KEY=your_key_here
93
+ OPENAI_API_KEY=your_key_here
94
+ # Add others as selected...
95
+ ```
96
+ **(Note: Your API keys are kept strictly local and secure. They are never hardcoded.)**
97
+
98
+ Finally, verify your setup with the live diagnostic tool:
99
+
100
+ ```bash
101
+ rdai doctor
102
+ ```
103
+ The doctor will scan your `.env` file, ping the AI networks, and show you the real-time latency and health of your failover chain.
104
+
105
+ ---
106
+
107
+ ## 💻 Python SDK Usage (Writing Code)
108
+
109
+ Using the SDK is incredibly simple. You don't need to learn 10 different SDKs; rdai standardizes everything.
110
+
111
+ ```python
112
+ from rdai import AI
113
+
114
+ # Initialize the AI Engine. It automatically loads your rdai.yaml strategy.
115
+ ai = AI()
116
+
117
+ # Send a prompt. If the first model fails, it silently falls back to the next!
118
+ response = ai.generate("Write a multi-agent orchestration script in Python.")
119
+ print(response)
120
+ ```
121
+
122
+ # Bring Your Own Model (BYOM)
123
+
124
+ Want to use a custom API? Inject it directly into the engine:
125
+
126
+ ```python
127
+ from rdai.providers.base import BaseProvider
128
+ from rdai import AI
129
+ import requests
130
+
131
+ class CustomNexusProvider(BaseProvider):
132
+ def __init__(self, api_key):
133
+ super().__init__(api_key, "nexus-v1")
134
+
135
+ def generate(self, prompt: str, **kwargs) -> str:
136
+ res = requests.post("[https://api.nexus.com/v1](https://api.nexus.com/v1)", headers={"Key": self.api_key}, json={"text": prompt})
137
+ return res.json()["reply"]
138
+
139
+ # Inject your custom engine into the failover chain!
140
+ ai = AI(providers=[CustomNexusProvider(api_key="your_custom_key")])
141
+ print(ai.generate("Hello Custom Engine!"))
142
+ ```
143
+
144
+ ---
145
+
146
+ ## ⚙️ Routing Strategies & Configuration
147
+
148
+ `rdai` reads your setup from an optional `rdai.yaml` file in the current directory. Environment variables take precedence over values in `.env`
149
+
150
+ ```yaml
151
+ strategy: smart
152
+ provider_order:
153
+ - gemini
154
+ - openai
155
+ - groq
156
+ ```
157
+
158
+ ---
159
+
160
+ ### 🧠 Routing Strategies
161
+
162
+ * **`smart`**: Selects a ready provider whose traits best fit the specific request.
163
+ * **`manual`**: Strictly follows the exact `provider_order` defined in your `rdai.yaml`.
164
+
165
+ > **Note:** Both strategies retain the remaining ready providers as automatic fallbacks for transient rate-limit and timeout failures.
166
+
167
+ ---
168
+
169
+ ## 🎛️ Supported AI Engines & Environment Keys
170
+
171
+ | Provider Engine | Environment Variable | Backend Logic |
172
+ | :--- | :--- | :--- |
173
+ | **Gemini** | `GEMINI_API_KEY` | Modern `google.genai` SDK |
174
+ | **OpenAI** | `OPENAI_API_KEY` | Official `openai` SDK |
175
+ | **Groq** | `GROQ_API_KEY` | Official `groq` SDK |
176
+ | **VertexAI** | `VERTEXAI_API_KEY` | GCP Project ID via `google.genai` |
177
+ | **Claude** | `CLAUDE_API_KEY` | Direct Anthropic REST API |
178
+ | **AWS Bedrock** | `AWS_BEDROCK_API_KEY` | AWS `boto3` SDK |
179
+ | **DeepSeek** | `DEEPSEEK_API_KEY` | Direct DeepSeek REST API |
180
+ | **Qwen** | `QWEN_API_KEY` | Alibaba DashScope REST API |
181
+ | **Llama** | `LLAMA_API_KEY` | Universal OpenAI-Compatible API |
182
+ | **Mistral** | `MISTRAL_API_KEY` | Direct Mistral REST API |
183
+ | **HuggingFace** | `HUGGINGFACE_API_KEY` | HF Serverless Inference API |
184
+
185
+
186
+ ---
187
+
188
+ ## 🛠️ Complete CLI Command Reference
189
+
190
+ * `rdai init` - Setup your workspace, strategies, and AI providers.
191
+ * `rdai doctor` - Run a live `.env` network scan and API health check.
192
+ * `rdai config` - View your active routing strategy and failover chain.
193
+ * `rdai benchmark` - Run a latency test across your active models.
194
+ * `rdai health` - Check overall internal system health and readiness.
195
+ * `rdai about` - Learn about the master orchestration architecture.
196
+
197
+ ---
198
+ <div align="center">
199
+ <i>Built with ❤️ for the next generation of unbreakable AI applications.</i>
200
+ </div>
rdai-1.0.0/README.md ADDED
@@ -0,0 +1,165 @@
1
+ <div align="center">
2
+ <pre>
3
+ ██████╗ ██████╗ █████╗ ██╗
4
+ ██╔══██╗██╔══██╗██╔══██╗██║
5
+ ██████╔╝██║ ██║███████║██║
6
+ ██╔══██╗██║ ██║██╔══██║██║
7
+ ██║ ██║██████╔╝██║ ██║██║
8
+ ╚═╝ ╚═╝╚═════╝ ╚═╝ ╚═╝╚═╝
9
+ </pre>
10
+ </div>
11
+
12
+ # 🚀 rdai (Ranajit Dhar AI) - Multi-Brain AI Orchestrator
13
+
14
+ > **One Interface. Any AI. Unbreakable Auto-Failover.**
15
+
16
+ **Version:** v1.0.0
17
+ **👑 Created by:** Ranajit Dhar
18
+ **🌐 Website:** [https://ranajitdhar.in](https://ranajitdhar.in)
19
+
20
+ `rdai` is a Quantum-Ready, Self-Healing AI Operating System and Python SDK. It allows you to call multiple AI models (Gemini, OpenAI, Claude, DeepSeek, and more) through one single, unified interface. It automatically discovers your API keys, selects the best provider based on your strategy, and features a limitless **Circuit Breaker** that silently auto-failovers to a backup provider when rate limits, crashes, or timeouts occur.
21
+
22
+ Zero downtime. 100% Reliability.
23
+
24
+ ---
25
+
26
+ ## ✨ Key Features
27
+
28
+ * 🧠 **11+ Built-in AI Brains:** Native support for Gemini, OpenAI, Groq, Claude, DeepSeek, Qwen, Llama, Mistral, VertexAI, AWS Bedrock, and HuggingFace.
29
+ * ⚡ **Unbreakable Auto-Failover:** If your primary model crashes or hits a rate limit, the system instantly and silently routes the prompt to the next available model.
30
+ * 🛠️ **Bring-Your-Own-Model (BYOM):** Inject any custom/private AI API into the failover chain without changing the core framework.
31
+ * 🩺 **Live Ping Diagnostics:** The built-in CLI doctor actually pings the AI servers to report real-time ALIVE/ERROR status and latency.
32
+ * 🪄 **Smart Auto-Setup:** Automatically installs missing required SDKs in the background during initialization. Prevents accidental configuration overwrites.
33
+
34
+ ---
35
+
36
+ ## 📦 Installation
37
+
38
+ ```bash
39
+ pip install rdai
40
+ # Or if using local source: pip install -r requirements.txt
41
+ ```
42
+ ---
43
+ ## 🚦 Quick Start (The CLI Wizard)
44
+
45
+ `rdai` comes with a powerful CLI dashboard. To configure your multi-brain environment, simply run:
46
+
47
+ ```bash
48
+ rdai init
49
+ ```
50
+
51
+ This interactive wizard will let you select your AI providers, define your failover strategy, auto-install missing packages, and generate your `.env` and `rdai.yaml` files.
52
+
53
+ Next, add your API keys to the generated `.env` file:Code snippet
54
+
55
+ ```env
56
+ GEMINI_API_KEY=your_key_here
57
+ GROQ_API_KEY=your_key_here
58
+ OPENAI_API_KEY=your_key_here
59
+ # Add others as selected...
60
+ ```
61
+ **(Note: Your API keys are kept strictly local and secure. They are never hardcoded.)**
62
+
63
+ Finally, verify your setup with the live diagnostic tool:
64
+
65
+ ```bash
66
+ rdai doctor
67
+ ```
68
+ The doctor will scan your `.env` file, ping the AI networks, and show you the real-time latency and health of your failover chain.
69
+
70
+ ---
71
+
72
+ ## 💻 Python SDK Usage (Writing Code)
73
+
74
+ Using the SDK is incredibly simple. You don't need to learn 10 different SDKs; rdai standardizes everything.
75
+
76
+ ```python
77
+ from rdai import AI
78
+
79
+ # Initialize the AI Engine. It automatically loads your rdai.yaml strategy.
80
+ ai = AI()
81
+
82
+ # Send a prompt. If the first model fails, it silently falls back to the next!
83
+ response = ai.generate("Write a multi-agent orchestration script in Python.")
84
+ print(response)
85
+ ```
86
+
87
+ # Bring Your Own Model (BYOM)
88
+
89
+ Want to use a custom API? Inject it directly into the engine:
90
+
91
+ ```python
92
+ from rdai.providers.base import BaseProvider
93
+ from rdai import AI
94
+ import requests
95
+
96
+ class CustomNexusProvider(BaseProvider):
97
+ def __init__(self, api_key):
98
+ super().__init__(api_key, "nexus-v1")
99
+
100
+ def generate(self, prompt: str, **kwargs) -> str:
101
+ res = requests.post("[https://api.nexus.com/v1](https://api.nexus.com/v1)", headers={"Key": self.api_key}, json={"text": prompt})
102
+ return res.json()["reply"]
103
+
104
+ # Inject your custom engine into the failover chain!
105
+ ai = AI(providers=[CustomNexusProvider(api_key="your_custom_key")])
106
+ print(ai.generate("Hello Custom Engine!"))
107
+ ```
108
+
109
+ ---
110
+
111
+ ## ⚙️ Routing Strategies & Configuration
112
+
113
+ `rdai` reads your setup from an optional `rdai.yaml` file in the current directory. Environment variables take precedence over values in `.env`
114
+
115
+ ```yaml
116
+ strategy: smart
117
+ provider_order:
118
+ - gemini
119
+ - openai
120
+ - groq
121
+ ```
122
+
123
+ ---
124
+
125
+ ### 🧠 Routing Strategies
126
+
127
+ * **`smart`**: Selects a ready provider whose traits best fit the specific request.
128
+ * **`manual`**: Strictly follows the exact `provider_order` defined in your `rdai.yaml`.
129
+
130
+ > **Note:** Both strategies retain the remaining ready providers as automatic fallbacks for transient rate-limit and timeout failures.
131
+
132
+ ---
133
+
134
+ ## 🎛️ Supported AI Engines & Environment Keys
135
+
136
+ | Provider Engine | Environment Variable | Backend Logic |
137
+ | :--- | :--- | :--- |
138
+ | **Gemini** | `GEMINI_API_KEY` | Modern `google.genai` SDK |
139
+ | **OpenAI** | `OPENAI_API_KEY` | Official `openai` SDK |
140
+ | **Groq** | `GROQ_API_KEY` | Official `groq` SDK |
141
+ | **VertexAI** | `VERTEXAI_API_KEY` | GCP Project ID via `google.genai` |
142
+ | **Claude** | `CLAUDE_API_KEY` | Direct Anthropic REST API |
143
+ | **AWS Bedrock** | `AWS_BEDROCK_API_KEY` | AWS `boto3` SDK |
144
+ | **DeepSeek** | `DEEPSEEK_API_KEY` | Direct DeepSeek REST API |
145
+ | **Qwen** | `QWEN_API_KEY` | Alibaba DashScope REST API |
146
+ | **Llama** | `LLAMA_API_KEY` | Universal OpenAI-Compatible API |
147
+ | **Mistral** | `MISTRAL_API_KEY` | Direct Mistral REST API |
148
+ | **HuggingFace** | `HUGGINGFACE_API_KEY` | HF Serverless Inference API |
149
+
150
+
151
+ ---
152
+
153
+ ## 🛠️ Complete CLI Command Reference
154
+
155
+ * `rdai init` - Setup your workspace, strategies, and AI providers.
156
+ * `rdai doctor` - Run a live `.env` network scan and API health check.
157
+ * `rdai config` - View your active routing strategy and failover chain.
158
+ * `rdai benchmark` - Run a latency test across your active models.
159
+ * `rdai health` - Check overall internal system health and readiness.
160
+ * `rdai about` - Learn about the master orchestration architecture.
161
+
162
+ ---
163
+ <div align="center">
164
+ <i>Built with ❤️ for the next generation of unbreakable AI applications.</i>
165
+ </div>
@@ -0,0 +1,16 @@
1
+ """Minimal rdai SDK example.
2
+
3
+ Run after adding at least one API key to a local .env file.
4
+ """
5
+
6
+ from rdai import AI
7
+
8
+
9
+ def main() -> None:
10
+ ai = AI(strategy="smart")
11
+ print(ai.generate("Explain dependency inversion in two sentences."))
12
+
13
+
14
+ if __name__ == "__main__":
15
+ main()
16
+
@@ -0,0 +1,23 @@
1
+ from rdai.providers.base import BaseProvider
2
+ from rdai import AI
3
+ import requests
4
+
5
+ # User tar nijer private ba notun custom provider banacche
6
+ class NexusCustomProvider(BaseProvider):
7
+ traits = ["reasoning", "proprietary"]
8
+
9
+ def __init__(self, api_key=None, model="nexus-v1-pro"):
10
+ super().__init__(api_key, model)
11
+
12
+ @property
13
+ def is_available(self) -> bool:
14
+ return bool(self.api_key)
15
+
16
+ def generate(self, prompt: str, **kwargs) -> str:
17
+ # Custom API logic here...
18
+ # Example: res = requests.post("https://api.nexus.com/v1", ...)
19
+ return f"[NexusAI] Simulated response for: {prompt}"
20
+
21
+ # Nijer AI instance e inject kore dilo!
22
+ ai = AI(strategy="manual", providers=[NexusCustomProvider(api_key="secret_key")])
23
+ print(ai.generate("How to structure a Next.js app?"))
@@ -0,0 +1,15 @@
1
+ """Route a coding request, while retaining automatic provider failover."""
2
+
3
+ from rdai import AI
4
+
5
+
6
+ def main() -> None:
7
+ ai = AI(strategy="smart")
8
+ answer = ai.generate(
9
+ "Write a typed Python function that retries an asynchronous operation.",
10
+ )
11
+ print(answer)
12
+
13
+
14
+ if __name__ == "__main__":
15
+ main()
@@ -0,0 +1,66 @@
1
+ [build-system]
2
+ requires = ["hatchling>=1.25"]
3
+ build-backend = "hatchling.build"
4
+
5
+ [project]
6
+ name = "rdai"
7
+ version = "1.0.0"
8
+ description = "One interface for resilient, multi-provider AI generation."
9
+ readme = "README.md"
10
+ requires-python = ">=3.10"
11
+ license = { text = "MIT" }
12
+ authors = [
13
+ { name = "Ranajit Dhar" },
14
+ ]
15
+ keywords = ["ai", "llm", "cli", "failover", "gemini", "groq", "openai"]
16
+ classifiers = [
17
+ "Development Status :: 4 - Beta",
18
+ "Intended Audience :: Developers",
19
+ "License :: OSI Approved :: MIT License",
20
+ "Programming Language :: Python :: 3",
21
+ "Programming Language :: Python :: 3 :: Only",
22
+ "Programming Language :: Python :: 3.10",
23
+ "Programming Language :: Python :: 3.11",
24
+ "Programming Language :: Python :: 3.12",
25
+ "Topic :: Software Development :: Libraries",
26
+ ]
27
+ dependencies = [
28
+ "google-genai>=1.0.0",
29
+ "groq>=0.11.0",
30
+ "openai>=1.54.0",
31
+ "python-dotenv>=1.0.1",
32
+ "PyYAML>=6.0.2",
33
+ "questionary>=2.0.1",
34
+ "rich>=13.9.0",
35
+ "typer>=0.12.5",
36
+ ]
37
+
38
+ [project.optional-dependencies]
39
+ dev = [
40
+ "pytest>=8.3.0",
41
+ "pytest-cov>=5.0.0",
42
+ "ruff>=0.8.0",
43
+ ]
44
+
45
+ [project.scripts]
46
+ rdai = "rdai.cli.main:app"
47
+
48
+ [project.urls]
49
+ Homepage = "https://github.com/ranajitdhar/rdai"
50
+ Repository = "https://github.com/ranajitdhar/rdai"
51
+ Issues = "https://github.com/ranajitdhar/rdai/issues"
52
+
53
+ [tool.hatch.build.targets.wheel]
54
+ packages = ["rdai"]
55
+
56
+ [tool.pytest.ini_options]
57
+ testpaths = ["tests"]
58
+ addopts = "-ra"
59
+
60
+ [tool.ruff]
61
+ target-version = "py310"
62
+ line-length = 100
63
+
64
+ [tool.ruff.lint]
65
+ select = ["E", "F", "I", "UP", "B"]
66
+