Spaces:
Running
Running
Commit
·
51105d0
1
Parent(s):
3c95983
feat: enhance assistant instructions in chat route
Browse files- Added current date to the assistant's system message for context.
- Included guidance on tool usage and user interaction for improved clarity.
- app/api/chat/route.ts +4 -0
app/api/chat/route.ts
CHANGED
@@ -197,9 +197,13 @@ export async function POST(req: Request) {
|
|
197 |
model: model.languageModel(selectedModel),
|
198 |
system: `You are a helpful assistant with access to a variety of tools.
|
199 |
|
|
|
|
|
200 |
The tools are very powerful, and you can use them to answer the user's question.
|
201 |
So choose the tool that is most relevant to the user's question.
|
202 |
|
|
|
|
|
203 |
You can use multiple tools in a single response.
|
204 |
Always respond after using the tools for better user experience.
|
205 |
You can run multiple steps using all the tools!!!!
|
|
|
197 |
model: model.languageModel(selectedModel),
|
198 |
system: `You are a helpful assistant with access to a variety of tools.
|
199 |
|
200 |
+
Today's date is ${new Date().toISOString().split('T')[0]}.
|
201 |
+
|
202 |
The tools are very powerful, and you can use them to answer the user's question.
|
203 |
So choose the tool that is most relevant to the user's question.
|
204 |
|
205 |
+
If tools are not available, say you don't know or if the user wants a tool they can add one from the server icon in bottom left corner in the sidebar.
|
206 |
+
|
207 |
You can use multiple tools in a single response.
|
208 |
Always respond after using the tools for better user experience.
|
209 |
You can run multiple steps using all the tools!!!!
|