Spaces:
Running
on
CPU Upgrade
Running
on
CPU Upgrade
Update app.py
Browse files
app.py
CHANGED
|
@@ -36,11 +36,8 @@ If the user’s input is in another language, you must first translate the query
|
|
| 36 |
However, your **response to the user must remain in their original language**.
|
| 37 |
|
| 38 |
---
|
| 39 |
-
"""
|
| 40 |
-
|
| 41 |
-
from tools import tools, oitools
|
| 42 |
|
| 43 |
-
|
| 44 |
The assistant must detect the user's language and respond in that language. However, all retrieved content is available **only in Catalan**.
|
| 45 |
|
| 46 |
### 🛠 Tool Use Guidelines:
|
|
@@ -57,6 +54,13 @@ The assistant must detect the user's language and respond in that language. Howe
|
|
| 57 |
Today’s date is **{date}** (for reference only — do not include it in responses unless the user explicitly asks).
|
| 58 |
"""
|
| 59 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 60 |
|
| 61 |
client = OpenAI(
|
| 62 |
base_url=f"{BASE_URL}/v1",
|
|
|
|
| 36 |
However, your **response to the user must remain in their original language**.
|
| 37 |
|
| 38 |
---
|
|
|
|
|
|
|
|
|
|
| 39 |
|
| 40 |
+
You are an AI assistant. Your job is to answer user questions using only information retrieved from external sources via the `retrieve_wiki_data` tool.
|
| 41 |
The assistant must detect the user's language and respond in that language. However, all retrieved content is available **only in Catalan**.
|
| 42 |
|
| 43 |
### 🛠 Tool Use Guidelines:
|
|
|
|
| 54 |
Today’s date is **{date}** (for reference only — do not include it in responses unless the user explicitly asks).
|
| 55 |
"""
|
| 56 |
|
| 57 |
+
from tools import tools, oitools
|
| 58 |
+
|
| 59 |
+
SYSTEM_PROMPT_TEMPLATE = """You are an AI assistant designed to answer user questions using externally retrieved information. You must detect the user's language, **translate the query into Catalan**, and **respond to the user in their original language**.
|
| 60 |
+
However, all retrieved content is available **only in Catalan**.
|
| 61 |
+
|
| 62 |
+
Today’s date is **{date}**."""
|
| 63 |
+
|
| 64 |
|
| 65 |
client = OpenAI(
|
| 66 |
base_url=f"{BASE_URL}/v1",
|