prompture 0.0.35__py3-none-any.whl → 0.0.40.dev1__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.
- prompture/__init__.py +132 -3
- prompture/_version.py +2 -2
- prompture/agent.py +924 -0
- prompture/agent_types.py +156 -0
- prompture/async_agent.py +880 -0
- prompture/async_conversation.py +208 -17
- prompture/async_core.py +16 -0
- prompture/async_driver.py +63 -0
- prompture/async_groups.py +551 -0
- prompture/conversation.py +222 -18
- prompture/core.py +46 -12
- prompture/cost_mixin.py +37 -0
- prompture/discovery.py +132 -44
- prompture/driver.py +77 -0
- prompture/drivers/__init__.py +5 -1
- prompture/drivers/async_azure_driver.py +11 -5
- prompture/drivers/async_claude_driver.py +184 -9
- prompture/drivers/async_google_driver.py +222 -28
- prompture/drivers/async_grok_driver.py +11 -5
- prompture/drivers/async_groq_driver.py +11 -5
- prompture/drivers/async_lmstudio_driver.py +74 -5
- prompture/drivers/async_ollama_driver.py +13 -3
- prompture/drivers/async_openai_driver.py +162 -5
- prompture/drivers/async_openrouter_driver.py +11 -5
- prompture/drivers/async_registry.py +5 -1
- prompture/drivers/azure_driver.py +10 -4
- prompture/drivers/claude_driver.py +17 -1
- prompture/drivers/google_driver.py +227 -33
- prompture/drivers/grok_driver.py +11 -5
- prompture/drivers/groq_driver.py +11 -5
- prompture/drivers/lmstudio_driver.py +73 -8
- prompture/drivers/ollama_driver.py +16 -5
- prompture/drivers/openai_driver.py +26 -11
- prompture/drivers/openrouter_driver.py +11 -5
- prompture/drivers/vision_helpers.py +153 -0
- prompture/group_types.py +147 -0
- prompture/groups.py +530 -0
- prompture/image.py +180 -0
- prompture/ledger.py +252 -0
- prompture/model_rates.py +112 -2
- prompture/persistence.py +254 -0
- prompture/persona.py +482 -0
- prompture/serialization.py +218 -0
- prompture/settings.py +1 -0
- prompture-0.0.40.dev1.dist-info/METADATA +369 -0
- prompture-0.0.40.dev1.dist-info/RECORD +78 -0
- prompture-0.0.35.dist-info/METADATA +0 -464
- prompture-0.0.35.dist-info/RECORD +0 -66
- {prompture-0.0.35.dist-info → prompture-0.0.40.dev1.dist-info}/WHEEL +0 -0
- {prompture-0.0.35.dist-info → prompture-0.0.40.dev1.dist-info}/entry_points.txt +0 -0
- {prompture-0.0.35.dist-info → prompture-0.0.40.dev1.dist-info}/licenses/LICENSE +0 -0
- {prompture-0.0.35.dist-info → prompture-0.0.40.dev1.dist-info}/top_level.txt +0 -0
prompture/__init__.py
CHANGED
|
@@ -2,8 +2,28 @@
|
|
|
2
2
|
|
|
3
3
|
from dotenv import load_dotenv
|
|
4
4
|
|
|
5
|
+
from .agent import Agent, AgentIterator, StreamedAgentResult
|
|
6
|
+
from .agent_types import (
|
|
7
|
+
AgentCallbacks,
|
|
8
|
+
AgentResult,
|
|
9
|
+
AgentState,
|
|
10
|
+
AgentStep,
|
|
11
|
+
GuardrailError,
|
|
12
|
+
ModelRetry,
|
|
13
|
+
RunContext,
|
|
14
|
+
StepType,
|
|
15
|
+
StreamEvent,
|
|
16
|
+
StreamEventType,
|
|
17
|
+
)
|
|
18
|
+
from .async_agent import AsyncAgent, AsyncAgentIterator, AsyncStreamedAgentResult
|
|
5
19
|
from .async_conversation import AsyncConversation
|
|
6
20
|
from .async_driver import AsyncDriver
|
|
21
|
+
from .async_groups import (
|
|
22
|
+
AsyncLoopGroup,
|
|
23
|
+
AsyncRouterAgent,
|
|
24
|
+
AsyncSequentialGroup,
|
|
25
|
+
ParallelGroup,
|
|
26
|
+
)
|
|
7
27
|
from .cache import (
|
|
8
28
|
CacheBackend,
|
|
9
29
|
MemoryCacheBackend,
|
|
@@ -68,9 +88,61 @@ from .field_definitions import (
|
|
|
68
88
|
reset_registry,
|
|
69
89
|
validate_enum_value,
|
|
70
90
|
)
|
|
91
|
+
from .group_types import (
|
|
92
|
+
AgentError,
|
|
93
|
+
ErrorPolicy,
|
|
94
|
+
GroupCallbacks,
|
|
95
|
+
GroupResult,
|
|
96
|
+
GroupStep,
|
|
97
|
+
)
|
|
98
|
+
from .groups import (
|
|
99
|
+
GroupAsAgent,
|
|
100
|
+
LoopGroup,
|
|
101
|
+
RouterAgent,
|
|
102
|
+
SequentialGroup,
|
|
103
|
+
)
|
|
104
|
+
from .image import (
|
|
105
|
+
ImageContent,
|
|
106
|
+
ImageInput,
|
|
107
|
+
image_from_base64,
|
|
108
|
+
image_from_bytes,
|
|
109
|
+
image_from_file,
|
|
110
|
+
image_from_url,
|
|
111
|
+
make_image,
|
|
112
|
+
)
|
|
113
|
+
from .ledger import ModelUsageLedger, get_recently_used_models
|
|
71
114
|
from .logging import JSONFormatter, configure_logging
|
|
72
|
-
from .model_rates import
|
|
115
|
+
from .model_rates import (
|
|
116
|
+
ModelCapabilities,
|
|
117
|
+
get_model_capabilities,
|
|
118
|
+
get_model_info,
|
|
119
|
+
get_model_rates,
|
|
120
|
+
refresh_rates_cache,
|
|
121
|
+
)
|
|
122
|
+
from .persistence import ConversationStore
|
|
123
|
+
from .persona import (
|
|
124
|
+
PERSONAS,
|
|
125
|
+
Persona,
|
|
126
|
+
clear_persona_registry,
|
|
127
|
+
get_persona,
|
|
128
|
+
get_persona_names,
|
|
129
|
+
get_persona_registry_snapshot,
|
|
130
|
+
get_trait,
|
|
131
|
+
get_trait_names,
|
|
132
|
+
load_personas_from_directory,
|
|
133
|
+
register_persona,
|
|
134
|
+
register_trait,
|
|
135
|
+
reset_persona_registry,
|
|
136
|
+
reset_trait_registry,
|
|
137
|
+
)
|
|
73
138
|
from .runner import run_suite_from_spec
|
|
139
|
+
from .serialization import (
|
|
140
|
+
EXPORT_VERSION,
|
|
141
|
+
export_conversation,
|
|
142
|
+
export_usage_session,
|
|
143
|
+
import_conversation,
|
|
144
|
+
import_usage_session,
|
|
145
|
+
)
|
|
74
146
|
from .session import UsageSession
|
|
75
147
|
from .settings import settings as _settings
|
|
76
148
|
from .tools import clean_json_text, clean_toon_text
|
|
@@ -106,29 +178,66 @@ except Exception:
|
|
|
106
178
|
__version__ = "0.0.0"
|
|
107
179
|
|
|
108
180
|
__all__ = [
|
|
181
|
+
"EXPORT_VERSION",
|
|
109
182
|
"FIELD_DEFINITIONS",
|
|
183
|
+
"PERSONAS",
|
|
184
|
+
"Agent",
|
|
185
|
+
"AgentCallbacks",
|
|
186
|
+
"AgentError",
|
|
187
|
+
"AgentIterator",
|
|
188
|
+
"AgentResult",
|
|
189
|
+
"AgentState",
|
|
190
|
+
"AgentStep",
|
|
110
191
|
"AirLLMDriver",
|
|
192
|
+
"AsyncAgent",
|
|
193
|
+
"AsyncAgentIterator",
|
|
111
194
|
"AsyncConversation",
|
|
112
195
|
"AsyncDriver",
|
|
196
|
+
"AsyncLoopGroup",
|
|
197
|
+
"AsyncRouterAgent",
|
|
198
|
+
"AsyncSequentialGroup",
|
|
199
|
+
"AsyncStreamedAgentResult",
|
|
113
200
|
"AzureDriver",
|
|
114
201
|
"CacheBackend",
|
|
115
202
|
"ClaudeDriver",
|
|
116
203
|
"Conversation",
|
|
204
|
+
"ConversationStore",
|
|
117
205
|
"Driver",
|
|
118
206
|
"DriverCallbacks",
|
|
207
|
+
"ErrorPolicy",
|
|
119
208
|
"GoogleDriver",
|
|
120
209
|
"GrokDriver",
|
|
121
210
|
"GroqDriver",
|
|
211
|
+
"GroupAsAgent",
|
|
212
|
+
"GroupCallbacks",
|
|
213
|
+
"GroupResult",
|
|
214
|
+
"GroupStep",
|
|
215
|
+
"GuardrailError",
|
|
216
|
+
"ImageContent",
|
|
217
|
+
"ImageInput",
|
|
122
218
|
"JSONFormatter",
|
|
123
219
|
"LMStudioDriver",
|
|
124
220
|
"LocalHTTPDriver",
|
|
221
|
+
"LoopGroup",
|
|
125
222
|
"MemoryCacheBackend",
|
|
223
|
+
"ModelCapabilities",
|
|
224
|
+
"ModelRetry",
|
|
225
|
+
"ModelUsageLedger",
|
|
126
226
|
"OllamaDriver",
|
|
127
227
|
"OpenAIDriver",
|
|
128
228
|
"OpenRouterDriver",
|
|
229
|
+
"ParallelGroup",
|
|
230
|
+
"Persona",
|
|
129
231
|
"RedisCacheBackend",
|
|
130
232
|
"ResponseCache",
|
|
233
|
+
"RouterAgent",
|
|
234
|
+
"RunContext",
|
|
131
235
|
"SQLiteCacheBackend",
|
|
236
|
+
"SequentialGroup",
|
|
237
|
+
"StepType",
|
|
238
|
+
"StreamEvent",
|
|
239
|
+
"StreamEventType",
|
|
240
|
+
"StreamedAgentResult",
|
|
132
241
|
"ToolDefinition",
|
|
133
242
|
"ToolRegistry",
|
|
134
243
|
"UsageSession",
|
|
@@ -138,9 +247,12 @@ __all__ = [
|
|
|
138
247
|
"clean_json_text",
|
|
139
248
|
"clean_json_text_with_ai",
|
|
140
249
|
"clean_toon_text",
|
|
250
|
+
"clear_persona_registry",
|
|
141
251
|
"clear_registry",
|
|
142
252
|
"configure_cache",
|
|
143
253
|
"configure_logging",
|
|
254
|
+
"export_conversation",
|
|
255
|
+
"export_usage_session",
|
|
144
256
|
"extract_and_jsonify",
|
|
145
257
|
"extract_from_data",
|
|
146
258
|
"extract_from_pandas",
|
|
@@ -152,25 +264,42 @@ __all__ = [
|
|
|
152
264
|
"get_driver_for_model",
|
|
153
265
|
"get_field_definition",
|
|
154
266
|
"get_field_names",
|
|
267
|
+
"get_model_capabilities",
|
|
155
268
|
"get_model_info",
|
|
156
269
|
"get_model_rates",
|
|
270
|
+
"get_persona",
|
|
271
|
+
"get_persona_names",
|
|
272
|
+
"get_persona_registry_snapshot",
|
|
273
|
+
"get_recently_used_models",
|
|
157
274
|
"get_registry_snapshot",
|
|
158
275
|
"get_required_fields",
|
|
159
|
-
|
|
276
|
+
"get_trait",
|
|
277
|
+
"get_trait_names",
|
|
278
|
+
"image_from_base64",
|
|
279
|
+
"image_from_bytes",
|
|
280
|
+
"image_from_file",
|
|
281
|
+
"image_from_url",
|
|
282
|
+
"import_conversation",
|
|
283
|
+
"import_usage_session",
|
|
160
284
|
"is_async_driver_registered",
|
|
161
285
|
"is_driver_registered",
|
|
162
286
|
"list_registered_async_drivers",
|
|
163
287
|
"list_registered_drivers",
|
|
164
288
|
"load_entry_point_drivers",
|
|
165
|
-
|
|
289
|
+
"load_personas_from_directory",
|
|
290
|
+
"make_image",
|
|
166
291
|
"manual_extract_and_jsonify",
|
|
167
292
|
"normalize_enum_value",
|
|
168
293
|
"refresh_rates_cache",
|
|
169
294
|
"register_async_driver",
|
|
170
295
|
"register_driver",
|
|
171
296
|
"register_field",
|
|
297
|
+
"register_persona",
|
|
298
|
+
"register_trait",
|
|
172
299
|
"render_output",
|
|
300
|
+
"reset_persona_registry",
|
|
173
301
|
"reset_registry",
|
|
302
|
+
"reset_trait_registry",
|
|
174
303
|
"run_suite_from_spec",
|
|
175
304
|
"stepwise_extract_with_model",
|
|
176
305
|
"tool_from_function",
|
prompture/_version.py
CHANGED
|
@@ -28,7 +28,7 @@ version_tuple: VERSION_TUPLE
|
|
|
28
28
|
commit_id: COMMIT_ID
|
|
29
29
|
__commit_id__: COMMIT_ID
|
|
30
30
|
|
|
31
|
-
__version__ = version = '0.0.
|
|
32
|
-
__version_tuple__ = version_tuple = (0, 0,
|
|
31
|
+
__version__ = version = '0.0.40.dev1'
|
|
32
|
+
__version_tuple__ = version_tuple = (0, 0, 40, 'dev1')
|
|
33
33
|
|
|
34
34
|
__commit_id__ = commit_id = None
|