Create Attributes And Levels

POST

Create attributes and levels for a given why_prompt.

Parameters:

  • req: AttributesLevelsRequest object containing:
    • why_prompt: The main concept or prompt
    • country: Target country
    • level_count: Number of levels per attribute (optional)
    • max_length: Maximum length for levels (optional)
    • llm_model: Language model to use (optional)
    • attribute_count: Number of attributes to generate (optional)

Returns:

  • List of attributes with their levels.

Example Response:

1[
2 {
3 "attribute": "Price",
4 "levels": [
5 "The car costs $30,000",
6 "The car costs $40,000",
7 "The car costs $50,000",
8 "The car costs $60,000",
9 "The car costs $70,000"
10 ]
11 },
12 {
13 "attribute": "Safety Rating",
14 "levels": [
15 "The car has a 3-star safety rating",
16 "The car has a 4-star safety rating",
17 "The car has a 5-star safety rating",
18 "The car has a 5.5-star safety rating"
19 ]
20 }
21]

Raises:

  • HTTPException 404: If an error occurs during creation

Request

This endpoint expects an object.
why_promptstringRequired
countrystringRequired
prompt_typeenumOptional
Allowed values: genericserviceproductexperiencepolicy

Enum representing the type of prompts used in experiment designs.

llm_modelenumOptionalDefaults to gpt4

Enum representing the llm model types used in the experiments.

attribute_countintegerOptional>=2<=7Defaults to 4

The number of attributes in the experiment. This value must be an integer between 2 and 7, inclusive. If not provided, the default value is 4. Each attribute represents a characteristic or feature of the experiment.

level_countintegerOptional>=2<=5Defaults to 4

The number of levels in the experiment. This value must be an integer between 2 and 5, inclusive. If not provided, the default value is 4. Each level represents a different possible value or state of an attribute.

max_lengthintegerOptional>=40<=80Defaults to 40

The maximum # Characters per attribute. This value must be an integer between 40 and 80, inclusive. If not provided, the default value is 40.

Response

Successful Response

attributestring
levelslist of strings
Built with