Skip to content

Commit 0013203

Browse files
committed
chore: spread objects where they are commonly logged to allow string truncation
1 parent 2dd6ab4 commit 0013203

File tree

7 files changed

+13
-7
lines changed

7 files changed

+13
-7
lines changed

api/server/controllers/AskController.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ const AskController = async (req, res, next, initializeClient) => {
1212
parentMessageId = null,
1313
overrideParentMessageId = null,
1414
} = req.body;
15-
logger.debug('[AskController]', { text, conversationId, endpointOption });
15+
logger.debug('[AskController]', { text, conversationId, ...endpointOption });
1616
let metadata;
1717
let userMessage;
1818
let promptTokens;

api/server/controllers/EditController.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ const EditController = async (req, res, next, initializeClient) => {
2020
generation,
2121
isContinued,
2222
conversationId,
23-
endpointOption,
23+
...endpointOption,
2424
});
2525
let metadata;
2626
let userMessage;

api/server/routes/ask/askChatGPTBrowser.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,8 @@ router.post('/', setHeaders, async (req, res) => {
4545

4646
logger.debug('[/ask/chatGPTBrowser]', {
4747
userMessage,
48-
endpointOption,
4948
conversationId,
49+
...endpointOption,
5050
});
5151

5252
if (!overrideParentMessageId) {

api/server/routes/ask/gptPlugins.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ router.post('/', validateEndpoint, buildEndpointOption, setHeaders, async (req,
2626
parentMessageId = null,
2727
overrideParentMessageId = null,
2828
} = req.body;
29-
logger.debug('[/ask/gptPlugins]', { text, conversationId, endpointOption });
29+
logger.debug('[/ask/gptPlugins]', { text, conversationId, ...endpointOption });
3030
let metadata;
3131
let userMessage;
3232
let promptTokens;

api/server/routes/ask/openAI.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ router.post('/', validateEndpoint, buildEndpointOption, setHeaders, async (req,
2525
overrideParentMessageId = null,
2626
} = req.body;
2727

28-
logger.debug('[/ask/openAI]', { text, conversationId, endpointOption });
28+
logger.debug('[/ask/openAI]', { text, conversationId, ...endpointOption });
2929

3030
let metadata;
3131
let userMessage;

api/server/routes/edit/gptPlugins.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ router.post('/', validateEndpoint, buildEndpointOption, setHeaders, async (req,
3434
generation,
3535
isContinued,
3636
conversationId,
37-
endpointOption,
37+
...endpointOption,
3838
});
3939
let metadata;
4040
let userMessage;

api/server/routes/edit/openAI.js

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,13 @@ router.post('/', validateEndpoint, buildEndpointOption, setHeaders, async (req,
2828
overrideParentMessageId = null,
2929
} = req.body;
3030

31-
logger.debug('[/edit/openAI]', { text, generation, isContinued, conversationId, endpointOption });
31+
logger.debug('[/edit/openAI]', {
32+
text,
33+
generation,
34+
isContinued,
35+
conversationId,
36+
...endpointOption,
37+
});
3238

3339
let metadata;
3440
let userMessage;

0 commit comments

Comments
 (0)