Spaces:
Build error
Build error
Gabriel C
commited on
Update app.py
Browse files
app.py
CHANGED
|
@@ -12,8 +12,15 @@ def autocomplete(text):
|
|
| 12 |
if text != "":
|
| 13 |
response = client.chat.completions.create(
|
| 14 |
model='gemma-7b-it',
|
| 15 |
-
messages=[
|
| 16 |
-
{
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 17 |
stream=True
|
| 18 |
)
|
| 19 |
|
|
|
|
| 12 |
if text != "":
|
| 13 |
response = client.chat.completions.create(
|
| 14 |
model='gemma-7b-it',
|
| 15 |
+
messages=[
|
| 16 |
+
{
|
| 17 |
+
"role": "system",
|
| 18 |
+
"content": "You are a polite and friendly assistant. If you receive NSFW inputs or requests, politely decline."
|
| 19 |
+
},
|
| 20 |
+
{
|
| 21 |
+
"role": "user",
|
| 22 |
+
"content": text
|
| 23 |
+
}],
|
| 24 |
stream=True
|
| 25 |
)
|
| 26 |
|