ws-bom-robot-app 0.0.74__py3-none-any.whl → 0.0.76__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.
@@ -43,6 +43,7 @@ class Anthropic(LlmInterface):
43
43
  api_key=self.config.api_key or os.getenv("ANTHROPIC_API_KEY"),
44
44
  model=self.config.model,
45
45
  temperature=self.config.temperature,
46
+ max_tokens=8192,
46
47
  streaming=True,
47
48
  stream_usage=True
48
49
  )
@@ -84,40 +84,20 @@ class Thron(IntegrationStrategy):
84
84
 
85
85
 
86
86
  def __transform_data(self, data: dict) -> dict:
87
- transformed_data = []
88
-
89
- # First pass: collect all MASTER items
90
- master_items = {item.get("id"): item for item in data if item.get("hierarchyLevel") == "MASTER"}
91
-
92
- # Second pass: process items
87
+ _data = []
93
88
  for item in data:
94
- hierarchy_level = item.get("hierarchyLevel")
95
-
96
- if hierarchy_level == "MASTER":
97
- # Find matching variants for this master
98
- master_id = item.get("id")
99
- item_copy = item.copy()
100
- item_copy["variants"] = []
101
-
102
- # Look for variants that belong to this master
103
- for variant_item in data:
104
- if (variant_item.get("hierarchyLevel") == "VARIANT" and
105
- variant_item.get("variation", {}).get("master")):
106
-
107
- variant_master_id = variant_item.get("variation").get("master").split(":")[-1]
108
-
109
- # Check if this variant belongs to current master by comparing product_ids
89
+ if item.get("hierarchyLevel") == "MASTER":
90
+ # Iterate through variants to find the product_id
91
+ for item_variant in data:
92
+ if item_variant.get("hierarchyLevel") == "VARIANT":
110
93
  for attr in item.get("attributes", []):
111
- if (attr.get("code") == "product_id" and
112
- attr.get("identifier") == variant_master_id):
113
- item_copy["variants"].append(variant_item)
94
+ if attr.get("code") == "product_id" and attr.get("identifier") == item_variant.get("variation").get("master").split(":")[-1]:
95
+ # Initialize variants list if it doesn't exist
96
+ if "variants" not in item:
97
+ item["variants"] = []
98
+ item["variants"].append(item_variant)
99
+ _data.append(item)
114
100
  break
115
-
116
- # Only add master items that have variants
117
- if item_copy["variants"]:
118
- transformed_data.append(item_copy)
119
-
120
- elif hierarchy_level == "SIMPLE":
121
- transformed_data.append(item)
122
-
123
- return transformed_data
101
+ elif item.get("hierarchyLevel") == "SIMPLE":
102
+ _data.append(item)
103
+ return _data
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: ws_bom_robot_app
3
- Version: 0.0.74
3
+ Version: 0.0.76
4
4
  Summary: A FastAPI application serving ws bom/robot/llm platform ai.
5
5
  Home-page: https://github.com/websolutespa/bom
6
6
  Author: Websolute Spa
@@ -23,7 +23,7 @@ ws_bom_robot_app/llm/models/base.py,sha256=1TqxuTK3rjJEALn7lvgoen_1ba3R2brAgGx6E
23
23
  ws_bom_robot_app/llm/models/feedback.py,sha256=zh1jLqPRLzNlxInkCMoiJbfSu0-tiOEYHM7FhC46PkM,1692
24
24
  ws_bom_robot_app/llm/models/kb.py,sha256=oVSw6_dmNxikAHrPqcfxDXz9M0ezLIYuxpgvzfs_Now,9514
25
25
  ws_bom_robot_app/llm/providers/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
26
- ws_bom_robot_app/llm/providers/llm_manager.py,sha256=kxqzYtgpdmvwA6Ku_GVIkRkLGR2DsLlSnjZGM3_V8zQ,11912
26
+ ws_bom_robot_app/llm/providers/llm_manager.py,sha256=j-AnRh5jZ3eSNOZcmVKO63oBtosXA_blBBrjvJtIkWU,11942
27
27
  ws_bom_robot_app/llm/tools/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
28
28
  ws_bom_robot_app/llm/tools/tool_builder.py,sha256=QTRG1c-EnH4APP10IyfZxEkqK9KitUsutXUvDRKeAhU,3224
29
29
  ws_bom_robot_app/llm/tools/tool_manager.py,sha256=1IgRXxdB7DU3gbIlfT_aMUWZyWuanFTAFwu3VaYKxfE,14990
@@ -62,12 +62,12 @@ ws_bom_robot_app/llm/vector_store/integration/sftp.py,sha256=WNzjjS1EUykgFB-8e7Q
62
62
  ws_bom_robot_app/llm/vector_store/integration/sharepoint.py,sha256=zqqn-6qPrK50Phch4nZHJTgaPyPkGe7W2InGL_Ru6vE,5376
63
63
  ws_bom_robot_app/llm/vector_store/integration/sitemap.py,sha256=g0TIRZ2qIpEuVCZ9Bn0MvvxYZtU3wptnTEjoKNZyBAg,5019
64
64
  ws_bom_robot_app/llm/vector_store/integration/slack.py,sha256=FMjESXm2QetFXI6i8epze7Kbbu22fV8CVaxb71AHnJ8,2572
65
- ws_bom_robot_app/llm/vector_store/integration/thron.py,sha256=gBDGYYfe7ZkQpYS2ExF5dZP4HlHoBz03nYNYEvrbR0w,4987
65
+ ws_bom_robot_app/llm/vector_store/integration/thron.py,sha256=AX3Dk6A6TDAEST9VVwhKVB6qr4b1lBXlE-dy_V4Tgu4,4416
66
66
  ws_bom_robot_app/llm/vector_store/loader/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
67
67
  ws_bom_robot_app/llm/vector_store/loader/base.py,sha256=L_ugekNuAq0N9O-24wtlHSNHkqSeD-KsJrfGt_FX9Oc,5340
68
68
  ws_bom_robot_app/llm/vector_store/loader/docling.py,sha256=yP0zgXLeFAlByaYuj-6cYariuknckrFds0dxdRcnVz8,3456
69
69
  ws_bom_robot_app/llm/vector_store/loader/json_loader.py,sha256=qo9ejRZyKv_k6jnGgXnu1W5uqsMMtgqK_uvPpZQ0p74,833
70
- ws_bom_robot_app-0.0.74.dist-info/METADATA,sha256=yoc6qsnTaKCpOXJjc1yCWrKtnEE5vqKvx_CyxQm2s08,8609
71
- ws_bom_robot_app-0.0.74.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
72
- ws_bom_robot_app-0.0.74.dist-info/top_level.txt,sha256=Yl0akyHVbynsBX_N7wx3H3ZTkcMLjYyLJs5zBMDAKcM,17
73
- ws_bom_robot_app-0.0.74.dist-info/RECORD,,
70
+ ws_bom_robot_app-0.0.76.dist-info/METADATA,sha256=e6QyzVw9spgo-qPmhDmX-O5oYtDvGN_zJLnhy2gHTuk,8609
71
+ ws_bom_robot_app-0.0.76.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
72
+ ws_bom_robot_app-0.0.76.dist-info/top_level.txt,sha256=Yl0akyHVbynsBX_N7wx3H3ZTkcMLjYyLJs5zBMDAKcM,17
73
+ ws_bom_robot_app-0.0.76.dist-info/RECORD,,