Spaces:
Paused
Paused
fix: read Tavily key from TAVILY_API_KEY_2
Browse filesCo-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
server.js
CHANGED
|
@@ -238,16 +238,16 @@ app.post('/api/notes/chat/completions', async (req, res) => {
|
|
| 238 |
}
|
| 239 |
});
|
| 240 |
|
| 241 |
-
// General Web Search Proxy (Tavily) � keeps
|
| 242 |
// Fallback for the Notes agent's search_web tool when Wikipedia has no hit
|
| 243 |
// (current events, niche topics). Trimmed to a few short extracts per result
|
| 244 |
// here already, so the token cost is paid once, not per client.
|
| 245 |
app.post('/api/notes/search', async (req, res) => {
|
| 246 |
if (!checkNotesAccess(req, res)) return;
|
| 247 |
|
| 248 |
-
const apiKey = process.env.
|
| 249 |
if (!apiKey) {
|
| 250 |
-
return res.status(500).json({ error: { message: '
|
| 251 |
}
|
| 252 |
|
| 253 |
const query = String(req.body?.query || '').trim();
|
|
|
|
| 238 |
}
|
| 239 |
});
|
| 240 |
|
| 241 |
+
// General Web Search Proxy (Tavily) � keeps TAVILY_API_KEY_2 server-side.
|
| 242 |
// Fallback for the Notes agent's search_web tool when Wikipedia has no hit
|
| 243 |
// (current events, niche topics). Trimmed to a few short extracts per result
|
| 244 |
// here already, so the token cost is paid once, not per client.
|
| 245 |
app.post('/api/notes/search', async (req, res) => {
|
| 246 |
if (!checkNotesAccess(req, res)) return;
|
| 247 |
|
| 248 |
+
const apiKey = process.env.TAVILY_API_KEY_2;
|
| 249 |
if (!apiKey) {
|
| 250 |
+
return res.status(500).json({ error: { message: 'TAVILY_API_KEY_2 ist im Space nicht gesetzt' } });
|
| 251 |
}
|
| 252 |
|
| 253 |
const query = String(req.body?.query || '').trim();
|