Spaces:
Runtime error
Runtime error
fixed web enable/disable button
Browse files- gateway.ts +2 -1
gateway.ts
CHANGED
|
@@ -168,7 +168,7 @@ app.post('/api/chat/clear', apiLimiter, authenticateToken, async (req, res) => {
|
|
| 168 |
// Proxy to backend - chat endpoint with SSE streaming
|
| 169 |
app.post('/api/chat', apiLimiter, authenticateToken, async (req, res) => {
|
| 170 |
try {
|
| 171 |
-
const { message, apiKey, model } = req.body;
|
| 172 |
const user = (req as any).user;
|
| 173 |
|
| 174 |
console.log('📨 Received chat request from:', user.username);
|
|
@@ -189,6 +189,7 @@ app.post('/api/chat', apiLimiter, authenticateToken, async (req, res) => {
|
|
| 189 |
const response = await axios.post(`${BACKEND_URL}/api/chat`, {
|
| 190 |
message,
|
| 191 |
model,
|
|
|
|
| 192 |
user: { username: user.username, name: user.name }
|
| 193 |
}, {
|
| 194 |
// Increased timeout to 5 minutes (300s) to handle long-running operations
|
|
|
|
| 168 |
// Proxy to backend - chat endpoint with SSE streaming
|
| 169 |
app.post('/api/chat', apiLimiter, authenticateToken, async (req, res) => {
|
| 170 |
try {
|
| 171 |
+
const { message, apiKey, model, webSearchEnabled } = req.body;
|
| 172 |
const user = (req as any).user;
|
| 173 |
|
| 174 |
console.log('📨 Received chat request from:', user.username);
|
|
|
|
| 189 |
const response = await axios.post(`${BACKEND_URL}/api/chat`, {
|
| 190 |
message,
|
| 191 |
model,
|
| 192 |
+
webSearchEnabled,
|
| 193 |
user: { username: user.username, name: user.name }
|
| 194 |
}, {
|
| 195 |
// Increased timeout to 5 minutes (300s) to handle long-running operations
|