Spaces:
Running
on
CPU Upgrade
Running
on
CPU Upgrade
fix(preprocessMessages): clarify web search context in final message content
Browse files
src/lib/server/endpoints/preprocessMessages.ts
CHANGED
@@ -34,7 +34,7 @@ function addWebSearchContext(messages: Message[], webSearch: Message["webSearch"
|
|
34 |
|
35 |
const finalMessage = {
|
36 |
...messages[messages.length - 1],
|
37 |
-
content: `I searched the web using the query: ${webSearch.searchQuery}.
|
38 |
Today is ${currentDate} and here are the results.
|
39 |
When answering the question, you must reference the sources you used inline by wrapping the index in brackets like this: [1]. If multiple sources are used, you must reference each one of them without commas like this: [1][2][3].
|
40 |
=====================
|
|
|
34 |
|
35 |
const finalMessage = {
|
36 |
...messages[messages.length - 1],
|
37 |
+
content: `I searched the web using the query: ${webSearch.searchQuery}. The query was generated by a tool and might not be relevant to the question.
|
38 |
Today is ${currentDate} and here are the results.
|
39 |
When answering the question, you must reference the sources you used inline by wrapping the index in brackets like this: [1]. If multiple sources are used, you must reference each one of them without commas like this: [1][2][3].
|
40 |
=====================
|