trodo-python 2.12.0__tar.gz → 2.13.0__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.
- {trodo_python-2.12.0 → trodo_python-2.13.0}/PKG-INFO +1 -1
- {trodo_python-2.12.0 → trodo_python-2.13.0}/pyproject.toml +1 -1
- {trodo_python-2.12.0 → trodo_python-2.13.0}/tests/test_prompts.py +5 -5
- {trodo_python-2.12.0 → trodo_python-2.13.0}/trodo/__init__.py +1 -1
- {trodo_python-2.12.0 → trodo_python-2.13.0}/trodo/managers/prompt_manager.py +2 -2
- {trodo_python-2.12.0 → trodo_python-2.13.0}/trodo/prompts/compile.py +1 -1
- {trodo_python-2.12.0 → trodo_python-2.13.0}/trodo/prompts/types.py +1 -1
- {trodo_python-2.12.0 → trodo_python-2.13.0}/trodo_python.egg-info/PKG-INFO +1 -1
- {trodo_python-2.12.0 → trodo_python-2.13.0}/README.md +0 -0
- {trodo_python-2.12.0 → trodo_python-2.13.0}/setup.cfg +0 -0
- {trodo_python-2.12.0 → trodo_python-2.13.0}/tests/test_anon_distinct_id.py +0 -0
- {trodo_python-2.12.0 → trodo_python-2.13.0}/tests/test_auto_instrument_fixes.py +0 -0
- {trodo_python-2.12.0 → trodo_python-2.13.0}/tests/test_cross_process_session.py +0 -0
- {trodo_python-2.12.0 → trodo_python-2.13.0}/tests/test_end_run.py +0 -0
- {trodo_python-2.12.0 → trodo_python-2.13.0}/tests/test_error_enrichment.py +0 -0
- {trodo_python-2.12.0 → trodo_python-2.13.0}/tests/test_llm_usage_cost.py +0 -0
- {trodo_python-2.12.0 → trodo_python-2.13.0}/tests/test_processor_methods.py +0 -0
- {trodo_python-2.12.0 → trodo_python-2.13.0}/tests/test_register_otel.py +0 -0
- {trodo_python-2.12.0 → trodo_python-2.13.0}/tests/test_start_run.py +0 -0
- {trodo_python-2.12.0 → trodo_python-2.13.0}/tests/test_wrap_agent_unchanged.py +0 -0
- {trodo_python-2.12.0 → trodo_python-2.13.0}/trodo/api/__init__.py +0 -0
- {trodo_python-2.12.0 → trodo_python-2.13.0}/trodo/api/async_client.py +0 -0
- {trodo_python-2.12.0 → trodo_python-2.13.0}/trodo/api/endpoints.py +0 -0
- {trodo_python-2.12.0 → trodo_python-2.13.0}/trodo/api/http_client.py +0 -0
- {trodo_python-2.12.0 → trodo_python-2.13.0}/trodo/auto/__init__.py +0 -0
- {trodo_python-2.12.0 → trodo_python-2.13.0}/trodo/auto/auto_event_manager.py +0 -0
- {trodo_python-2.12.0 → trodo_python-2.13.0}/trodo/client.py +0 -0
- {trodo_python-2.12.0 → trodo_python-2.13.0}/trodo/managers/__init__.py +0 -0
- {trodo_python-2.12.0 → trodo_python-2.13.0}/trodo/managers/group_manager.py +0 -0
- {trodo_python-2.12.0 → trodo_python-2.13.0}/trodo/managers/people_manager.py +0 -0
- {trodo_python-2.12.0 → trodo_python-2.13.0}/trodo/otel/__init__.py +0 -0
- {trodo_python-2.12.0 → trodo_python-2.13.0}/trodo/otel/auto_instrument.py +0 -0
- {trodo_python-2.12.0 → trodo_python-2.13.0}/trodo/otel/context.py +0 -0
- {trodo_python-2.12.0 → trodo_python-2.13.0}/trodo/otel/helpers.py +0 -0
- {trodo_python-2.12.0 → trodo_python-2.13.0}/trodo/otel/processor.py +0 -0
- {trodo_python-2.12.0 → trodo_python-2.13.0}/trodo/otel/register.py +0 -0
- {trodo_python-2.12.0 → trodo_python-2.13.0}/trodo/otel/transport.py +0 -0
- {trodo_python-2.12.0 → trodo_python-2.13.0}/trodo/otel/wrap_agent.py +0 -0
- {trodo_python-2.12.0 → trodo_python-2.13.0}/trodo/prompts/__init__.py +0 -0
- {trodo_python-2.12.0 → trodo_python-2.13.0}/trodo/prompts/template.py +0 -0
- {trodo_python-2.12.0 → trodo_python-2.13.0}/trodo/queue/__init__.py +0 -0
- {trodo_python-2.12.0 → trodo_python-2.13.0}/trodo/queue/batch_flusher.py +0 -0
- {trodo_python-2.12.0 → trodo_python-2.13.0}/trodo/queue/event_queue.py +0 -0
- {trodo_python-2.12.0 → trodo_python-2.13.0}/trodo/session/__init__.py +0 -0
- {trodo_python-2.12.0 → trodo_python-2.13.0}/trodo/session/server_session.py +0 -0
- {trodo_python-2.12.0 → trodo_python-2.13.0}/trodo/session/session_manager.py +0 -0
- {trodo_python-2.12.0 → trodo_python-2.13.0}/trodo/types.py +0 -0
- {trodo_python-2.12.0 → trodo_python-2.13.0}/trodo/user_context.py +0 -0
- {trodo_python-2.12.0 → trodo_python-2.13.0}/trodo_python.egg-info/SOURCES.txt +0 -0
- {trodo_python-2.12.0 → trodo_python-2.13.0}/trodo_python.egg-info/dependency_links.txt +0 -0
- {trodo_python-2.12.0 → trodo_python-2.13.0}/trodo_python.egg-info/requires.txt +0 -0
- {trodo_python-2.12.0 → trodo_python-2.13.0}/trodo_python.egg-info/top_level.txt +0 -0
|
@@ -81,7 +81,7 @@ PROMPT = {
|
|
|
81
81
|
{"role": "system", "content": [{"type": "text", "text": "You are {{persona}}."}]},
|
|
82
82
|
{"role": "user", "content": [{"type": "text", "text": "Hello {{who}}"}]},
|
|
83
83
|
],
|
|
84
|
-
"
|
|
84
|
+
"model": {"provider": "openai", "model": "gpt-4o", "temperature": 0.3},
|
|
85
85
|
"tools": [],
|
|
86
86
|
"response_format": None,
|
|
87
87
|
"variables": [
|
|
@@ -99,7 +99,7 @@ def test_compile_returns_structured_messages_not_a_string():
|
|
|
99
99
|
assert out.messages[1]["content"][0] == {"type": "text", "text": "Hello world"}
|
|
100
100
|
|
|
101
101
|
|
|
102
|
-
def
|
|
102
|
+
def test_compile_carries_model_and_tools():
|
|
103
103
|
out = compile_prompt(PROMPT, {"who": "world"})
|
|
104
104
|
assert out.model == {"provider": "openai", "model": "gpt-4o", "temperature": 0.3}
|
|
105
105
|
assert out.tools == []
|
|
@@ -132,7 +132,7 @@ def test_compile_treats_values_as_inert_data():
|
|
|
132
132
|
def test_compile_coerces_declared_types():
|
|
133
133
|
p = {
|
|
134
134
|
"messages": [{"role": "user", "content": [{"type": "text", "text": "n={{n}}"}]}],
|
|
135
|
-
"
|
|
135
|
+
"model": {},
|
|
136
136
|
"tools": [],
|
|
137
137
|
"response_format": None,
|
|
138
138
|
"variables": [{"name": "n", "type": "number"}],
|
|
@@ -148,7 +148,7 @@ def test_compile_expands_placeholders_and_preserves_injected_messages():
|
|
|
148
148
|
{"role": "system", "content": [{"type": "text", "text": "sys"}]},
|
|
149
149
|
{"type": "placeholder", "name": "hist"},
|
|
150
150
|
],
|
|
151
|
-
"
|
|
151
|
+
"model": {},
|
|
152
152
|
"tools": [],
|
|
153
153
|
"response_format": None,
|
|
154
154
|
"variables": [{"name": "hist", "type": "messages"}],
|
|
@@ -211,7 +211,7 @@ def test_get_maps_wire_shape_and_binds_compile():
|
|
|
211
211
|
assert p.version == 2
|
|
212
212
|
assert p.labels == ["production"]
|
|
213
213
|
assert p.tags == ["support"]
|
|
214
|
-
assert p.
|
|
214
|
+
assert p.model["model"] == "gpt-4o"
|
|
215
215
|
assert p.is_fallback is False
|
|
216
216
|
assert p.compile(who="world").messages[1]["content"][0]["text"] == "Hello world"
|
|
217
217
|
|
|
@@ -75,7 +75,7 @@ def _to_prompt(raw: Dict[str, Any], is_fallback: bool = False) -> ManagedPrompt:
|
|
|
75
75
|
version=int(raw.get("version") or 0),
|
|
76
76
|
labels=list(raw.get("labels") or []),
|
|
77
77
|
messages=list(raw.get("messages") or []),
|
|
78
|
-
|
|
78
|
+
model=dict(raw.get("model") or {}),
|
|
79
79
|
tools=list(raw.get("tools") or []),
|
|
80
80
|
response_format=raw.get("response_format"),
|
|
81
81
|
variables=_to_variables(raw.get("variables")),
|
|
@@ -245,7 +245,7 @@ class PromptManager:
|
|
|
245
245
|
"labels": [],
|
|
246
246
|
"tags": [],
|
|
247
247
|
"messages": fallback.get("messages") or [],
|
|
248
|
-
"
|
|
248
|
+
"model": fallback.get("model") or {},
|
|
249
249
|
"tools": [],
|
|
250
250
|
"response_format": None,
|
|
251
251
|
"variables": fallback.get("variables") or [],
|
|
@@ -175,7 +175,7 @@ def compile_prompt(prompt: Any, values: Optional[Dict[str, Any]] = None) -> Comp
|
|
|
175
175
|
|
|
176
176
|
return CompiledPrompt(
|
|
177
177
|
messages=out,
|
|
178
|
-
model=get("
|
|
178
|
+
model=get("model") or {},
|
|
179
179
|
tools=get("tools") or [],
|
|
180
180
|
response_format=get("response_format"),
|
|
181
181
|
)
|
|
@@ -54,7 +54,7 @@ class ManagedPrompt:
|
|
|
54
54
|
|
|
55
55
|
name: str
|
|
56
56
|
messages: List[PromptNode] = field(default_factory=list)
|
|
57
|
-
|
|
57
|
+
model: ModelConfig = field(default_factory=dict)
|
|
58
58
|
tools: List[PromptTool] = field(default_factory=list)
|
|
59
59
|
response_format: Optional[ResponseFormat] = None
|
|
60
60
|
variables: List[PromptVariable] = field(default_factory=list)
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|