cost-katana 1.0.1__tar.gz → 1.0.2__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.
- {cost_katana-1.0.1/cost_katana.egg-info → cost_katana-1.0.2}/PKG-INFO +5 -4
- {cost_katana-1.0.1 → cost_katana-1.0.2}/README.md +4 -3
- {cost_katana-1.0.1 → cost_katana-1.0.2}/cost_katana/__init__.py +16 -14
- cost_katana-1.0.2/cost_katana/cli.py +765 -0
- cost_katana-1.0.2/cost_katana/client.py +458 -0
- cost_katana-1.0.2/cost_katana/config.py +178 -0
- {cost_katana-1.0.1 → cost_katana-1.0.2}/cost_katana/exceptions.py +19 -1
- {cost_katana-1.0.1 → cost_katana-1.0.2}/cost_katana/models.py +110 -111
- {cost_katana-1.0.1 → cost_katana-1.0.2/cost_katana.egg-info}/PKG-INFO +5 -4
- {cost_katana-1.0.1 → cost_katana-1.0.2}/cost_katana.egg-info/SOURCES.txt +2 -0
- cost_katana-1.0.2/examples/advanced_features_demo.py +530 -0
- {cost_katana-1.0.1 → cost_katana-1.0.2}/examples/basic_usage.py +30 -22
- {cost_katana-1.0.1 → cost_katana-1.0.2}/examples/chat_session.py +28 -24
- cost_katana-1.0.2/examples/comprehensive_demo.py +578 -0
- {cost_katana-1.0.1 → cost_katana-1.0.2}/examples/config_example.py +72 -56
- {cost_katana-1.0.1 → cost_katana-1.0.2}/examples/full_integration_demo.py +113 -106
- {cost_katana-1.0.1 → cost_katana-1.0.2}/examples/old_vs_new.py +30 -22
- {cost_katana-1.0.1 → cost_katana-1.0.2}/examples/provider_comparison.py +128 -109
- {cost_katana-1.0.1 → cost_katana-1.0.2}/setup.py +1 -1
- cost_katana-1.0.1/cost_katana/cli.py +0 -303
- cost_katana-1.0.1/cost_katana/client.py +0 -235
- cost_katana-1.0.1/cost_katana/config.py +0 -181
- {cost_katana-1.0.1 → cost_katana-1.0.2}/LICENSE +0 -0
- {cost_katana-1.0.1 → cost_katana-1.0.2}/MANIFEST.in +0 -0
- {cost_katana-1.0.1 → cost_katana-1.0.2}/cost_katana.egg-info/dependency_links.txt +0 -0
- {cost_katana-1.0.1 → cost_katana-1.0.2}/cost_katana.egg-info/entry_points.txt +0 -0
- {cost_katana-1.0.1 → cost_katana-1.0.2}/cost_katana.egg-info/requires.txt +0 -0
- {cost_katana-1.0.1 → cost_katana-1.0.2}/cost_katana.egg-info/top_level.txt +0 -0
- {cost_katana-1.0.1 → cost_katana-1.0.2}/examples/config.json +0 -0
- {cost_katana-1.0.1 → cost_katana-1.0.2}/requirements-dev.txt +0 -0
- {cost_katana-1.0.1 → cost_katana-1.0.2}/requirements.txt +0 -0
- {cost_katana-1.0.1 → cost_katana-1.0.2}/setup.cfg +0 -0
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.4
|
2
2
|
Name: cost-katana
|
3
|
-
Version: 1.0.
|
3
|
+
Version: 1.0.2
|
4
4
|
Summary: Unified AI interface with cost optimization and failover
|
5
5
|
Home-page: https://github.com/Hypothesize-Tech/cost-katana-python
|
6
6
|
Author: Cost Katana Team
|
@@ -159,7 +159,7 @@ model = ck.GenerativeModel('gemini') # Uses mapping from config
|
|
159
159
|
### Environment Variables
|
160
160
|
|
161
161
|
```bash
|
162
|
-
export
|
162
|
+
export API_KEY=dak_your_key_here
|
163
163
|
export COST_KATANA_DEFAULT_MODEL=claude-3-sonnet
|
164
164
|
```
|
165
165
|
|
@@ -412,9 +412,10 @@ class GenerateContentResponse:
|
|
412
412
|
## 🤝 Support
|
413
413
|
|
414
414
|
- **Documentation**: [docs.costkatana.com](https://docs.costkatana.com)
|
415
|
-
- **Discord Community**: [discord.gg/costkatana](https://discord.gg/
|
416
|
-
- **Email Support**:
|
415
|
+
- **Discord Community**: [discord.gg/costkatana](https://discord.gg/Wcwzw8wM)
|
416
|
+
- **Email Support**: abdul@hypothesize.tech
|
417
417
|
- **GitHub Issues**: [github.com/cost-katana/python-sdk](https://github.com/cost-katana/python-sdk)
|
418
|
+
- **GitHub Repository**: [github.com/Hypothesize-Tech/cost-katana-python](https://github.com/Hypothesize-Tech/cost-katana-python)
|
418
419
|
|
419
420
|
## 📄 License
|
420
421
|
|
@@ -114,7 +114,7 @@ model = ck.GenerativeModel('gemini') # Uses mapping from config
|
|
114
114
|
### Environment Variables
|
115
115
|
|
116
116
|
```bash
|
117
|
-
export
|
117
|
+
export API_KEY=dak_your_key_here
|
118
118
|
export COST_KATANA_DEFAULT_MODEL=claude-3-sonnet
|
119
119
|
```
|
120
120
|
|
@@ -367,9 +367,10 @@ class GenerateContentResponse:
|
|
367
367
|
## 🤝 Support
|
368
368
|
|
369
369
|
- **Documentation**: [docs.costkatana.com](https://docs.costkatana.com)
|
370
|
-
- **Discord Community**: [discord.gg/costkatana](https://discord.gg/
|
371
|
-
- **Email Support**:
|
370
|
+
- **Discord Community**: [discord.gg/costkatana](https://discord.gg/Wcwzw8wM)
|
371
|
+
- **Email Support**: abdul@hypothesize.tech
|
372
372
|
- **GitHub Issues**: [github.com/cost-katana/python-sdk](https://github.com/cost-katana/python-sdk)
|
373
|
+
- **GitHub Repository**: [github.com/Hypothesize-Tech/cost-katana-python](https://github.com/Hypothesize-Tech/cost-katana-python)
|
373
374
|
|
374
375
|
## 📄 License
|
375
376
|
|
@@ -9,10 +9,10 @@ Simple interface for AI models that routes through Cost Katana for:
|
|
9
9
|
|
10
10
|
Example:
|
11
11
|
import cost_katana as ck
|
12
|
-
|
12
|
+
|
13
13
|
# Configure once
|
14
14
|
ck.configure(config_file='config.json')
|
15
|
-
|
15
|
+
|
16
16
|
# Use like any AI library
|
17
17
|
model = ck.GenerativeModel('gemini-2.0-flash')
|
18
18
|
chat = model.start_chat()
|
@@ -21,49 +21,51 @@ Example:
|
|
21
21
|
"""
|
22
22
|
|
23
23
|
from .client import CostKatanaClient, get_global_client
|
24
|
-
from .models import
|
24
|
+
from .models import ChatSession
|
25
25
|
from .exceptions import (
|
26
26
|
CostKatanaError,
|
27
27
|
AuthenticationError,
|
28
28
|
ModelNotAvailableError,
|
29
29
|
RateLimitError,
|
30
|
-
CostLimitExceededError
|
30
|
+
CostLimitExceededError,
|
31
31
|
)
|
32
32
|
from .config import Config
|
33
33
|
|
34
|
-
__version__ = "1.0.
|
34
|
+
__version__ = "1.0.2"
|
35
35
|
__all__ = [
|
36
36
|
"configure",
|
37
|
-
"
|
37
|
+
"create_generative_model",
|
38
38
|
"ChatSession",
|
39
39
|
"CostKatanaClient",
|
40
40
|
"CostKatanaError",
|
41
|
-
"AuthenticationError",
|
41
|
+
"AuthenticationError",
|
42
42
|
"ModelNotAvailableError",
|
43
43
|
"RateLimitError",
|
44
44
|
"CostLimitExceededError",
|
45
|
-
"Config"
|
45
|
+
"Config",
|
46
46
|
]
|
47
47
|
|
48
48
|
# Import configure function from client
|
49
49
|
from .client import configure
|
50
50
|
|
51
|
-
|
51
|
+
|
52
|
+
def create_generative_model(model_name: str, **kwargs):
|
52
53
|
"""
|
53
54
|
Create a generative model instance.
|
54
|
-
|
55
|
+
|
55
56
|
Args:
|
56
57
|
model_name: Name of the model (e.g., 'gemini-2.0-flash', 'claude-3-sonnet', 'gpt-4')
|
57
58
|
**kwargs: Additional model configuration
|
58
|
-
|
59
|
+
|
59
60
|
Returns:
|
60
61
|
GenerativeModel instance
|
61
|
-
|
62
|
+
|
62
63
|
Example:
|
63
64
|
model = cost_katana.GenerativeModel('gemini-2.0-flash')
|
64
65
|
response = model.generate_content("Hello, world!")
|
65
66
|
"""
|
66
67
|
client = get_global_client()
|
67
|
-
|
68
|
+
|
68
69
|
from .models import GenerativeModel as GM
|
69
|
-
|
70
|
+
|
71
|
+
return GM(client, model_name, **kwargs)
|