Interface to Product Insights Agent (PIA) related API calls
- Description:
- Interface to Product Insights Agent (PIA) related API calls
- Source:
Returns:
-
Type
-
object
Methods
(inner) getAnswerResults(itemId, question, parametersopt, networkParametersopt) → {Promise}
- Description:
- Retrieve an answer to a product question from Constructor.io API
- Source:
Example
constructorio.agent.pia.getAnswerResults('item-123', 'What material is this made of?', {
threadId: '550e8400-e29b-41d4-a716-446655440000',
});
Parameters:
| Name |
Type |
Attributes |
Description |
itemId |
string
|
|
The identifier of the item |
question |
string
|
|
The question to ask about the item |
parameters |
object
|
<optional>
|
Additional parameters to refine result set
Properties
| Name |
Type |
Attributes |
Description |
threadId |
string
|
<optional>
|
Thread ID for conversation context (UUID) |
variationId |
string
|
<optional>
|
Variation ID of the item |
|
networkParameters |
object
|
<optional>
|
Parameters relevant to the network request
Properties
| Name |
Type |
Attributes |
Description |
timeout |
number
|
<optional>
|
Request timeout (in milliseconds) |
|
Returns:
-
Type
-
Promise
(inner) getSuggestedQuestions(itemId, parametersopt, networkParametersopt) → {Promise}
- Description:
- Retrieve suggested questions for a product from Constructor.io API
- Source:
Example
constructorio.agent.pia.getSuggestedQuestions('item-123', {
variationId: 'variation-456',
numResults: 3,
});
Parameters:
| Name |
Type |
Attributes |
Description |
itemId |
string
|
|
The identifier of the item |
parameters |
object
|
<optional>
|
Additional parameters to refine result set
Properties
| Name |
Type |
Attributes |
Description |
threadId |
string
|
<optional>
|
Thread ID for conversation context (UUID) |
variationId |
string
|
<optional>
|
Variation ID of the item |
numResults |
number
|
<optional>
|
Number of suggested questions to return |
|
networkParameters |
object
|
<optional>
|
Parameters relevant to the network request
Properties
| Name |
Type |
Attributes |
Description |
timeout |
number
|
<optional>
|
Request timeout (in milliseconds) |
|
Returns:
-
Type
-
Promise