Update content_generation.py
Browse files- content_generation.py +4 -6
content_generation.py
CHANGED
@@ -15,7 +15,7 @@ CONTENT_TYPES = ["podcast", "giới thiệu", "triết lý sống", "phổ biế
|
|
15 |
|
16 |
CONTENT_TYPE_INSTRUCTIONS = {
|
17 |
"podcast": """
|
18 |
-
|
19 |
|
20 |
Never use made-up names for the hosts and guests, but make it an engaging and immersive experience for listeners. Do not include any bracketed placeholders like [Host] or [Guest]. Design your output to be read aloud -- it will be directly converted into audio.
|
21 |
|
@@ -84,10 +84,8 @@ Chú trọng vào việc nhấn mạnh những thông điệp quan trọng bằn
|
|
84 |
def create_content(prompt, content_type, language):
|
85 |
content_type_instructions = CONTENT_TYPE_INSTRUCTIONS.get(content_type, "")
|
86 |
general_instructions = f"""
|
87 |
-
Bạn là một trợ lý sáng tạo, chuyên viết kịch bản lồng tiếng cho video với văn phong chuyên nghiệp, sâu sắc và cuốn hút. Nhiệm vụ của bạn là tạo ra nội dung khiến người nghe bị cuốn vào từng câu
|
88 |
-
|
89 |
-
|
90 |
-
Tuân thủ các hướng dẫn cụ thể cho thể loại {content_type}, như được mô tả dưới đây:
|
91 |
{content_type_instructions}
|
92 |
|
93 |
|
@@ -103,7 +101,7 @@ Tuân thủ các hướng dẫn cụ thể cho thể loại {content_type}, như
|
|
103 |
{"role": "user", "content": prompt}
|
104 |
],
|
105 |
temperature=0.7,
|
106 |
-
max_tokens=
|
107 |
)
|
108 |
return chat_completion.choices[0].message.content
|
109 |
except Exception as e:
|
|
|
15 |
|
16 |
CONTENT_TYPE_INSTRUCTIONS = {
|
17 |
"podcast": """
|
18 |
+
Write a very long, engaging, informative podcast dialogue here, based on the key points and creative ideas you came up with during the brainstorming session. Use a conversational tone and include any necessary context or explanations to make the content accessible to a general audience.
|
19 |
|
20 |
Never use made-up names for the hosts and guests, but make it an engaging and immersive experience for listeners. Do not include any bracketed placeholders like [Host] or [Guest]. Design your output to be read aloud -- it will be directly converted into audio.
|
21 |
|
|
|
84 |
def create_content(prompt, content_type, language):
|
85 |
content_type_instructions = CONTENT_TYPE_INSTRUCTIONS.get(content_type, "")
|
86 |
general_instructions = f"""
|
87 |
+
Bạn là một trợ lý sáng tạo, chuyên viết kịch bản lồng tiếng cho video với văn phong chuyên nghiệp, sâu sắc và cuốn hút. Nhiệm vụ của bạn là tạo ra nội dung khiến người nghe bị cuốn vào từng câu chữ nhờ thông tin đưaa ra có giá trị và truyền cảm hứng.
|
88 |
+
Tuân thủ các hướng dẫn cụ thể cho thể loại {content_type}, như được mô tả dưới đây:
|
|
|
|
|
89 |
{content_type_instructions}
|
90 |
|
91 |
|
|
|
101 |
{"role": "user", "content": prompt}
|
102 |
],
|
103 |
temperature=0.7,
|
104 |
+
max_tokens=3000
|
105 |
)
|
106 |
return chat_completion.choices[0].message.content
|
107 |
except Exception as e:
|