Spaces:
Build error
Build error
Update app.py
Browse files
app.py
CHANGED
|
@@ -13,10 +13,9 @@ def format_chat_prompt(message, instruction):
|
|
| 13 |
return prompt
|
| 14 |
|
| 15 |
def query(payload):
|
| 16 |
-
payload["parameters"] = {"stop_sequences": ["\nUser:", ""]}
|
| 17 |
response = requests.post(API_URL, headers=headers, json=payload)
|
| 18 |
return response.json()
|
| 19 |
-
|
| 20 |
def respond(message, instruction="A conversation between a user and an AI assistant. The assistant gives helpful and honest answers."):
|
| 21 |
prompt = format_chat_prompt(message, instruction)
|
| 22 |
response = query({"inputs": prompt})
|
|
|
|
| 13 |
return prompt
|
| 14 |
|
| 15 |
def query(payload):
|
|
|
|
| 16 |
response = requests.post(API_URL, headers=headers, json=payload)
|
| 17 |
return response.json()
|
| 18 |
+
|
| 19 |
def respond(message, instruction="A conversation between a user and an AI assistant. The assistant gives helpful and honest answers."):
|
| 20 |
prompt = format_chat_prompt(message, instruction)
|
| 21 |
response = query({"inputs": prompt})
|