asasked 0.1.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.
- asasked/__init__.py +5 -0
- asasked/catalog.py +67 -0
- asasked/coherence.py +756 -0
- asasked/guard.py +236 -0
- asasked/harness/__init__.py +0 -0
- asasked/harness/agent.py +297 -0
- asasked/harness/dataset.py +637 -0
- asasked/harness/dataset_v2.py +731 -0
- asasked/harness/labels.py +95 -0
- asasked/harness/run.py +124 -0
- asasked/harness/tasks.py +343 -0
- asasked/harness/user_sim.py +97 -0
- asasked/integrations/__init__.py +11 -0
- asasked/integrations/claude_agent.py +29 -0
- asasked/integrations/langchain.py +36 -0
- asasked/integrations/openai_agents.py +26 -0
- asasked/live.py +582 -0
- asasked/llm_extract.py +467 -0
- asasked/mcp_server.py +117 -0
- asasked/scenarios.py +135 -0
- asasked/store/__init__.py +0 -0
- asasked/store/catalog_v1.py +204 -0
- asasked/store/http.py +114 -0
- asasked/store/store.py +426 -0
- asasked/stress_phrases.py +287 -0
- asasked/stress_phrases_en.py +287 -0
- asasked/vi_runner.py +270 -0
- asasked-0.1.0.dist-info/METADATA +562 -0
- asasked-0.1.0.dist-info/RECORD +32 -0
- asasked-0.1.0.dist-info/WHEEL +4 -0
- asasked-0.1.0.dist-info/entry_points.txt +2 -0
- asasked-0.1.0.dist-info/licenses/LICENSE +201 -0
asasked/__init__.py
ADDED
asasked/catalog.py
ADDED
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
"""Товарный каталог с атрибутами, которых нет в ограничениях Verifiable Intent.
|
|
2
|
+
|
|
3
|
+
Стандарт сверяет покупку по артикулу, сумме и продавцу. Всё остальное —
|
|
4
|
+
уровень товара, возвратность, срок доставки, цвет, размер — в проверке
|
|
5
|
+
не участвует. Здесь эти поля есть, чтобы показать, что именно теряется.
|
|
6
|
+
"""
|
|
7
|
+
|
|
8
|
+
MERCHANTS = [
|
|
9
|
+
{"id": "m-1", "name": "Tennis Warehouse", "website": "https://tennis-warehouse.com"},
|
|
10
|
+
{"id": "m-2", "name": "Racket Outlet", "website": "https://racket-outlet.example"},
|
|
11
|
+
]
|
|
12
|
+
|
|
13
|
+
PRODUCTS = [
|
|
14
|
+
# ---- ракетки -------------------------------------------------------
|
|
15
|
+
{
|
|
16
|
+
"sku": "BAB-PA-98", "name": "Babolat Pure Aero 98",
|
|
17
|
+
"brand": "Babolat", "category": "racket", "level": "pro",
|
|
18
|
+
"price_cents": 39900, "color": "yellow", "size_label": "4 3/8",
|
|
19
|
+
"refundable": False, "ships_in_days": 2, "pack_size": 1,
|
|
20
|
+
},
|
|
21
|
+
{
|
|
22
|
+
"sku": "BAB-DR-JR", "name": "Babolat Drive Junior",
|
|
23
|
+
"brand": "Babolat", "category": "racket", "level": "beginner",
|
|
24
|
+
"price_cents": 11900, "color": "blue", "size_label": "4 1/4",
|
|
25
|
+
"refundable": True, "ships_in_days": 3, "pack_size": 1,
|
|
26
|
+
},
|
|
27
|
+
{
|
|
28
|
+
"sku": "HEA-SP-PRO", "name": "HEAD Speed Pro",
|
|
29
|
+
"brand": "HEAD", "category": "racket", "level": "pro",
|
|
30
|
+
"price_cents": 36500, "color": "black", "size_label": "4 3/8",
|
|
31
|
+
"refundable": True, "ships_in_days": 21, "pack_size": 1,
|
|
32
|
+
},
|
|
33
|
+
{
|
|
34
|
+
"sku": "HEA-TI-S6", "name": "HEAD Ti.S6",
|
|
35
|
+
"brand": "HEAD", "category": "racket", "level": "beginner",
|
|
36
|
+
"price_cents": 9900, "color": "silver", "size_label": "4 3/8",
|
|
37
|
+
"refundable": True, "ships_in_days": 2, "pack_size": 1,
|
|
38
|
+
},
|
|
39
|
+
# ---- мячи ----------------------------------------------------------
|
|
40
|
+
{
|
|
41
|
+
"sku": "WIL-US-3", "name": "Wilson US Open, банка 3 мяча",
|
|
42
|
+
"brand": "Wilson", "category": "balls", "level": "any",
|
|
43
|
+
"price_cents": 1200, "color": "yellow", "size_label": "",
|
|
44
|
+
"refundable": True, "ships_in_days": 2, "pack_size": 3,
|
|
45
|
+
},
|
|
46
|
+
# ---- кроссовки -----------------------------------------------------
|
|
47
|
+
{
|
|
48
|
+
"sku": "ASI-GEL-42-BK", "name": "ASICS Gel-Resolution, 42, чёрные",
|
|
49
|
+
"brand": "ASICS", "category": "shoes", "level": "any",
|
|
50
|
+
"price_cents": 13500, "color": "black", "size_label": "42",
|
|
51
|
+
"refundable": True, "ships_in_days": 4, "pack_size": 1,
|
|
52
|
+
},
|
|
53
|
+
{
|
|
54
|
+
"sku": "ASI-GEL-44-WH", "name": "ASICS Gel-Resolution, 44, белые",
|
|
55
|
+
"brand": "ASICS", "category": "shoes", "level": "any",
|
|
56
|
+
"price_cents": 13500, "color": "white", "size_label": "44",
|
|
57
|
+
"refundable": True, "ships_in_days": 4, "pack_size": 1,
|
|
58
|
+
},
|
|
59
|
+
]
|
|
60
|
+
|
|
61
|
+
BY_SKU = {p["sku"]: p for p in PRODUCTS}
|
|
62
|
+
|
|
63
|
+
|
|
64
|
+
def find(sku: str) -> dict:
|
|
65
|
+
if sku not in BY_SKU:
|
|
66
|
+
raise KeyError(f"Нет товара {sku}")
|
|
67
|
+
return BY_SKU[sku]
|