Update app.py
Browse files
app.py
CHANGED
|
@@ -6,7 +6,7 @@ import json
|
|
| 6 |
|
| 7 |
openai.api_key = os.environ.get("OPENAI_API_KEY")
|
| 8 |
|
| 9 |
-
prompt = "
|
| 10 |
model_engine = "gpt-3.5-turbo"
|
| 11 |
temperature = 0.5
|
| 12 |
max_tokens = 1024
|
|
@@ -15,7 +15,7 @@ stop_sequence = "\n\n"
|
|
| 15 |
def generate_debate_content(topic):
|
| 16 |
prompt_with_topic = prompt + topic
|
| 17 |
response = openai.ChatCompletion.create(
|
| 18 |
-
|
| 19 |
prompt=prompt_with_topic,
|
| 20 |
temperature=temperature,
|
| 21 |
max_tokens=max_tokens,
|
|
|
|
| 6 |
|
| 7 |
openai.api_key = os.environ.get("OPENAI_API_KEY")
|
| 8 |
|
| 9 |
+
prompt = "你现在同时扮演AI和人类,针对以下主题进行中文辩论,AI要尽量理性,人类要尽量情绪化,每句话前面标识是谁说的,不少于50句话。"
|
| 10 |
model_engine = "gpt-3.5-turbo"
|
| 11 |
temperature = 0.5
|
| 12 |
max_tokens = 1024
|
|
|
|
| 15 |
def generate_debate_content(topic):
|
| 16 |
prompt_with_topic = prompt + topic
|
| 17 |
response = openai.ChatCompletion.create(
|
| 18 |
+
model=model_engine,
|
| 19 |
prompt=prompt_with_topic,
|
| 20 |
temperature=temperature,
|
| 21 |
max_tokens=max_tokens,
|