cost-katana 1.0.3__py3-none-any.whl → 2.0.0__py3-none-any.whl

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.
@@ -1,14 +1,14 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: cost-katana
3
- Version: 1.0.3
4
- Summary: Unified AI interface with cost optimization and failover
3
+ Version: 2.0.0
4
+ Summary: Revolutionary AI SDK with Cortex Meta-Language for 70-95% token reduction
5
5
  Home-page: https://github.com/Hypothesize-Tech/cost-katana-python
6
6
  Author: Cost Katana Team
7
7
  Author-email: abdul@hypothesize.tech
8
8
  Project-URL: Bug Reports, https://github.com/Hypothesize-Tech/cost-katana-python/issues
9
9
  Project-URL: Source, https://github.com/Hypothesize-Tech/cost-katana-python
10
10
  Project-URL: Documentation, https://docs.costkatana.com
11
- Keywords: ai,machine learning,cost optimization,openai,anthropic,aws bedrock,gemini
11
+ Keywords: ai,machine learning,cost optimization,cortex,lisp,token reduction,openai,anthropic,aws bedrock,gemini,claude opus
12
12
  Classifier: Development Status :: 4 - Beta
13
13
  Classifier: Intended Audience :: Developers
14
14
  Classifier: License :: OSI Approved :: MIT License
@@ -45,7 +45,7 @@ Dynamic: summary
45
45
 
46
46
  # Cost Katana Python SDK
47
47
 
48
- A simple, unified interface for AI models with built-in cost optimization, failover, and analytics. Use any AI provider through one consistent API - no need to manage API keys or worry about provider-specific implementations!
48
+ A revolutionary AI SDK with **Cortex Meta-Language** for 70-95% token reduction. Features built-in cost optimization, failover, and analytics. Use any AI provider through one consistent API with breakthrough LISP-based optimization!
49
49
 
50
50
  ## 🚀 Quick Start
51
51
 
@@ -100,13 +100,105 @@ total_cost = sum(msg.get('metadata', {}).get('cost', 0) for msg in chat.history)
100
100
  print(f"Total conversation cost: ${total_cost:.4f}")
101
101
  ```
102
102
 
103
+ ## 🧠 Cortex Meta-Language: Revolutionary AI Optimization
104
+
105
+ Cost Katana's **Cortex** system achieves **70-95% token reduction** through a breakthrough 3-stage pipeline that generates complete answers in optimized LISP format.
106
+
107
+ ### 🚀 Enable Cortex Optimization
108
+
109
+ ```python
110
+ import cost_katana as ck
111
+
112
+ ck.configure(api_key='dak_your_key_here')
113
+
114
+ # Enable Cortex for massive token savings
115
+ model = ck.GenerativeModel('claude-3-sonnet')
116
+ response = model.generate_content(
117
+ "Write a complete Python web scraper with error handling",
118
+ cortex={
119
+ 'enabled': True,
120
+ 'mode': 'answer_generation', # Generate complete answers in LISP
121
+ 'encoding_model': 'claude-3-5-sonnet',
122
+ 'core_model': 'claude-opus-4-1',
123
+ 'decoding_model': 'claude-3-5-sonnet',
124
+ 'dynamic_instructions': True, # AI-powered LISP instruction generation
125
+ 'analytics': True
126
+ }
127
+ )
128
+
129
+ print("Generated Answer:", response.text)
130
+ print(f"Token Reduction: {response.cortex_metadata.token_reduction}%")
131
+ print(f"Cost Savings: ${response.cortex_metadata.cost_savings:.4f}")
132
+ print(f"Confidence Score: {response.cortex_metadata.confidence}%")
133
+ print(f"Semantic Integrity: {response.cortex_metadata.semantic_integrity}%")
134
+ ```
135
+
136
+ ### 🔬 Advanced Cortex Features
137
+
138
+ ```python
139
+ # Bulk optimization with Cortex
140
+ queries = [
141
+ "Explain machine learning algorithms",
142
+ "Write a React authentication component",
143
+ "Create a database migration script"
144
+ ]
145
+
146
+ results = model.bulk_generate_content(
147
+ queries,
148
+ cortex={
149
+ 'enabled': True,
150
+ 'mode': 'answer_generation',
151
+ 'batch_processing': True,
152
+ 'dynamic_instructions': True
153
+ }
154
+ )
155
+
156
+ for i, result in enumerate(results):
157
+ print(f"Query {i+1}: {result.cortex_metadata.token_reduction}% reduction")
158
+
159
+ # Context-aware processing
160
+ technical_response = model.generate_content(
161
+ "Implement a distributed caching system",
162
+ cortex={
163
+ 'enabled': True,
164
+ 'context': 'technical',
165
+ 'complexity': 'high',
166
+ 'include_examples': True,
167
+ 'code_generation': True
168
+ }
169
+ )
170
+ ```
171
+
172
+ ### 📊 Traditional vs Cortex Comparison
173
+
174
+ ```python
175
+ # Compare traditional vs Cortex processing
176
+ comparison = model.compare_cortex(
177
+ query="Write a REST API with authentication in Flask",
178
+ max_tokens=2000
179
+ )
180
+
181
+ print("=== COMPARISON RESULTS ===")
182
+ print(f"Traditional: {comparison['traditional']['tokens_used']} tokens, ${comparison['traditional']['cost']:.4f}")
183
+ print(f"Cortex: {comparison['cortex']['tokens_used']} tokens, ${comparison['cortex']['cost']:.4f}")
184
+ print(f"Savings: {comparison['savings']['token_reduction']}% tokens, ${comparison['savings']['cost_savings']:.4f}")
185
+ print(f"Semantic Integrity: {comparison['quality']['semantic_integrity']}%")
186
+ ```
187
+
103
188
  ## 🎯 Why Cost Katana?
104
189
 
190
+ ### 🧠 Cortex-Powered Intelligence
191
+ - **70-95% Token Reduction**: Revolutionary LISP-based answer generation
192
+ - **3-Stage Optimization Pipeline**: Encoder → Core Processor → Decoder
193
+ - **Dynamic LISP Instructions**: AI-powered instruction generation for any context
194
+ - **Real-time Analytics**: Confidence, cost impact, and semantic integrity metrics
195
+ - **Universal Context Handling**: Technical, business, and industry-specific processing
196
+
105
197
  ### Simple Interface, Powerful Backend
106
198
  - **One API for all providers**: Use Google Gemini, Anthropic Claude, OpenAI GPT, AWS Bedrock models through one interface
107
199
  - **No API key juggling**: Store your provider keys securely in Cost Katana, use one key in your code
108
200
  - **Automatic failover**: If one provider is down, automatically switch to alternatives
109
- - **Cost optimization**: Intelligent routing to minimize costs while maintaining quality
201
+ - **Intelligent routing**: Cortex-powered optimization to minimize costs while maintaining quality
110
202
 
111
203
  ### Enterprise Features
112
204
  - **Cost tracking**: Real-time cost monitoring and budgets
@@ -4,9 +4,9 @@ cost_katana/client.py,sha256=gZX_-VC2gMuOjXO5XP2-YHElAy2K09XdhZW1jebeSLM,15782
4
4
  cost_katana/config.py,sha256=5uxS_8Qqcb1FlINNMdVl1vxJ_n3FK2BHlJGpeJsoXL0,6792
5
5
  cost_katana/exceptions.py,sha256=VNwc9lpShHQkHsgpAB-w-QJLNH6XRhuUzuXmbj9I9I8,963
6
6
  cost_katana/models.py,sha256=zmPSVF8sLhSu1-o47_cq1Up3FkN6mE_Co9kaBJiCcIE,11602
7
- cost_katana-1.0.3.dist-info/licenses/LICENSE,sha256=P7-BNX2xxJZ11R7KpNzczN_H1KJ6R8TisirpIQZWSzw,1067
8
- cost_katana-1.0.3.dist-info/METADATA,sha256=6beNp0UWrYzH5KrrIaqbVnxVzX7Eep4jMYvCwpjdAgI,18817
9
- cost_katana-1.0.3.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
10
- cost_katana-1.0.3.dist-info/entry_points.txt,sha256=vJX-F_Xy4kOoGDZr29uOxB9Iu8ZJDgi4u5NC4_XwFEA,53
11
- cost_katana-1.0.3.dist-info/top_level.txt,sha256=VdbCDM3Xp_40Yu73-xCGWUJRn0pPs6kc0iMU3yd59lo,12
12
- cost_katana-1.0.3.dist-info/RECORD,,
7
+ cost_katana-2.0.0.dist-info/licenses/LICENSE,sha256=P7-BNX2xxJZ11R7KpNzczN_H1KJ6R8TisirpIQZWSzw,1067
8
+ cost_katana-2.0.0.dist-info/METADATA,sha256=a9_CnzZIkwntTf5V0I4kAGpvrtHDr_x17WKwJQV9j9M,22061
9
+ cost_katana-2.0.0.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
10
+ cost_katana-2.0.0.dist-info/entry_points.txt,sha256=vJX-F_Xy4kOoGDZr29uOxB9Iu8ZJDgi4u5NC4_XwFEA,53
11
+ cost_katana-2.0.0.dist-info/top_level.txt,sha256=VdbCDM3Xp_40Yu73-xCGWUJRn0pPs6kc0iMU3yd59lo,12
12
+ cost_katana-2.0.0.dist-info/RECORD,,