prompture 0.0.36__py3-none-any.whl → 0.0.37__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 +120 -2
- 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 +199 -17
- prompture/async_driver.py +24 -0
- prompture/async_groups.py +551 -0
- prompture/conversation.py +213 -18
- prompture/core.py +30 -12
- prompture/discovery.py +24 -1
- prompture/driver.py +38 -0
- prompture/drivers/__init__.py +5 -1
- prompture/drivers/async_azure_driver.py +7 -1
- prompture/drivers/async_claude_driver.py +7 -1
- prompture/drivers/async_google_driver.py +24 -4
- prompture/drivers/async_grok_driver.py +7 -1
- prompture/drivers/async_groq_driver.py +7 -1
- prompture/drivers/async_lmstudio_driver.py +59 -3
- prompture/drivers/async_ollama_driver.py +7 -0
- prompture/drivers/async_openai_driver.py +7 -1
- prompture/drivers/async_openrouter_driver.py +7 -1
- prompture/drivers/async_registry.py +5 -1
- prompture/drivers/azure_driver.py +7 -1
- prompture/drivers/claude_driver.py +7 -1
- prompture/drivers/google_driver.py +24 -4
- prompture/drivers/grok_driver.py +7 -1
- prompture/drivers/groq_driver.py +7 -1
- prompture/drivers/lmstudio_driver.py +58 -6
- prompture/drivers/ollama_driver.py +7 -0
- prompture/drivers/openai_driver.py +7 -1
- prompture/drivers/openrouter_driver.py +7 -1
- prompture/drivers/vision_helpers.py +153 -0
- prompture/group_types.py +147 -0
- prompture/groups.py +530 -0
- prompture/image.py +180 -0
- prompture/persistence.py +254 -0
- prompture/persona.py +482 -0
- prompture/serialization.py +218 -0
- prompture/settings.py +1 -0
- {prompture-0.0.36.dist-info → prompture-0.0.37.dist-info}/METADATA +1 -1
- prompture-0.0.37.dist-info/RECORD +77 -0
- prompture-0.0.36.dist-info/RECORD +0 -66
- {prompture-0.0.36.dist-info → prompture-0.0.37.dist-info}/WHEEL +0 -0
- {prompture-0.0.36.dist-info → prompture-0.0.37.dist-info}/entry_points.txt +0 -0
- {prompture-0.0.36.dist-info → prompture-0.0.37.dist-info}/licenses/LICENSE +0 -0
- {prompture-0.0.36.dist-info → prompture-0.0.37.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,54 @@ 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
|
+
)
|
|
71
113
|
from .logging import JSONFormatter, configure_logging
|
|
72
114
|
from .model_rates import get_model_info, get_model_rates, refresh_rates_cache
|
|
115
|
+
from .persistence import ConversationStore
|
|
116
|
+
from .persona import (
|
|
117
|
+
PERSONAS,
|
|
118
|
+
Persona,
|
|
119
|
+
clear_persona_registry,
|
|
120
|
+
get_persona,
|
|
121
|
+
get_persona_names,
|
|
122
|
+
get_persona_registry_snapshot,
|
|
123
|
+
get_trait,
|
|
124
|
+
get_trait_names,
|
|
125
|
+
load_personas_from_directory,
|
|
126
|
+
register_persona,
|
|
127
|
+
register_trait,
|
|
128
|
+
reset_persona_registry,
|
|
129
|
+
reset_trait_registry,
|
|
130
|
+
)
|
|
73
131
|
from .runner import run_suite_from_spec
|
|
132
|
+
from .serialization import (
|
|
133
|
+
EXPORT_VERSION,
|
|
134
|
+
export_conversation,
|
|
135
|
+
export_usage_session,
|
|
136
|
+
import_conversation,
|
|
137
|
+
import_usage_session,
|
|
138
|
+
)
|
|
74
139
|
from .session import UsageSession
|
|
75
140
|
from .settings import settings as _settings
|
|
76
141
|
from .tools import clean_json_text, clean_toon_text
|
|
@@ -106,29 +171,64 @@ except Exception:
|
|
|
106
171
|
__version__ = "0.0.0"
|
|
107
172
|
|
|
108
173
|
__all__ = [
|
|
174
|
+
"EXPORT_VERSION",
|
|
109
175
|
"FIELD_DEFINITIONS",
|
|
176
|
+
"PERSONAS",
|
|
177
|
+
"Agent",
|
|
178
|
+
"AgentCallbacks",
|
|
179
|
+
"AgentError",
|
|
180
|
+
"AgentIterator",
|
|
181
|
+
"AgentResult",
|
|
182
|
+
"AgentState",
|
|
183
|
+
"AgentStep",
|
|
110
184
|
"AirLLMDriver",
|
|
185
|
+
"AsyncAgent",
|
|
186
|
+
"AsyncAgentIterator",
|
|
111
187
|
"AsyncConversation",
|
|
112
188
|
"AsyncDriver",
|
|
189
|
+
"AsyncLoopGroup",
|
|
190
|
+
"AsyncRouterAgent",
|
|
191
|
+
"AsyncSequentialGroup",
|
|
192
|
+
"AsyncStreamedAgentResult",
|
|
113
193
|
"AzureDriver",
|
|
114
194
|
"CacheBackend",
|
|
115
195
|
"ClaudeDriver",
|
|
116
196
|
"Conversation",
|
|
197
|
+
"ConversationStore",
|
|
117
198
|
"Driver",
|
|
118
199
|
"DriverCallbacks",
|
|
200
|
+
"ErrorPolicy",
|
|
119
201
|
"GoogleDriver",
|
|
120
202
|
"GrokDriver",
|
|
121
203
|
"GroqDriver",
|
|
204
|
+
"GroupAsAgent",
|
|
205
|
+
"GroupCallbacks",
|
|
206
|
+
"GroupResult",
|
|
207
|
+
"GroupStep",
|
|
208
|
+
"GuardrailError",
|
|
209
|
+
"ImageContent",
|
|
210
|
+
"ImageInput",
|
|
122
211
|
"JSONFormatter",
|
|
123
212
|
"LMStudioDriver",
|
|
124
213
|
"LocalHTTPDriver",
|
|
214
|
+
"LoopGroup",
|
|
125
215
|
"MemoryCacheBackend",
|
|
216
|
+
"ModelRetry",
|
|
126
217
|
"OllamaDriver",
|
|
127
218
|
"OpenAIDriver",
|
|
128
219
|
"OpenRouterDriver",
|
|
220
|
+
"ParallelGroup",
|
|
221
|
+
"Persona",
|
|
129
222
|
"RedisCacheBackend",
|
|
130
223
|
"ResponseCache",
|
|
224
|
+
"RouterAgent",
|
|
225
|
+
"RunContext",
|
|
131
226
|
"SQLiteCacheBackend",
|
|
227
|
+
"SequentialGroup",
|
|
228
|
+
"StepType",
|
|
229
|
+
"StreamEvent",
|
|
230
|
+
"StreamEventType",
|
|
231
|
+
"StreamedAgentResult",
|
|
132
232
|
"ToolDefinition",
|
|
133
233
|
"ToolRegistry",
|
|
134
234
|
"UsageSession",
|
|
@@ -138,9 +238,12 @@ __all__ = [
|
|
|
138
238
|
"clean_json_text",
|
|
139
239
|
"clean_json_text_with_ai",
|
|
140
240
|
"clean_toon_text",
|
|
241
|
+
"clear_persona_registry",
|
|
141
242
|
"clear_registry",
|
|
142
243
|
"configure_cache",
|
|
143
244
|
"configure_logging",
|
|
245
|
+
"export_conversation",
|
|
246
|
+
"export_usage_session",
|
|
144
247
|
"extract_and_jsonify",
|
|
145
248
|
"extract_from_data",
|
|
146
249
|
"extract_from_pandas",
|
|
@@ -154,23 +257,38 @@ __all__ = [
|
|
|
154
257
|
"get_field_names",
|
|
155
258
|
"get_model_info",
|
|
156
259
|
"get_model_rates",
|
|
260
|
+
"get_persona",
|
|
261
|
+
"get_persona_names",
|
|
262
|
+
"get_persona_registry_snapshot",
|
|
157
263
|
"get_registry_snapshot",
|
|
158
264
|
"get_required_fields",
|
|
159
|
-
|
|
265
|
+
"get_trait",
|
|
266
|
+
"get_trait_names",
|
|
267
|
+
"image_from_base64",
|
|
268
|
+
"image_from_bytes",
|
|
269
|
+
"image_from_file",
|
|
270
|
+
"image_from_url",
|
|
271
|
+
"import_conversation",
|
|
272
|
+
"import_usage_session",
|
|
160
273
|
"is_async_driver_registered",
|
|
161
274
|
"is_driver_registered",
|
|
162
275
|
"list_registered_async_drivers",
|
|
163
276
|
"list_registered_drivers",
|
|
164
277
|
"load_entry_point_drivers",
|
|
165
|
-
|
|
278
|
+
"load_personas_from_directory",
|
|
279
|
+
"make_image",
|
|
166
280
|
"manual_extract_and_jsonify",
|
|
167
281
|
"normalize_enum_value",
|
|
168
282
|
"refresh_rates_cache",
|
|
169
283
|
"register_async_driver",
|
|
170
284
|
"register_driver",
|
|
171
285
|
"register_field",
|
|
286
|
+
"register_persona",
|
|
287
|
+
"register_trait",
|
|
172
288
|
"render_output",
|
|
289
|
+
"reset_persona_registry",
|
|
173
290
|
"reset_registry",
|
|
291
|
+
"reset_trait_registry",
|
|
174
292
|
"run_suite_from_spec",
|
|
175
293
|
"stepwise_extract_with_model",
|
|
176
294
|
"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.37'
|
|
32
|
+
__version_tuple__ = version_tuple = (0, 0, 37)
|
|
33
33
|
|
|
34
34
|
__commit_id__ = commit_id = None
|