You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/Services/InfoProviderSystem/DTOJsonSchemaConverter.php
+17-9Lines changed: 17 additions & 9 deletions
Original file line number
Diff line number
Diff line change
@@ -63,13 +63,19 @@ public function getJSONSchema(): array
63
63
'type' => 'object',
64
64
'properties' => [
65
65
'name' => ['type' => 'string'],
66
-
'value' => ['type' => 'string'],
67
-
'unit' => ['type' => ['string', 'null']],
66
+
'symbol' => ['type' => ['string', 'null'], 'description' => 'An optional quantity symbol for the parameter in latex code, like R_1'],
67
+
'value_typical' => ['type' => ['number', 'null'], 'description' => 'The typical value of the parameter. For example, for a resistor this could be 100 for a 100 Ohm resistor. Also used if only one numeric value is given. If used an unit should be given'],
68
+
'value_min' => ['type' => ['number', 'null'], 'description' => 'If a range is given for the parameter, this is the minimum value. Null if no range is given.'],
69
+
'value_max' => ['type' => ['number', 'null'], 'description' => 'If a range is given for the parameter, this is the maximum value. Null if not a range.'],
70
+
'value_text' => ['type' => ['string', 'null'], 'description' => 'When a value is not numeric it can be put here as text. Only use if it does not fit in value_min, value_typical or value_max. E.g. "Yes", "Red", etc.'],
71
+
'group' => ['type' => ['string', 'null'], 'description' => 'An optional group name for the parameter, e.g. "Electrical parameters", "Mechanical parameters" etc.'],
72
+
'unit' => ['type' => ['string', 'null'], 'description' => 'The unit of the parameter values, e.g. kg, Ohm, V, etc.'],
'description' => 'A list of datasheets, manuals, or other technical documents related to the product. Not images, but actual documents, preferably PDFs.',
73
79
'type' => 'array',
74
80
'items' => [
75
81
'type' => 'object',
@@ -145,13 +151,15 @@ public function jsonToDTO(array $data, string $providerKey, string $providerId,
Copy file name to clipboardExpand all lines: src/Services/InfoProviderSystem/Providers/AIInfoExtractor.php
+3-4Lines changed: 3 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -217,13 +217,12 @@ private function buildSystemPrompt(): string
217
217
218
218
Rules:
219
219
- manufacturing_status: Use "active", "obsolete", "nrfnd" (not recommended for new designs), "discontinued", or null
220
-
- parameters: Extract technical specs like voltage, current, temperature, etc.
220
+
- parameters: Extract technical specs like voltage, current, temperature, etc. and put them into the fields according to the JSON schema. Include units if available.
221
221
- prices: Extract pricing tiers with minimum_quantity, price, and currency code
222
222
- URLs must be absolute (include https://...)
223
223
- If information is not found, use null
224
-
- Return ONLY the JSON, no explanation text
225
-
226
-
For parameters, combine name, value, and unit. The unit should be separate if possible.
224
+
- Try to avoid duplicating parameters, if the same parameter is mentioned multiple times, or if it is already used in another field.
225
+
- Include only the 1 to 3 most relevant images, such as the main product image or important diagrams. Ignore decorative images, logos, or icons.
0 commit comments