codegnipy 0.0.1__tar.gz → 0.0.3__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.
- {codegnipy-0.0.1 → codegnipy-0.0.3}/PKG-INFO +3 -1
- {codegnipy-0.0.1 → codegnipy-0.0.3}/codegnipy/__init__.py +145 -1
- codegnipy-0.0.3/codegnipy/cache.py +931 -0
- {codegnipy-0.0.1 → codegnipy-0.0.3}/codegnipy/cli.py +10 -6
- {codegnipy-0.0.1 → codegnipy-0.0.3}/codegnipy/determinism.py +11 -27
- codegnipy-0.0.3/codegnipy/distributed.py +1059 -0
- codegnipy-0.0.3/codegnipy/observability.py +903 -0
- {codegnipy-0.0.1 → codegnipy-0.0.3}/codegnipy/providers.py +349 -1
- {codegnipy-0.0.1 → codegnipy-0.0.3}/codegnipy/runtime.py +21 -6
- {codegnipy-0.0.1 → codegnipy-0.0.3}/codegnipy/scheduler.py +5 -5
- codegnipy-0.0.3/codegnipy/security.py +1022 -0
- {codegnipy-0.0.1 → codegnipy-0.0.3}/codegnipy/validation.py +4 -2
- {codegnipy-0.0.1 → codegnipy-0.0.3}/codegnipy.egg-info/PKG-INFO +3 -1
- {codegnipy-0.0.1 → codegnipy-0.0.3}/codegnipy.egg-info/SOURCES.txt +10 -0
- {codegnipy-0.0.1 → codegnipy-0.0.3}/codegnipy.egg-info/requires.txt +3 -0
- {codegnipy-0.0.1 → codegnipy-0.0.3}/pyproject.toml +4 -1
- codegnipy-0.0.3/tests/test_cache.py +510 -0
- codegnipy-0.0.3/tests/test_distributed.py +431 -0
- codegnipy-0.0.3/tests/test_observability.py +672 -0
- {codegnipy-0.0.1 → codegnipy-0.0.3}/tests/test_providers.py +205 -0
- codegnipy-0.0.3/tests/test_reflection.py +286 -0
- codegnipy-0.0.3/tests/test_runtime.py +247 -0
- codegnipy-0.0.3/tests/test_security.py +612 -0
- {codegnipy-0.0.1 → codegnipy-0.0.3}/LICENSE +0 -0
- {codegnipy-0.0.1 → codegnipy-0.0.3}/README.md +0 -0
- {codegnipy-0.0.1 → codegnipy-0.0.3}/codegnipy/decorator.py +0 -0
- {codegnipy-0.0.1 → codegnipy-0.0.3}/codegnipy/memory.py +0 -0
- {codegnipy-0.0.1 → codegnipy-0.0.3}/codegnipy/reflection.py +0 -0
- {codegnipy-0.0.1 → codegnipy-0.0.3}/codegnipy/streaming.py +0 -0
- {codegnipy-0.0.1 → codegnipy-0.0.3}/codegnipy/tools.py +0 -0
- {codegnipy-0.0.1 → codegnipy-0.0.3}/codegnipy/transformer.py +0 -0
- {codegnipy-0.0.1 → codegnipy-0.0.3}/codegnipy.egg-info/dependency_links.txt +0 -0
- {codegnipy-0.0.1 → codegnipy-0.0.3}/codegnipy.egg-info/entry_points.txt +0 -0
- {codegnipy-0.0.1 → codegnipy-0.0.3}/codegnipy.egg-info/top_level.txt +0 -0
- {codegnipy-0.0.1 → codegnipy-0.0.3}/setup.cfg +0 -0
- {codegnipy-0.0.1 → codegnipy-0.0.3}/tests/test_determinism.py +0 -0
- {codegnipy-0.0.1 → codegnipy-0.0.3}/tests/test_memory.py +0 -0
- {codegnipy-0.0.1 → codegnipy-0.0.3}/tests/test_scheduler.py +0 -0
- {codegnipy-0.0.1 → codegnipy-0.0.3}/tests/test_streaming.py +0 -0
- {codegnipy-0.0.1 → codegnipy-0.0.3}/tests/test_tools.py +0 -0
- {codegnipy-0.0.1 → codegnipy-0.0.3}/tests/test_transformer.py +0 -0
- {codegnipy-0.0.1 → codegnipy-0.0.3}/tests/test_validation.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: codegnipy
|
|
3
|
-
Version: 0.0.
|
|
3
|
+
Version: 0.0.3
|
|
4
4
|
Summary: AI 原生的 Python 语言扩展 - 让非确定性 AI 成为 Python 一等公民
|
|
5
5
|
Author: Codegnipy Team
|
|
6
6
|
License: MIT
|
|
@@ -27,6 +27,8 @@ Requires-Dist: pytest>=7.0.0; extra == "dev"
|
|
|
27
27
|
Requires-Dist: pytest-asyncio>=0.21.0; extra == "dev"
|
|
28
28
|
Provides-Extra: anthropic
|
|
29
29
|
Requires-Dist: anthropic>=0.18.0; extra == "anthropic"
|
|
30
|
+
Provides-Extra: http
|
|
31
|
+
Requires-Dist: aiohttp>=3.8.0; extra == "http"
|
|
30
32
|
Dynamic: license-file
|
|
31
33
|
|
|
32
34
|
# Codegnipy
|
|
@@ -15,7 +15,7 @@ Codegnipy 让非确定性的 AI 能力成为 Python 的一等公民。
|
|
|
15
15
|
- 混合执行模型:确定性逻辑与模糊意图的无缝协同
|
|
16
16
|
"""
|
|
17
17
|
|
|
18
|
-
__version__ = "0.0.
|
|
18
|
+
__version__ = "0.0.3"
|
|
19
19
|
|
|
20
20
|
from .runtime import cognitive_call, CognitiveContext
|
|
21
21
|
from .decorator import cognitive
|
|
@@ -88,6 +88,8 @@ from .providers import (
|
|
|
88
88
|
AnthropicProvider,
|
|
89
89
|
OllamaProvider,
|
|
90
90
|
TransformersProvider,
|
|
91
|
+
LlamaCppProvider,
|
|
92
|
+
QuantizationConfig,
|
|
91
93
|
ProviderFactory,
|
|
92
94
|
create_provider
|
|
93
95
|
)
|
|
@@ -104,6 +106,78 @@ from .validation import (
|
|
|
104
106
|
verify_claim,
|
|
105
107
|
verify_claim_async
|
|
106
108
|
)
|
|
109
|
+
from .observability import (
|
|
110
|
+
LogLevel,
|
|
111
|
+
MetricType,
|
|
112
|
+
SpanContext,
|
|
113
|
+
Metric,
|
|
114
|
+
CognitiveLogger,
|
|
115
|
+
MetricsCollector,
|
|
116
|
+
Tracer,
|
|
117
|
+
OpenTelemetryExporter,
|
|
118
|
+
ObservabilityManager,
|
|
119
|
+
traced,
|
|
120
|
+
logged,
|
|
121
|
+
metered,
|
|
122
|
+
get_default_manager,
|
|
123
|
+
configure_observability,
|
|
124
|
+
)
|
|
125
|
+
from .distributed import (
|
|
126
|
+
QueueBackendType,
|
|
127
|
+
TaskPriority,
|
|
128
|
+
TaskState,
|
|
129
|
+
LoadBalanceStrategy,
|
|
130
|
+
DistributedTask,
|
|
131
|
+
WorkerInfo,
|
|
132
|
+
QueueBackend,
|
|
133
|
+
InMemoryQueueBackend,
|
|
134
|
+
RedisQueueBackend,
|
|
135
|
+
RabbitMQQueueBackend,
|
|
136
|
+
LoadBalancer,
|
|
137
|
+
DistributedScheduler,
|
|
138
|
+
create_queue_backend,
|
|
139
|
+
submit_distributed_task,
|
|
140
|
+
)
|
|
141
|
+
from .cache import (
|
|
142
|
+
CacheBackendType,
|
|
143
|
+
CachePolicy,
|
|
144
|
+
CacheEntry,
|
|
145
|
+
CacheStats,
|
|
146
|
+
CacheBackend,
|
|
147
|
+
LRUCacheBackend,
|
|
148
|
+
RedisCacheBackend,
|
|
149
|
+
ResponseCache,
|
|
150
|
+
EmbeddingCache,
|
|
151
|
+
SemanticCache,
|
|
152
|
+
CacheInvalidator,
|
|
153
|
+
CostOptimizer,
|
|
154
|
+
cached,
|
|
155
|
+
create_cache_backend,
|
|
156
|
+
create_response_cache,
|
|
157
|
+
)
|
|
158
|
+
from .security import (
|
|
159
|
+
PIIType,
|
|
160
|
+
FilterAction,
|
|
161
|
+
AuditEventType,
|
|
162
|
+
SeverityLevel,
|
|
163
|
+
PIIMatch,
|
|
164
|
+
FilterResult,
|
|
165
|
+
AuditEvent,
|
|
166
|
+
PIIPatterns,
|
|
167
|
+
PIIDetector,
|
|
168
|
+
DataMasker,
|
|
169
|
+
ContentFilter,
|
|
170
|
+
PIIFilter,
|
|
171
|
+
KeywordFilter,
|
|
172
|
+
CompositeFilter,
|
|
173
|
+
AuditLogger,
|
|
174
|
+
RateLimiter,
|
|
175
|
+
SecurityManager,
|
|
176
|
+
secure,
|
|
177
|
+
create_default_security_manager,
|
|
178
|
+
detect_pii,
|
|
179
|
+
mask_pii,
|
|
180
|
+
)
|
|
107
181
|
|
|
108
182
|
__all__ = [
|
|
109
183
|
# Core
|
|
@@ -173,6 +247,8 @@ __all__ = [
|
|
|
173
247
|
"AnthropicProvider",
|
|
174
248
|
"OllamaProvider",
|
|
175
249
|
"TransformersProvider",
|
|
250
|
+
"LlamaCppProvider",
|
|
251
|
+
"QuantizationConfig",
|
|
176
252
|
"ProviderFactory",
|
|
177
253
|
"create_provider",
|
|
178
254
|
# Validation
|
|
@@ -187,4 +263,72 @@ __all__ = [
|
|
|
187
263
|
"create_default_validator",
|
|
188
264
|
"verify_claim",
|
|
189
265
|
"verify_claim_async",
|
|
266
|
+
# Observability
|
|
267
|
+
"LogLevel",
|
|
268
|
+
"MetricType",
|
|
269
|
+
"SpanContext",
|
|
270
|
+
"Metric",
|
|
271
|
+
"CognitiveLogger",
|
|
272
|
+
"MetricsCollector",
|
|
273
|
+
"Tracer",
|
|
274
|
+
"OpenTelemetryExporter",
|
|
275
|
+
"ObservabilityManager",
|
|
276
|
+
"traced",
|
|
277
|
+
"logged",
|
|
278
|
+
"metered",
|
|
279
|
+
"get_default_manager",
|
|
280
|
+
"configure_observability",
|
|
281
|
+
# Distributed (Phase 7)
|
|
282
|
+
"QueueBackendType",
|
|
283
|
+
"TaskPriority",
|
|
284
|
+
"TaskState",
|
|
285
|
+
"LoadBalanceStrategy",
|
|
286
|
+
"DistributedTask",
|
|
287
|
+
"WorkerInfo",
|
|
288
|
+
"QueueBackend",
|
|
289
|
+
"InMemoryQueueBackend",
|
|
290
|
+
"RedisQueueBackend",
|
|
291
|
+
"RabbitMQQueueBackend",
|
|
292
|
+
"LoadBalancer",
|
|
293
|
+
"DistributedScheduler",
|
|
294
|
+
"create_queue_backend",
|
|
295
|
+
"submit_distributed_task",
|
|
296
|
+
# Cache (Phase 7)
|
|
297
|
+
"CacheBackendType",
|
|
298
|
+
"CachePolicy",
|
|
299
|
+
"CacheEntry",
|
|
300
|
+
"CacheStats",
|
|
301
|
+
"CacheBackend",
|
|
302
|
+
"LRUCacheBackend",
|
|
303
|
+
"RedisCacheBackend",
|
|
304
|
+
"ResponseCache",
|
|
305
|
+
"EmbeddingCache",
|
|
306
|
+
"SemanticCache",
|
|
307
|
+
"CacheInvalidator",
|
|
308
|
+
"CostOptimizer",
|
|
309
|
+
"cached",
|
|
310
|
+
"create_cache_backend",
|
|
311
|
+
"create_response_cache",
|
|
312
|
+
# Security (Phase 7)
|
|
313
|
+
"PIIType",
|
|
314
|
+
"FilterAction",
|
|
315
|
+
"AuditEventType",
|
|
316
|
+
"SeverityLevel",
|
|
317
|
+
"PIIMatch",
|
|
318
|
+
"FilterResult",
|
|
319
|
+
"AuditEvent",
|
|
320
|
+
"PIIPatterns",
|
|
321
|
+
"PIIDetector",
|
|
322
|
+
"DataMasker",
|
|
323
|
+
"ContentFilter",
|
|
324
|
+
"PIIFilter",
|
|
325
|
+
"KeywordFilter",
|
|
326
|
+
"CompositeFilter",
|
|
327
|
+
"AuditLogger",
|
|
328
|
+
"RateLimiter",
|
|
329
|
+
"SecurityManager",
|
|
330
|
+
"secure",
|
|
331
|
+
"create_default_security_manager",
|
|
332
|
+
"detect_pii",
|
|
333
|
+
"mask_pii",
|
|
190
334
|
]
|