haepa_mac commited on
Commit
3264298
ยท
1 Parent(s): e3b3552

๐Ÿค– AI ๊ธฐ๋ฐ˜ ๋ชจ์ˆœ์  ํŠน์„ฑ ์ƒ์„ฑ ์‹œ์Šคํ…œ ๊ตฌ์ถ• - ์‚ฌ๋ฌผ ํŠน์„ฑ๊ณผ ์‚ฌ์šฉ์ž ์กฐ์ •๊ฐ’ ๋ฐ˜์˜ํ•˜๋Š” ์ฐฝ์˜์  ๋ชจ์ˆœ ์ƒ์„ฑ, ๋งํˆฌ์™€ ํ–‰๋™ ํŒจํ„ด ๊ตฌ์ฒดํ™”, ํด๋ฐฑ ์‹œ์Šคํ…œ ์™„๋น„

Browse files
modules/persona_generator.py CHANGED
@@ -749,25 +749,197 @@ class PersonalityProfile:
749
  # ํด๋ฐฑ: ์„ฑ๊ฒฉ ๊ธฐ๋ฐ˜ ์„ ํƒ
750
  return random.sample(fallback_flaws, 4)
751
 
752
- def generate_contradictions(self):
753
- """๋ชจ์ˆœ์  ํŠน์„ฑ 2๊ฐœ ์ƒ์„ฑ (๋ณต์žก์„ฑ๊ณผ ๊นŠ์ด ๋ถ€์—ฌ)"""
754
  contradiction_vars = {k: v for k, v in self.variables.items() if k.startswith("P0")}
755
- top_contradictions = sorted(contradiction_vars.items(), key=lambda x: x[1], reverse=True)[:2]
756
-
757
- contradiction_descriptions = {
758
- "P01_์™ธ๋ฉด๋‚ด๋ฉด๋Œ€๋น„": "๊ฒ‰์œผ๋กœ๋Š” ๋ƒ‰์ •ํ•ด ๋ณด์ด์ง€๋งŒ, ์†์€ ๋”ฐ๋œปํ•œ ๋งˆ์Œ์„ ๊ฐ€์ง",
759
- "P02_์ƒํ™ฉ๋ณ„๋ณ€ํ™”": "๊ณต์‹์ ์ธ ์ž๋ฆฌ์—์„  ์—„๊ฒฉํ•˜์ง€๋งŒ, ์นœ๊ทผํ•œ ์ž๋ฆฌ์—์„  ์žฅ๋‚œ๊ธฐ ๊ฐ€๋“ํ•จ",
760
- "P03_๊ฐ€์น˜๊ด€์ถฉ๋Œ": "์ „ํ†ต์„ ์ค‘์‹œํ•˜๋ฉด์„œ๋„ ํ˜์‹ ์„ ์ถ”๊ตฌํ•˜๋Š” ๋ชจ์ˆœ์  ๊ฐ€์น˜๊ด€",
761
- "P04_์‹œ๊ฐ„๋Œ€๋ณ„์ฐจ์ด": "์•„์นจ์—” ์กฐ์šฉํ•˜๊ณ  ๋‚ด์„ฑ์ ์ด์ง€๋งŒ, ์ €๋…์—” ํ™œ๋ฐœํ•˜๊ณ  ์‚ฌ๊ต์ ์ž„",
762
- "P05_๋…ผ๋ฆฌ๊ฐ์ •๋Œ€๋ฆฝ": "์ด์„ฑ์  ํŒ๋‹จ์„ ์ค‘์‹œํ•˜๋ฉด์„œ๋„ ๊ฐ์ •์  ๊ฒฐ์ •์„ ์ž์ฃผ ๋‚ด๋ฆผ",
763
- "P06_๋…๋ฆฝ์˜์กด๋ชจ์ˆœ": "ํ™€๋กœ ์žˆ๊ธฐ๋ฅผ ์ข‹์•„ํ•˜๋ฉด์„œ๋„ ๊นŠ์€ ๊ด€๊ณ„๋ฅผ ๊ฐˆ๋งํ•จ",
764
- "P07_๋ณด์ˆ˜ํ˜์‹ ์–‘๋ฉด": "์•ˆ์ •์„ ์ถ”๊ตฌํ•˜๋ฉด์„œ๋„ ์ƒˆ๋กœ์šด ์‹œ๋„๋ฅผ ์ฆ๊น€",
765
- "P08_ํ™œ๋™์ •์ ๋Œ€๋น„": "ํ™œ๋ฐœํ•œ ํ–‰๋™๋ ฅ๊ณผ ์กฐ์šฉํ•œ ์‚ฌ์ƒ‰์„ ๋ชจ๋‘ ์ง€๋‹˜",
766
- "P09_์‚ฌ๊ต๋‚ดํ–ฅํ˜ผ์žฌ": "์‚ฌ๋žŒ๋“ค๊ณผ ์–ด์šธ๋ฆฌ๊ธฐ๋ฅผ ์ข‹์•„ํ•˜๋ฉด์„œ๋„ ํ˜ผ์ž๋งŒ์˜ ์‹œ๊ฐ„์ด ํ•„์š”ํ•จ",
767
- "P10_์ž์‹ ๊ฐ๋ถˆ์•ˆ๊ณต์กด": "์ž์‹ ๊ฐ ๋„˜์น˜๋Š” ๋ชจ์Šต๊ณผ ๋ถˆ์•ˆํ•œ ๋ชจ์Šต์ด ๊ณต์กดํ•จ"
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
768
  }
769
 
770
- return [contradiction_descriptions.get(c[0], c[0]) for c in top_contradictions]
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
771
 
772
  class HumorMatrix:
773
  """
@@ -1422,8 +1594,8 @@ class PersonaGenerator:
1422
  # ๐ŸŽญ PersonalityProfile์—์„œ ๋งค๋ ฅ์  ๊ฒฐํ•จ ๋™์  ์ƒ์„ฑ (์ด๋ฏธ์ง€ ๋ถ„์„๊ณผ ์„ฑ๊ฒฉ ํŠน์„ฑ ์ „๋‹ฌ)
1423
  attractive_flaws = personality_profile.generate_attractive_flaws(image_analysis, personality_traits)
1424
 
1425
- # ๐ŸŒˆ PersonalityProfile์—์„œ ๋ชจ์ˆœ์  ํŠน์„ฑ ๋™์  ์ƒ์„ฑ
1426
- contradictions = personality_profile.generate_contradictions()
1427
 
1428
  # ๐ŸŽช HumorMatrix ์ƒ์„ฑ ๋ฐ ํ™œ์šฉ
1429
  humor_matrix = HumorMatrix()
@@ -2129,7 +2301,14 @@ class PersonaGenerator:
2129
  attractive_flaws = personality_profile.generate_attractive_flaws()
2130
  else:
2131
  attractive_flaws = frontend_persona["๋งค๋ ฅ์ ๊ฒฐํ•จ"]
2132
- contradictions = frontend_persona.get("๋ชจ์ˆœ์ ํŠน์„ฑ", personality_profile.generate_contradictions())
 
 
 
 
 
 
 
2133
 
2134
  # ์ด๋ฏธ ์ƒ์„ฑ๋œ ์†Œํ†ต๋ฐฉ์‹ ํ™œ์šฉ
2135
  communication_style = frontend_persona.get("์†Œํ†ต๋ฐฉ์‹", self._generate_communication_style_from_profile(personality_profile))
 
749
  # ํด๋ฐฑ: ์„ฑ๊ฒฉ ๊ธฐ๋ฐ˜ ์„ ํƒ
750
  return random.sample(fallback_flaws, 4)
751
 
752
+ def generate_contradictions(self, object_analysis=None, personality_traits=None):
753
+ """AI ๊ธฐ๋ฐ˜ ๋ชจ์ˆœ์  ํŠน์„ฑ ์ƒ์„ฑ - ์‚ฌ๋ฌผ๊ณผ ์„ฑ๊ฒฉ์„ ๋ถ„์„ํ•˜์—ฌ ๋งํˆฌ๊นŒ์ง€ ๋“œ๋Ÿฌ๋‚˜๋Š” ๋…์ฐฝ์  ๋ชจ์ˆœ ์ƒ์„ฑ"""
754
  contradiction_vars = {k: v for k, v in self.variables.items() if k.startswith("P0")}
755
+ top_contradictions = sorted(contradiction_vars.items(), key=lambda x: x[1], reverse=True)[:3]
756
+
757
+ # ๊ธฐ๋ณธ ๋ชจ์ˆœ (AI ์ƒ์„ฑ ์‹คํŒจ ์‹œ ํด๋ฐฑ)
758
+ fallback_contradictions = [
759
+ "๊ฒ‰์œผ๋กœ๋Š” ๋ƒ‰์ •ํ•ด ๋ณด์ด์ง€๋งŒ, ์†์€ ๋”ฐ๋œปํ•œ ๋งˆ์Œ์„ ๊ฐ€์ง",
760
+ "๋…ผ๋ฆฌ์ ์ด๋ฉด์„œ๋„ ์ง๊ฐ์— ์˜์กดํ•˜๋Š” ์ด์ค‘์  ๋ฉด๋ชจ"
761
+ ]
762
+
763
+ # AI ๊ธฐ๋ฐ˜ ๋™์  ๋ชจ์ˆœ ์ƒ์„ฑ ์‹œ๋„
764
+ try:
765
+ # ์‚ฌ๋ฌผ ๋ถ„์„ ์ •๋ณด ์ถ”์ถœ
766
+ object_type = object_analysis.get("object_type", "์•Œ ์ˆ˜ ์—†๋Š” ์‚ฌ๋ฌผ") if object_analysis else "์‚ฌ๋ฌผ"
767
+ materials = object_analysis.get("materials", ["์•Œ ์ˆ˜ ์—†๋Š” ์žฌ์งˆ"]) if object_analysis else ["์žฌ์งˆ"]
768
+ material = materials[0] if materials else "์•Œ ์ˆ˜ ์—†๋Š” ์žฌ์งˆ"
769
+ size = object_analysis.get("size", "") if object_analysis else ""
770
+ condition = object_analysis.get("condition", "") if object_analysis else ""
771
+
772
+ # ์„ฑ๊ฒฉ ํŠน์„ฑ ์ถ”์ถœ (์‚ฌ์šฉ์ž ์กฐ์ •๊ฐ’ ๋ฐ˜์˜)
773
+ warmth = personality_traits.get("์˜จ๊ธฐ", 50) if personality_traits else 50
774
+ competence = personality_traits.get("๋Šฅ๋ ฅ", 50) if personality_traits else 50
775
+ extraversion = personality_traits.get("์™ธํ–ฅ์„ฑ", 50) if personality_traits else 50
776
+ humor = personality_traits.get("์œ ๋จธ๊ฐ๊ฐ", 75) if personality_traits else 75
777
+
778
+ # ์ฃผ์š” ๋ชจ์ˆœ ๊ฒฝํ–ฅ ๋ถ„์„
779
+ contradiction_tendencies = []
780
+ for contra_var, value in top_contradictions:
781
+ if value > 60:
782
+ if "์™ธ๋ฉด๋‚ด๋ฉด" in contra_var:
783
+ contradiction_tendencies.append("๊ฒ‰๊ณผ ์†์ด ๋‹ค๋ฆ„")
784
+ elif "์ƒํ™ฉ๋ณ„" in contra_var:
785
+ contradiction_tendencies.append("์ƒํ™ฉ์— ๋”ฐ๋ผ ๋ณ€ํ•จ")
786
+ elif "์‹œ๊ฐ„๋Œ€๋ณ„" in contra_var:
787
+ contradiction_tendencies.append("์‹œ๊ฐ„๋Œ€๋ณ„ ์„ฑ๊ฒฉ ๋ณ€ํ™”")
788
+ elif "๋…ผ๋ฆฌ๊ฐ์ •" in contra_var:
789
+ contradiction_tendencies.append("๋…ผ๋ฆฌ์™€ ๊ฐ์ •์˜ ๋Œ€๋ฆฝ")
790
+ elif "๋…๋ฆฝ์˜์กด" in contra_var:
791
+ contradiction_tendencies.append("๋…๋ฆฝ์„ฑ๊ณผ ์˜์กด์„ฑ์˜ ๊ณต์กด")
792
+ elif "ํ™œ๋™์ •์ " in contra_var:
793
+ contradiction_tendencies.append("ํ™œ๋™์ ์ด๋ฉด์„œ ์ •์ ")
794
+
795
+ # ์„ฑ๊ฒฉ ๊ทน๋‹จ๊ฐ’ ๋ถ„์„ (์‚ฌ์šฉ์ž ์กฐ์ • ๋ฐ˜์˜)
796
+ personality_extremes = []
797
+ if warmth >= 80:
798
+ personality_extremes.append("๋งค์šฐ ๋”ฐ๋œปํ•จ")
799
+ elif warmth <= 20:
800
+ personality_extremes.append("๋งค์šฐ ์ฐจ๊ฐ€์›€")
801
+
802
+ if competence >= 80:
803
+ personality_extremes.append("๋งค์šฐ ์œ ๋Šฅํ•จ")
804
+ elif competence <= 20:
805
+ personality_extremes.append("๋งค์šฐ ์„œํˆผ")
806
+
807
+ if extraversion >= 80:
808
+ personality_extremes.append("๋งค์šฐ ์™ธํ–ฅ์ ")
809
+ elif extraversion <= 20:
810
+ personality_extremes.append("๋งค์šฐ ๋‚ดํ–ฅ์ ")
811
+
812
+ # AI ํ”„๋กฌํ”„ํŠธ ์ƒ์„ฑ
813
+ ai_prompt = f"""
814
+ ๋‹ค์Œ ์ •๋ณด๋ฅผ ๋ฐ”ํƒ•์œผ๋กœ ๋งค๋ ฅ์ ์ด๊ณ  ๊ฐœ์„ฑ ์žˆ๋Š” '๋ชจ์ˆœ์  ํŠน์„ฑ' 2๊ฐœ๋ฅผ ์ƒ์„ฑํ•ด์ฃผ์„ธ์š”.
815
+
816
+ **์‚ฌ๋ฌผ ์ •๋ณด:**
817
+ - ์œ ํ˜•: {object_type}
818
+ - ์žฌ์งˆ: {material}
819
+ - ํฌ๊ธฐ: {size}
820
+ - ์ƒํƒœ: {condition}
821
+
822
+ **์„ฑ๊ฒฉ ํŠน์„ฑ (์‚ฌ์šฉ์ž ์กฐ์ •๊ฐ’):**
823
+ - ์˜จ๊ธฐ: {warmth}/100 ({'๋งค์šฐ ๋”ฐ๋œปํ•จ' if warmth >= 80 else '๋งค์šฐ ์ฐจ๊ฐ€์›€' if warmth <= 20 else '๋”ฐ๋œปํ•จ' if warmth >= 60 else '์ฐจ๊ฐ€์›€' if warmth <= 40 else '๋ณดํ†ต'})
824
+ - ๋Šฅ๋ ฅ: {competence}/100 ({'๋งค์šฐ ์œ ๋Šฅํ•จ' if competence >= 80 else '๋งค์šฐ ์„œํˆผ' if competence <= 20 else '์œ ๋Šฅํ•จ' if competence >= 60 else '์„œํˆผ' if competence <= 40 else '๋ณดํ†ต'})
825
+ - ์™ธํ–ฅ์„ฑ: {extraversion}/100 ({'๋งค์šฐ ํ™œ๋ฐœํ•จ' if extraversion >= 80 else '๋งค์šฐ ์กฐ์šฉํ•จ' if extraversion <= 20 else 'ํ™œ๋ฐœํ•จ' if extraversion >= 60 else '์กฐ์šฉํ•จ' if extraversion <= 40 else '๋ณดํ†ต'})
826
+
827
+ **๋ชจ์ˆœ ๊ฒฝํ–ฅ:** {', '.join(contradiction_tendencies) if contradiction_tendencies else '์ผ๋ฐ˜์ '}
828
+ **์„ฑ๊ฒฉ ๊ทน๋‹จ:** {', '.join(personality_extremes) if personality_extremes else '๊ท ํ˜•์ '}
829
+
830
+ **์ƒ์„ฑ ๊ฐ€์ด๋“œ๋ผ์ธ:**
831
+ 1. ์‚ฌ๋ฌผ์˜ ๋ฌผ๋ฆฌ์  ํŠน์„ฑ๊ณผ ์„ฑ๊ฒฉ์˜ ๋ชจ์ˆœ์„ ์ฐฝ์˜์ ์œผ๋กœ ์กฐํ•ฉํ•˜์„ธ์š”
832
+ 2. ์‚ฌ์šฉ์ž๊ฐ€ ์กฐ์ •ํ•œ ์„ฑ๊ฒฉ ์ˆ˜์น˜๊ฐ€ ๋ช…ํ™•ํžˆ ๋“œ๋Ÿฌ๋‚˜๋„๋ก ํ•˜์„ธ์š”
833
+ 3. ๋งํˆฌ์™€ ํ–‰๋™ ํŒจํ„ด์ด ๊ตฌ์ฒด์ ์œผ๋กœ ํ‘œํ˜„๋˜๋„๋ก ํ•˜์„ธ์š”
834
+ 4. ๊ฐ ๋ชจ์ˆœ์€ 25-35์ž ๋‚ด์™ธ๋กœ ์ƒ์„ธํ•˜๊ฒŒ
835
+ 5. ์‚ฌ๋ฌผ์˜ ๋ณธ๋ž˜ ํŠน์„ฑ๊ณผ ๋ถ€์—ฌ๋œ ์„ฑ๊ฒฉ์˜ ํฅ๋ฏธ๋กœ์šด ๋Œ€๋น„๋ฅผ ๋งŒ๋“œ์„ธ์š”
836
+ 6. ์ผ์ƒ์ ์ธ ์ƒํ™ฉ์—์„œ ๋“œ๋Ÿฌ๋‚˜๋Š” ๊ตฌ์ฒด์ ์ธ ๋ชจ์ˆœ์„ ํฌํ•จํ•˜์„ธ์š”
837
+
838
+ **์˜ˆ์‹œ (์ฐธ๊ณ ์šฉ):**
839
+ - ์Šคํ…Œ์ธ๋ฆฌ์Šค ํฌํŠธ (์˜จ๊ธฐ 90, ๋Šฅ๋ ฅ 30): "๋”ฐ๋œปํ•œ ๋งํˆฌ๋กœ ์œ„๋กœํ•˜์ง€๋งŒ ์ •์ž‘ ์ž์‹ ์€ ๋ฌผ ๋“์ด๊ธฐ๋„ ์„œํˆด๋Ÿฌ์„œ ๋‹นํ™ฉํ•จ"
840
+ - ํ”Œ๋ผ์Šคํ‹ฑ ์ธํ˜• (์™ธํ–ฅ์„ฑ 20, ์œ ๋จธ 80): "์กฐ์šฉํžˆ ๊ตฌ์„์— ์žˆ์œผ๋ฉด์„œ๋„ ํ˜ผ์žฃ๋ง๋กœ ์žฌ์น˜์žˆ๋Š” ๋†๋‹ด์„ ๊ณ„์† ์ค‘์–ผ๊ฑฐ๋ฆผ"
841
+
842
+ ๋ชจ์ˆœ์  ํŠน์„ฑ 2๊ฐœ๋ฅผ ๋ฒˆํ˜ธ ์—†์ด ์ค„๋ฐ”๊ฟˆ์œผ๋กœ ๊ตฌ๋ถ„ํ•˜์—ฌ ์ƒ์„ฑํ•ด์ฃผ์„ธ์š”:
843
+ """
844
+
845
+ # AI ์ƒ์„ฑ ์‹œ๋„
846
+ ai_response = self._generate_text_with_api(ai_prompt)
847
+
848
+ if ai_response and len(ai_response.strip()) > 20:
849
+ # AI ์‘๋‹ต ํŒŒ์‹ฑ
850
+ generated_contradictions = []
851
+ lines = ai_response.strip().split('\n')
852
+ for line in lines:
853
+ cleaned_line = line.strip()
854
+ # ๋ฒˆํ˜ธ๋‚˜ ๋ถˆํ•„์š”ํ•œ ๊ธฐํ˜ธ ์ œ๊ฑฐ
855
+ cleaned_line = cleaned_line.lstrip('1234567890.-โ€ข ')
856
+ if cleaned_line and len(cleaned_line) > 10:
857
+ generated_contradictions.append(cleaned_line)
858
+
859
+ # 2๊ฐœ ํ™•๋ณด
860
+ if len(generated_contradictions) >= 2:
861
+ return generated_contradictions[:2]
862
+ elif len(generated_contradictions) >= 1:
863
+ # ๋ถ€์กฑํ•œ ๋งŒํผ ํด๋ฐฑ์—์„œ ์ถ”๊ฐ€
864
+ generated_contradictions.append(fallback_contradictions[0])
865
+ return generated_contradictions
866
+
867
+ except Exception as e:
868
+ print(f"โš ๏ธ AI ๊ธฐ๋ฐ˜ ๋ชจ์ˆœ ์ƒ์„ฑ ์‹คํŒจ: {e}")
869
+ # ์˜ˆ์™ธ ๋ฐœ์ƒ ์‹œ ๋ชจ์˜ ๋ชจ์ˆœ ์ƒ์„ฑ ์‹œ๋„
870
+ try:
871
+ print(f"๐Ÿ”„ ๋ชจ์˜ ๋ชจ์ˆœ ์ƒ์„ฑ ์‹œ๋„: {object_type} + {material}")
872
+ return self._generate_mock_contradictions(object_type, material, warmth, competence, extraversion, humor)
873
+ except:
874
+ pass
875
+
876
+ # ํด๋ฐฑ: ๋ชจ์˜ ๋ชจ์ˆœ ์ƒ์„ฑ ๋งˆ์ง€๋ง‰ ์‹œ๋„
877
+ try:
878
+ print(f"๐Ÿ”„ ์ตœ์ข… ๋ชจ์˜ ๋ชจ์ˆœ ์ƒ์„ฑ: {object_type} + {material}")
879
+ mock_result = self._generate_mock_contradictions(object_type, material, warmth, competence, extraversion, humor)
880
+ if mock_result:
881
+ return mock_result
882
+ except Exception as mock_e:
883
+ print(f"๋ชจ์˜ ์ƒ์„ฑ๋„ ์‹คํŒจ: {mock_e}")
884
+
885
+ # ์ตœ์ข… ํด๋ฐฑ: ๊ธฐ๋ณธ ๋ชจ์ˆœ ์„ ํƒ
886
+ return fallback_contradictions
887
+
888
+ def _generate_mock_contradictions(self, object_type, material, warmth, competence, extraversion, humor):
889
+ """API ์‹คํŒจ ์‹œ ์‚ฌ๋ฌผ/์„ฑ๊ฒฉ ๊ธฐ๋ฐ˜ ๋ชจ์˜ ๋ชจ์ˆœ ์ƒ์„ฑ (๊ฐœ๋ฐœ์šฉ)"""
890
+ mock_contradictions = []
891
+
892
+ # ์‚ฌ๋ฌผ๊ณผ ์žฌ์งˆ์— ๋”ฐ๋ฅธ ๊ธฐ๋ณธ ๋ชจ์ˆœ
893
+ material_contradictions = {
894
+ "์Šคํ…Œ์ธ๋ฆฌ์Šค": ["๋‹จ๋‹จํ•œ ๊ฒ‰๋ชจ์Šต์ด์ง€๋งŒ ๋งˆ์Œ์€ ๋ถ€๋“œ๋Ÿฝ๋‹ค๊ณ  ๋งํ•จ", "์ฐจ๊ฐ€์›Œ ๋ณด์ด์ง€๋งŒ ๋œจ๊ฑฐ์šด ์—ด์ •์„ ๊ฐ์ถ”๊ณ  ์žˆ์Œ"],
895
+ "ํ”Œ๋ผ์Šคํ‹ฑ": ["๊ฐ€๋ฒผ์›Œ ๋ณด์ด์ง€๋งŒ ๋ฌด๊ฑฐ์šด ๊ณ ๋ฏผ์„ ์ž์ฃผ ํ•จ", "์ธ๊ณต์ ์ด๋ผ๊ณ  ๋†€๋ฆฌ๋ฉด ์„œ์šดํ•ดํ•˜๋ฉด์„œ๋„ '์ฒœ์—ฐ์ด ์ตœ๊ณ ์ฃ ' ๋ผ๊ณ  ๋™์กฐํ•จ"],
896
+ "๋ชฉ์žฌ": ["์ž์—ฐ์Šค๋Ÿฝ๋‹ค๊ณ  ์ž๋ถ€ํ•˜์ง€๋งŒ ์ธ์œ„์ ์ธ ๊ฐ€๊ณต์„ ๋ถ€๋„๋Ÿฌ์›Œํ•จ", "๋‹จ๋‹จํ•ด ๋ณด์ด์ง€๋งŒ ์Šต๊ธฐ๋งŒ ์žˆ์œผ๋ฉด ๋ฐ”๋กœ ๊ฑฑ์ •ํ•˜๊ธฐ ์‹œ์ž‘ํ•จ"],
897
+ "๋ฉด์ง๋ฌผ": ["๋ถ€๋“œ๋Ÿฝ๋‹ค๊ณ  ์นญ์ฐฌ๋ฐ›์œผ๋ฉด ๊ธฐ๋ปํ•˜๋ฉด์„œ๋„ '๋„ˆ๋ฌด ๋ง๋ž‘๋ง๋ž‘ํ•œ๊ฐ€?' ๊ฑฑ์ •ํ•จ", "ํฌ๊ทผํ•œ ์„ฑ๊ฒฉ์ด์ง€๋งŒ ๋จผ์ง€๊ฐ€ ๋ถ™์œผ๋ฉด ๊น”๋”๋–จ๊ธฐ ์‹œ์ž‘ํ•จ"],
898
+ "๊ธˆ์†": ["์ฐจ๊ฐ€์šด ์žฌ์งˆ์ด๋ผ๊ณ  ํ•˜๋ฉด ์„œ์šดํ•ดํ•˜๋ฉฐ '๋‚˜๋„ ๋”ฐ๋œปํ•  ์ˆ˜ ์žˆ์–ด!' ๋ผ๊ณ  ํ•ญ๋ณ€ํ•จ", "๋‹จ๋‹จํ•˜๋‹ค๊ณ  ์นญ์ฐฌ๋ฐ›์œผ๋ฉด ๊ธฐ๋ปํ•˜์ง€๋งŒ ๋…น์Šฌ๊นŒ๋ด ๋Š˜ ๋ถˆ์•ˆํ•ดํ•จ"]
899
  }
900
 
901
+ # ์„ฑ๊ฒฉ ๊ทน๋‹จ๊ฐ’์— ๋”ฐ๋ฅธ ๋ชจ์ˆœ
902
+ personality_contradictions = []
903
+
904
+ if warmth >= 80 and competence <= 30:
905
+ personality_contradictions.extend([
906
+ f"๋”ฐ๋œปํ•œ ๋ง๋กœ ์œ„๋กœํ•ด์ฃผ๋ ค ํ•˜์ง€๋งŒ ์ •์ž‘ ์ž์‹ ์˜ ์ผ์€ ์„œํˆด๋Ÿฌ์„œ ๋‹นํ™ฉํ•จ",
907
+ f"๋‹ค๋ฅธ ์‚ฌ๋žŒ ์ฑ™๊ธฐ๋Š” ๊ฑธ ์ข‹์•„ํ•˜๋ฉด์„œ๋„ '๋‚ด๊ฐ€ ๋ญ˜ ๋„์™€๋“œ๋ฆด ์ˆ˜ ์žˆ์„๊นŒ์š”...' ํ•˜๋ฉฐ ์ž์‹ ์—†์–ดํ•จ"
908
+ ])
909
+ elif warmth <= 30 and competence >= 80:
910
+ personality_contradictions.extend([
911
+ f"๋Šฅ๋ ฅ์€ ๋›ฐ์–ด๋‚˜์ง€๋งŒ ์นญ์ฐฌ๋ฐ›์œผ๋ฉด '๊ทธ๋Ÿฐ ๊ฑฐ ์•„๋‹Œ๋ฐ...' ํ•˜๋ฉฐ ์–ด์ƒ‰ํ•ดํ•จ",
912
+ f"์™„๋ฒฝํ•˜๊ฒŒ ์ผ์„ ์ฒ˜๋ฆฌํ•˜๊ณ ๋„ '์ด ์ •๋„๋ก  ๋ถ€์กฑํ•˜์ฃ ' ๋ผ๊ณ  ๊ฒธ์†๋– ๋Š” ์ฒ™ํ•จ"
913
+ ])
914
+
915
+ if extraversion <= 20 and humor >= 80:
916
+ personality_contradictions.extend([
917
+ f"์กฐ์šฉํžˆ ๊ตฌ์„์— ์žˆ์œผ๋ฉด์„œ๋„ ํ˜ผ์žฃ๋ง๋กœ ์žฌ์น˜์žˆ๋Š” ๋†๋‹ด์„ ๊ณ„์† ์ค‘์–ผ๊ฑฐ๋ฆผ",
918
+ f"๋ง์€ ๋ณ„๋กœ ์•ˆ ํ•˜์ง€๋งŒ ๊ฐ€๋” ๋˜์ง€๋Š” ํ•œ๋งˆ๋””๊ฐ€ ์ƒ๊ฐ๋ณด๋‹ค ์žฌ๋ฐŒ์–ด์„œ ์Šค์Šค๋กœ ๋†€๋žŒ"
919
+ ])
920
+ elif extraversion >= 80 and humor <= 30:
921
+ personality_contradictions.extend([
922
+ f"ํ™œ๋ฐœํ•˜๊ฒŒ ๋งํ•˜์ง€๋งŒ ๋†๋‹ด์€ ์ž˜ ๋ชปํ•ด์„œ '์ง€๊ธˆ ์›ƒ์œผ์…จ๋‚˜์š”?' ํ•˜๊ณ  ํ™•์ธํ•จ",
923
+ f"์‚ฌ๊ต์ ์ด๋ผ๊ณ  ํ•˜๋ฉด์„œ๋„ ์œ ๋จธ ์„ผ์Šค ์—†๋‹ค๋Š” ๋ง์—๋Š” ์ƒ์ฒ˜๋ฐ›์Œ"
924
+ ])
925
+
926
+ # ์„ฑ๊ฒฉ ๊ธฐ๋ฐ˜ ๋ชจ์ˆœ์„ ์šฐ์„  ์ถ”๊ฐ€ (์‚ฌ์šฉ์ž ์กฐ์ •๊ฐ’ ๋ฐ˜์˜)
927
+ mock_contradictions.extend(personality_contradictions)
928
+
929
+ # ์žฌ์งˆ๋ณ„ ๋ชจ์ˆœ ์ถ”๊ฐ€ (์„ฑ๊ฒฉ ๋ชจ์ˆœ์ด ์—†์„ ๋•Œ๋งŒ)
930
+ if not mock_contradictions:
931
+ for mat_key, mat_contradictions in material_contradictions.items():
932
+ if mat_key.lower() in material.lower():
933
+ mock_contradictions.extend(mat_contradictions)
934
+ break
935
+
936
+ # 2๊ฐœ ์„ ํƒ (์—†์œผ๋ฉด ๊ธฐ๋ณธ๊ฐ’)
937
+ if len(mock_contradictions) >= 2:
938
+ return mock_contradictions[:2]
939
+ elif len(mock_contradictions) >= 1:
940
+ return [mock_contradictions[0], "๋…ผ๋ฆฌ์ ์ด๋ฉด์„œ๋„ ์ง๊ฐ์— ์˜์กดํ•˜๋Š” ์ด์ค‘์  ๋ฉด๋ชจ"]
941
+ else:
942
+ return ["๊ฒ‰์œผ๋กœ๋Š” ๋ƒ‰์ •ํ•ด ๋ณด์ด์ง€๋งŒ, ์†์€ ๋”ฐ๋œปํ•œ ๋งˆ์Œ์„ ๊ฐ€์ง", "๋…ผ๋ฆฌ์ ์ด๋ฉด์„œ๋„ ์ง๊ฐ์— ์˜์กดํ•˜๋Š” ์ด์ค‘์  ๋ฉด๋ชจ"]
943
 
944
  class HumorMatrix:
945
  """
 
1594
  # ๐ŸŽญ PersonalityProfile์—์„œ ๋งค๋ ฅ์  ๊ฒฐํ•จ ๋™์  ์ƒ์„ฑ (์ด๋ฏธ์ง€ ๋ถ„์„๊ณผ ์„ฑ๊ฒฉ ํŠน์„ฑ ์ „๋‹ฌ)
1595
  attractive_flaws = personality_profile.generate_attractive_flaws(image_analysis, personality_traits)
1596
 
1597
+ # ๐ŸŒˆ PersonalityProfile์—์„œ ๋ชจ์ˆœ์  ํŠน์„ฑ ๋™์  ์ƒ์„ฑ (์ด๋ฏธ์ง€ ๋ถ„์„๊ณผ ์„ฑ๊ฒฉ ํŠน์„ฑ ์ „๋‹ฌ)
1598
+ contradictions = personality_profile.generate_contradictions(image_analysis, personality_traits)
1599
 
1600
  # ๐ŸŽช HumorMatrix ์ƒ์„ฑ ๋ฐ ํ™œ์šฉ
1601
  humor_matrix = HumorMatrix()
 
2301
  attractive_flaws = personality_profile.generate_attractive_flaws()
2302
  else:
2303
  attractive_flaws = frontend_persona["๋งค๋ ฅ์ ๊ฒฐํ•จ"]
2304
+ # AI ๊ธฐ๋ฐ˜ ๋ชจ์ˆœ ์ƒ์„ฑ ์‹œ๋„ (์ด๋ฏธ์ง€ ๋ถ„์„๊ณผ ์„ฑ๊ฒฉ ํŠน์„ฑ ์ „๋‹ฌ)
2305
+ if "๋ชจ์ˆœ์ ํŠน์„ฑ" not in frontend_persona:
2306
+ try:
2307
+ contradictions = personality_profile.generate_contradictions(image_analysis, frontend_persona.get("์„ฑ๊ฒฉํŠน์„ฑ", {}))
2308
+ except:
2309
+ contradictions = personality_profile.generate_contradictions()
2310
+ else:
2311
+ contradictions = frontend_persona["๋ชจ์ˆœ์ ํŠน์„ฑ"]
2312
 
2313
  # ์ด๋ฏธ ์ƒ์„ฑ๋œ ์†Œํ†ต๋ฐฉ์‹ ํ™œ์šฉ
2314
  communication_style = frontend_persona.get("์†Œํ†ต๋ฐฉ์‹", self._generate_communication_style_from_profile(personality_profile))
test_contradiction_ai.py ADDED
@@ -0,0 +1,130 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #!/usr/bin/env python3
2
+ # -*- coding: utf-8 -*-
3
+
4
+ import sys
5
+ import os
6
+ sys.path.append(os.path.dirname(os.path.abspath(__file__)))
7
+
8
+ from modules.persona_generator import PersonalityProfile
9
+
10
+ def test_ai_contradiction_generation():
11
+ """AI ๊ธฐ๋ฐ˜ ๋ชจ์ˆœ์  ํŠน์„ฑ ์ƒ์„ฑ ํ…Œ์ŠคํŠธ"""
12
+
13
+ # ํ…Œ์ŠคํŠธ ์‹œ๋‚˜๋ฆฌ์˜ค 1: ๊ธˆ์† ์ „๊ธฐํฌํŠธ (์˜จ๊ธฐ ๋†’์Œ, ๋Šฅ๋ ฅ ๋‚ฎ์Œ)
14
+ print("๐Ÿ”ฅ ํ…Œ์ŠคํŠธ 1: ์Šคํ…Œ์ธ๋ฆฌ์Šค ์ „๊ธฐํฌํŠธ (์˜จ๊ธฐ 90, ๋Šฅ๋ ฅ 20)")
15
+ print("=" * 60)
16
+
17
+ object_analysis_1 = {
18
+ "object_type": "์ „๊ธฐํฌํŠธ",
19
+ "materials": ["์Šคํ…Œ์ธ๋ฆฌ์Šค ์Šคํ‹ธ", "ํ”Œ๋ผ์Šคํ‹ฑ"],
20
+ "colors": ["์€์ƒ‰", "๊ฒ€์€์ƒ‰"],
21
+ "size": "์ค‘๊ฐ„ ํฌ๊ธฐ",
22
+ "condition": "์–‘ํ˜ธํ•จ",
23
+ "estimated_age": "1๋…„ ์ •๋„"
24
+ }
25
+
26
+ personality_traits_1 = {
27
+ "์˜จ๊ธฐ": 90,
28
+ "๋Šฅ๋ ฅ": 20,
29
+ "์™ธํ–ฅ์„ฑ": 60,
30
+ "์œ ๋จธ๊ฐ๊ฐ": 80
31
+ }
32
+
33
+ profile1 = PersonalityProfile()
34
+ contradictions1 = profile1.generate_contradictions(object_analysis_1, personality_traits_1)
35
+
36
+ print("๐Ÿ“ ์ƒ์„ฑ๋œ ๋ชจ์ˆœ์  ํŠน์„ฑ:")
37
+ for i, contradiction in enumerate(contradictions1, 1):
38
+ print(f" {i}. {contradiction}")
39
+ print()
40
+
41
+ # ํ…Œ์ŠคํŠธ ์‹œ๋‚˜๋ฆฌ์˜ค 2: ํ”Œ๋ผ์Šคํ‹ฑ ์ธํ˜• (์™ธํ–ฅ์„ฑ ๋‚ฎ์Œ, ์œ ๋จธ ๋†’์Œ)
42
+ print("๐Ÿงธ ํ…Œ์ŠคํŠธ 2: ํ”Œ๋ผ์Šคํ‹ฑ ์ธํ˜• (์™ธํ–ฅ์„ฑ 10, ์œ ๋จธ๊ฐ๊ฐ 95)")
43
+ print("=" * 60)
44
+
45
+ object_analysis_2 = {
46
+ "object_type": "์ธํ˜•",
47
+ "materials": ["ํ”Œ๋ผ์Šคํ‹ฑ", "๋ฉด์ง๋ฌผ"],
48
+ "colors": ["๋ถ„ํ™์ƒ‰", "ํฐ์ƒ‰"],
49
+ "size": "์ž‘์€ ํฌ๊ธฐ",
50
+ "condition": "๋‚ก์Œ",
51
+ "estimated_age": "์˜ค๋ž˜๋จ"
52
+ }
53
+
54
+ personality_traits_2 = {
55
+ "์˜จ๊ธฐ": 75,
56
+ "๋Šฅ๋ ฅ": 40,
57
+ "์™ธํ–ฅ์„ฑ": 10,
58
+ "์œ ๋จธ๊ฐ๊ฐ": 95
59
+ }
60
+
61
+ profile2 = PersonalityProfile()
62
+ contradictions2 = profile2.generate_contradictions(object_analysis_2, personality_traits_2)
63
+
64
+ print("๐Ÿ“ ์ƒ์„ฑ๋œ ๋ชจ์ˆœ์  ํŠน์„ฑ:")
65
+ for i, contradiction in enumerate(contradictions2, 1):
66
+ print(f" {i}. {contradiction}")
67
+ print()
68
+
69
+ # ํ…Œ์ŠคํŠธ ์‹œ๋‚˜๋ฆฌ์˜ค 3: ๋ชฉ์žฌ ์—ฐํ•„ (๋Šฅ๋ ฅ ๋†’์Œ, ์˜จ๊ธฐ ๋‚ฎ์Œ)
70
+ print("โœ๏ธ ํ…Œ์ŠคํŠธ 3: ๋ชฉ์žฌ ์—ฐํ•„ (๋Šฅ๋ ฅ 95, ์˜จ๊ธฐ 15)")
71
+ print("=" * 60)
72
+
73
+ object_analysis_3 = {
74
+ "object_type": "์—ฐํ•„",
75
+ "materials": ["๋ชฉ์žฌ", "ํ‘์—ฐ"],
76
+ "colors": ["๋…ธ๋ž€์ƒ‰", "์€์ƒ‰"],
77
+ "size": "์ž‘์€ ํฌ๊ธฐ",
78
+ "condition": "์‚ฌ์šฉ๋จ",
79
+ "estimated_age": "๋ช‡ ๊ฐœ์›”"
80
+ }
81
+
82
+ personality_traits_3 = {
83
+ "์˜จ๊ธฐ": 15,
84
+ "๋Šฅ๋ ฅ": 95,
85
+ "์™ธํ–ฅ์„ฑ": 30,
86
+ "์œ ๋จธ๊ฐ๊ฐ": 40
87
+ }
88
+
89
+ profile3 = PersonalityProfile()
90
+ contradictions3 = profile3.generate_contradictions(object_analysis_3, personality_traits_3)
91
+
92
+ print("๐Ÿ“ ์ƒ์„ฑ๋œ ๋ชจ์ˆœ์  ํŠน์„ฑ:")
93
+ for i, contradiction in enumerate(contradictions3, 1):
94
+ print(f" {i}. {contradiction}")
95
+ print()
96
+
97
+ # ํ…Œ์ŠคํŠธ ์‹œ๋‚˜๋ฆฌ์˜ค 4: ์ฒœ ์†Œ์žฌ ์ฟ ์…˜ (๋ชจ๋“  ๊ฐ’ ๊ทน๋‹จ)
98
+ print("๐Ÿ›‹๏ธ ํ…Œ์ŠคํŠธ 4: ์ฒœ ์†Œ์žฌ ์ฟ ์…˜ (์˜จ๊ธฐ 100, ์™ธํ–ฅ์„ฑ 5)")
99
+ print("=" * 60)
100
+
101
+ object_analysis_4 = {
102
+ "object_type": "์ฟ ์…˜",
103
+ "materials": ["๋ฉด์ง๋ฌผ", "์†œ"],
104
+ "colors": ["๋ฒ ์ด์ง€์ƒ‰"],
105
+ "size": "์ค‘๊ฐ„ ํฌ๊ธฐ",
106
+ "condition": "๋งค์šฐ ์ข‹์Œ",
107
+ "estimated_age": "์ƒˆ๊ฒƒ"
108
+ }
109
+
110
+ personality_traits_4 = {
111
+ "์˜จ๊ธฐ": 100,
112
+ "๋Šฅ๋ ฅ": 60,
113
+ "์™ธํ–ฅ์„ฑ": 5,
114
+ "์œ ๋จธ๊ฐ๊ฐ": 85
115
+ }
116
+
117
+ profile4 = PersonalityProfile()
118
+ contradictions4 = profile4.generate_contradictions(object_analysis_4, personality_traits_4)
119
+
120
+ print("๐Ÿ“ ์ƒ์„ฑ๋œ ๋ชจ์ˆœ์  ํŠน์„ฑ:")
121
+ for i, contradiction in enumerate(contradictions4, 1):
122
+ print(f" {i}. {contradiction}")
123
+ print()
124
+
125
+ print("๐ŸŽฏ ๊ฒฐ๋ก :")
126
+ print("๊ฐ ํ…Œ์ŠคํŠธ๋งˆ๋‹ค ์‚ฌ๋ฌผ์˜ ํŠน์„ฑ๊ณผ ์„ฑ๊ฒฉ ์กฐ์ •๊ฐ’์ด ๋ฐ˜์˜๋œ")
127
+ print("์ฐฝ์˜์ ์ด๊ณ  ๋งํˆฌ๊ฐ€ ๋“œ๋Ÿฌ๋‚˜๋Š” ๋ชจ์ˆœ์  ํŠน์„ฑ์ด ์ƒ์„ฑ๋˜์—ˆ๋Š”์ง€ ํ™•์ธํ•ด๋ณด์„ธ์š”!")
128
+
129
+ if __name__ == "__main__":
130
+ test_ai_contradiction_generation()
test_contradiction_extreme.py ADDED
@@ -0,0 +1,134 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #!/usr/bin/env python3
2
+ # -*- coding: utf-8 -*-
3
+
4
+ import sys
5
+ import os
6
+ sys.path.append(os.path.dirname(os.path.abspath(__file__)))
7
+
8
+ from modules.persona_generator import PersonalityProfile
9
+
10
+ def test_extreme_personality_contradictions():
11
+ """๊ทน๋‹จ์ ์ธ ์„ฑ๊ฒฉ ์กฐํ•ฉ ํ…Œ์ŠคํŠธ - ์‚ฌ์šฉ์ž ์กฐ์ •๊ฐ’์ด ํ™•์‹คํžˆ ๋“œ๋Ÿฌ๋‚˜๋Š”์ง€ ํ™•์ธ"""
12
+
13
+ # ํ…Œ์ŠคํŠธ 1: ์Šคํ…Œ์ธ๋ฆฌ์Šค ์‹œ๊ณ„ (์˜จ๊ธฐ 100, ๋Šฅ๋ ฅ 5) - ๊ทน๋‹จ ๋Œ€๋น„
14
+ print("โฐ ํ…Œ์ŠคํŠธ 1: ์Šคํ…Œ์ธ๋ฆฌ์Šค ์‹œ๊ณ„ (์˜จ๊ธฐ 100, ๋Šฅ๋ ฅ 5)")
15
+ print("=" * 60)
16
+
17
+ object_analysis_1 = {
18
+ "object_type": "์‹œ๊ณ„",
19
+ "materials": ["์Šคํ…Œ์ธ๋ฆฌ์Šค ์Šคํ‹ธ"],
20
+ "colors": ["์€์ƒ‰"],
21
+ "size": "์ค‘๊ฐ„ ํฌ๊ธฐ",
22
+ "condition": "์ข‹์Œ",
23
+ "estimated_age": "์ƒˆ๊ฒƒ"
24
+ }
25
+
26
+ personality_traits_1 = {
27
+ "์˜จ๊ธฐ": 100,
28
+ "๋Šฅ๋ ฅ": 5,
29
+ "์™ธํ–ฅ์„ฑ": 50,
30
+ "์œ ๋จธ๊ฐ๊ฐ": 50
31
+ }
32
+
33
+ profile1 = PersonalityProfile()
34
+ contradictions1 = profile1.generate_contradictions(object_analysis_1, personality_traits_1)
35
+
36
+ print("๐Ÿ“ ์ƒ์„ฑ๋œ ๋ชจ์ˆœ์  ํŠน์„ฑ:")
37
+ for i, contradiction in enumerate(contradictions1, 1):
38
+ print(f" {i}. {contradiction}")
39
+ print("โœ… ์˜ˆ์ƒ: ๋”ฐ๋œปํ•จ + ์„œํˆผ์ด ๋“œ๋Ÿฌ๋‚˜์•ผ ํ•จ")
40
+ print()
41
+
42
+ # ํ…Œ์ŠคํŠธ 2: ํ”Œ๋ผ์Šคํ‹ฑ ๋กœ๋ด‡ (์˜จ๊ธฐ 5, ๋Šฅ๋ ฅ 100) - ๋ฐ˜๋Œ€ ๊ทน๋‹จ
43
+ print("๐Ÿค– ํ…Œ์ŠคํŠธ 2: ํ”Œ๋ผ์Šคํ‹ฑ ๋กœ๋ด‡ (์˜จ๊ธฐ 5, ๋Šฅ๋ ฅ 100)")
44
+ print("=" * 60)
45
+
46
+ object_analysis_2 = {
47
+ "object_type": "๋กœ๋ด‡",
48
+ "materials": ["ํ”Œ๋ผ์Šคํ‹ฑ", "๊ธˆ์†"],
49
+ "colors": ["ํฐ์ƒ‰", "ํŒŒ๋ž€์ƒ‰"],
50
+ "size": "์ค‘๊ฐ„ ํฌ๊ธฐ",
51
+ "condition": "์ƒˆ๊ฒƒ",
52
+ "estimated_age": "์ƒˆ๊ฒƒ"
53
+ }
54
+
55
+ personality_traits_2 = {
56
+ "์˜จ๊ธฐ": 5,
57
+ "๋Šฅ๋ ฅ": 100,
58
+ "์™ธํ–ฅ์„ฑ": 50,
59
+ "์œ ๋จธ๊ฐ๊ฐ": 50
60
+ }
61
+
62
+ profile2 = PersonalityProfile()
63
+ contradictions2 = profile2.generate_contradictions(object_analysis_2, personality_traits_2)
64
+
65
+ print("๐Ÿ“ ์ƒ์„ฑ๋œ ๋ชจ์ˆœ์  ํŠน์„ฑ:")
66
+ for i, contradiction in enumerate(contradictions2, 1):
67
+ print(f" {i}. {contradiction}")
68
+ print("โœ… ์˜ˆ์ƒ: ์ฐจ๊ฐ€์›€ + ๋›ฐ์–ด๋‚œ ๋Šฅ๋ ฅ์ด ๋“œ๋Ÿฌ๋‚˜์•ผ ํ•จ")
69
+ print()
70
+
71
+ # ํ…Œ์ŠคํŠธ 3: ๋ฉด ์ธํ˜• (์™ธํ–ฅ์„ฑ 5, ์œ ๋จธ 100) - ๋‚ดํ–ฅ์  ์œ ๋จธ๋Ÿฌ์Šค
72
+ print("๐Ÿงธ ํ…Œ์ŠคํŠธ 3: ๋ฉด ์ธํ˜• (์™ธํ–ฅ์„ฑ 5, ์œ ๋จธ 100)")
73
+ print("=" * 60)
74
+
75
+ object_analysis_3 = {
76
+ "object_type": "์ธํ˜•",
77
+ "materials": ["๋ฉด์ง๋ฌผ", "์†œ"],
78
+ "colors": ["๋ถ„ํ™์ƒ‰"],
79
+ "size": "์ž‘์€ ํฌ๊ธฐ",
80
+ "condition": "์˜ค๋ž˜๋จ",
81
+ "estimated_age": "์˜ค๋ž˜๋จ"
82
+ }
83
+
84
+ personality_traits_3 = {
85
+ "์˜จ๊ธฐ": 70,
86
+ "๋Šฅ๋ ฅ": 50,
87
+ "์™ธํ–ฅ์„ฑ": 5,
88
+ "์œ ๋จธ๊ฐ๊ฐ": 100
89
+ }
90
+
91
+ profile3 = PersonalityProfile()
92
+ contradictions3 = profile3.generate_contradictions(object_analysis_3, personality_traits_3)
93
+
94
+ print("๐Ÿ“ ์ƒ์„ฑ๋œ ๋ชจ์ˆœ์  ํŠน์„ฑ:")
95
+ for i, contradiction in enumerate(contradictions3, 1):
96
+ print(f" {i}. {contradiction}")
97
+ print("โœ… ์˜ˆ์ƒ: ์กฐ์šฉํ•จ + ๋›ฐ์–ด๋‚œ ์œ ๋จธ ๊ฐ๊ฐ์ด ๋“œ๋Ÿฌ๋‚˜์•ผ ํ•จ")
98
+ print()
99
+
100
+ # ํ…Œ์ŠคํŠธ 4: ๋ชฉ์žฌ ํŠธ๋กœํ”ผ (์™ธํ–ฅ์„ฑ 100, ์œ ๋จธ 5) - ์™ธํ–ฅ์ ์ด์ง€๋งŒ ์œ ๋จธ์—†์Œ
101
+ print("๐Ÿ† ํ…Œ์ŠคํŠธ 4: ๋ชฉ์žฌ ํŠธ๋กœํ”ผ (์™ธํ–ฅ์„ฑ 100, ์œ ๋จธ 5)")
102
+ print("=" * 60)
103
+
104
+ object_analysis_4 = {
105
+ "object_type": "ํŠธ๋กœํ”ผ",
106
+ "materials": ["๋ชฉ์žฌ", "๊ธˆ์†"],
107
+ "colors": ["๊ธˆ์ƒ‰", "๊ฐˆ์ƒ‰"],
108
+ "size": "ํฐ ํฌ๊ธฐ",
109
+ "condition": "์ข‹์Œ",
110
+ "estimated_age": "๋ช‡ ๋…„"
111
+ }
112
+
113
+ personality_traits_4 = {
114
+ "์˜จ๊ธฐ": 60,
115
+ "๋Šฅ๋ ฅ": 80,
116
+ "์™ธํ–ฅ์„ฑ": 100,
117
+ "์œ ๋จธ๊ฐ๊ฐ": 5
118
+ }
119
+
120
+ profile4 = PersonalityProfile()
121
+ contradictions4 = profile4.generate_contradictions(object_analysis_4, personality_traits_4)
122
+
123
+ print("๐Ÿ“ ์ƒ์„ฑ๋œ ๋ชจ์ˆœ์  ํŠน์„ฑ:")
124
+ for i, contradiction in enumerate(contradictions4, 1):
125
+ print(f" {i}. {contradiction}")
126
+ print("โœ… ์˜ˆ์ƒ: ํ™œ๋ฐœํ•จ + ์œ ๋จธ ๋ถ€์กฑ์ด ๋“œ๋Ÿฌ๋‚˜์•ผ ํ•จ")
127
+ print()
128
+
129
+ print("๐ŸŽฏ ๊ทน๋‹จ ํ…Œ์ŠคํŠธ ๊ฒฐ๋ก :")
130
+ print("์‚ฌ์šฉ์ž๊ฐ€ ์กฐ์ •ํ•œ ๊ทน๋‹จ์ ์ธ ์„ฑ๊ฒฉ ์ˆ˜์น˜๋“ค์ด")
131
+ print("๋ชจ์ˆœ์  ํŠน์„ฑ์—์„œ ๊ตฌ์ฒด์ ์ธ ๋งํˆฌ์™€ ํ–‰๋™์œผ๋กœ ๋“œ๋Ÿฌ๋‚˜๋Š”์ง€ ํ™•์ธ!")
132
+
133
+ if __name__ == "__main__":
134
+ test_extreme_personality_contradictions()