Spaces:
Sleeping
Sleeping
kanhatakeyama
commited on
Update app.py
Browse files
app.py
CHANGED
@@ -18,13 +18,13 @@ client = OpenAI(
|
|
18 |
def respond(
|
19 |
message,
|
20 |
history: list[tuple[str, str]],
|
21 |
-
|
22 |
max_tokens,
|
23 |
temperature,
|
24 |
top_p,
|
25 |
):
|
26 |
messages = [
|
27 |
-
{"role": "system", "content":
|
28 |
|
29 |
for val in history:
|
30 |
if val[0]:
|
@@ -89,7 +89,7 @@ def run():
|
|
89 |
label="Parameters", open=False, render=False
|
90 |
),
|
91 |
additional_inputs=[
|
92 |
-
|
93 |
gr.Slider(
|
94 |
minimum=1,
|
95 |
maximum=4096,
|
|
|
18 |
def respond(
|
19 |
message,
|
20 |
history: list[tuple[str, str]],
|
21 |
+
system_message,
|
22 |
max_tokens,
|
23 |
temperature,
|
24 |
top_p,
|
25 |
):
|
26 |
messages = [
|
27 |
+
{"role": "system", "content": system_message}]
|
28 |
|
29 |
for val in history:
|
30 |
if val[0]:
|
|
|
89 |
label="Parameters", open=False, render=False
|
90 |
),
|
91 |
additional_inputs=[
|
92 |
+
gr.Textbox(value="以下は、タスクを説明する指示です。要求を適切に満たす応答を書きなさい。", label="System message"),
|
93 |
gr.Slider(
|
94 |
minimum=1,
|
95 |
maximum=4096,
|