File size: 4,201 Bytes
8bbd0a7
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
JSON_SCHEMA_FOR_GPT = """

{

  "title": "Fashion Campaign Ideas",

  "type": "array",

  "items": {

    "type": "object",

    "properties": {

      "model": {

        "type": "object",

        "properties": {

          "ethnicity": {

            "type": "string",

            "description": "The ethnicity of the model"

          },

          "age": {

            "type": "integer",

            "description": "The age of the model"

          },

          "gender": {

            "type": "string",

            "enum": ["male", "female", "non-binary"],

            "description": "The gender of the model"

          }

        },

        "required": ["ethnicity", "age", "gender"]

      },

      "location": {

        "type": "string",

        "description": "The location or setting for the shoot"

      },

      "mood": {

        "type": "string",

        "description": "The overall mood or atmosphere for the shoot"

      },

      "emotion": {

        "type": "string",

        "description": "The primary emotion to be conveyed in the shoot"

      },

      "accessories": {

        "type": "array",

        "items": {

          "type": "string",

          "description": "Accessories included in the fashion shoot (e.g., sunglasses, handbags, jewelry)"

        }

      },

      "pose": {

        "type": "string",

        "description": "The type of pose the model will be holding during the shoot"

      },

      "target_market": {

        "type": "string",

        "description": "The target audience for the fashion piece"

      },

      "reasoning": {

        "type": "string",

        "description": "Explanation of why this particular campaign is suggested for the product"

      },

      "final_prompt": {

        "type": "string",

        "description": "The combined fashion shoot prompt, summarizing all details",

        "readonly": true

      }

    },

    "required": ["model", "location", "mood", "emotion", "accessories", "pose", "target_market", "reasoning"],

    "definitions": {

      "generateFinalPrompt": {

        "description": "Generate the final prompt by combining all the inputs into a cohesive sentence.",

        "template": "{mood} photoshoot in {location} featuring a {model.ethnicity}, {model.age}-year-old {model.gender} model wearing accessories like {accessories}. The model holds a {pose} pose, conveying a sense of {emotion}, aimed at the {target_market} market. Reasoning: {reasoning}"

      }

    }

  }

}"""

UPDATED_MODEL_ONLY_SCHEMA = {
  "type": "object",
  "properties": {
    "model": {
      "type": "object",
      "properties": {
        "ethnicity": {
          "type": "string",
          "description": "The ethnicity of the model"
        },
        "age": {
          "type": "integer",
          "description": "The age of the model"
        },
        "gender": {
          "type": "string",
          "enum": ["male", "female", "non-binary"],
          "description": "The gender of the model"
        },
        "model_prompt": {
          "type": "string",
          "description": "The prompt used to generate the model details"
        },
        "reasoning": {
          "type": "string",
          "description": "The reasoning behind the model selection"
        },
        "background": {
          "type": "string",
          "description": "The background information about the model"
        }
      },
      "required": ["ethnicity", "age", "gender", "model_prompt", "reasoning", "background"],
      "additionalProperties": False
    }
  },
  "required": ["model"],
  "additionalProperties": False
}

JSON_SCHEMA_FOR_LOC_ONLY = {
  "type": "object",
  "properties": {
    "location": {
      "type": "string",
      "description": "The location or setting for the shoot"
    },
    "location_prompt": {
      "type": "string",
      "description": "The prompt or instruction related to the location"
    },
    "reasoning": {
      "type": "string",
      "description": "The reasoning or rationale behind selecting this location"
    }
  },
  "required": ["location", "location_prompt", "reasoning"]
}