Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -70,7 +70,7 @@ def get_summary(model, text):
|
|
70 |
|
71 |
Only produce the summary after fully reading and understanding the input text.
|
72 |
"""}]
|
73 |
-
messages.append({"role":
|
74 |
|
75 |
|
76 |
request_params = {
|
@@ -80,7 +80,7 @@ Only produce the summary after fully reading and understanding the input text.
|
|
80 |
"max_tokens": 1000,
|
81 |
"temperature": 0.2,
|
82 |
#"frequency_penalty": 0.2,
|
83 |
-
|
84 |
}
|
85 |
if tools:
|
86 |
request_params.update({"tool_choice": "auto", "tools": tools})
|
@@ -108,7 +108,7 @@ def completion(history, model, system_prompt: str, tools=None):
|
|
108 |
"max_tokens": 1000,
|
109 |
"temperature": 0.2,
|
110 |
#"frequency_penalty": 0.2,
|
111 |
-
"extra_body": {"repetition_penalty": 1.
|
112 |
}
|
113 |
if tools:
|
114 |
request_params.update({"tool_choice": "auto", "tools": tools})
|
|
|
70 |
|
71 |
Only produce the summary after fully reading and understanding the input text.
|
72 |
"""}]
|
73 |
+
messages.append({"role": "user", "content": f"**TEXT**:\n\n{text}"})
|
74 |
|
75 |
|
76 |
request_params = {
|
|
|
80 |
"max_tokens": 1000,
|
81 |
"temperature": 0.2,
|
82 |
#"frequency_penalty": 0.2,
|
83 |
+
"extra_body": {"repetition_penalty": 1.1},
|
84 |
}
|
85 |
if tools:
|
86 |
request_params.update({"tool_choice": "auto", "tools": tools})
|
|
|
108 |
"max_tokens": 1000,
|
109 |
"temperature": 0.2,
|
110 |
#"frequency_penalty": 0.2,
|
111 |
+
"extra_body": {"repetition_penalty": 1.1},
|
112 |
}
|
113 |
if tools:
|
114 |
request_params.update({"tool_choice": "auto", "tools": tools})
|