Spaces:
Sleeping
Sleeping
response = openai_client.chat.completions.create(
Browse files
app.py
CHANGED
|
@@ -56,9 +56,12 @@ def generate_new_article(lesson_words, original_article, original_word_count, ba
|
|
| 56 |
"Original Article" for Reference: The example provided is {original_article}。This article serves as a model for the spirit, style, and rhythmic pattern to be emulated.
|
| 57 |
"""
|
| 58 |
|
| 59 |
-
response = openai_client.
|
| 60 |
-
model="
|
| 61 |
-
|
|
|
|
|
|
|
|
|
|
| 62 |
max_tokens=1000
|
| 63 |
)
|
| 64 |
|
|
|
|
| 56 |
"Original Article" for Reference: The example provided is {original_article}。This article serves as a model for the spirit, style, and rhythmic pattern to be emulated.
|
| 57 |
"""
|
| 58 |
|
| 59 |
+
response = openai_client.chat.completions.create(
|
| 60 |
+
model="gpt-4-0125-preview",
|
| 61 |
+
messages=[
|
| 62 |
+
{"role": "system", "content": "You are a creative writer specialized in Chinese Children book. You will help me write Chinese Articles."},
|
| 63 |
+
{"role": "user", "content": prompt}
|
| 64 |
+
],
|
| 65 |
max_tokens=1000
|
| 66 |
)
|
| 67 |
|