Skip to content

Commit a18a74f

Browse files
committed
feat: optimize the console log.
1 parent 17b53bf commit a18a74f

File tree

2 files changed

+1
-6
lines changed

2 files changed

+1
-6
lines changed

components/Sidebar/KeySettings.tsx

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,13 +41,10 @@ export const KeySettings: FC<Props> = ({
4141
};
4242

4343
const handleApiModelSelect = (value: string) => {
44-
console.log("api model:", value);
4544
setFromKeyConfiguration({
4645
...fromKeyConfiguration,
4746
apiModel: value,
4847
});
49-
// fromKeyConfiguration.apiModel = event.target.value;
50-
// onKeyConfigurationChange(fromKeyConfiguration);
5148
};
5249

5350
const handleChange = (event: React.ChangeEvent<HTMLInputElement>) => {

pages/index.tsx

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -123,8 +123,6 @@ const Home: React.FC<HomeProps> = ({serverSideApiKeyIsSet}) => {
123123
prompt: updatedConversation.prompt,
124124
}),
125125
});
126-
127-
console.log("handle chat response")
128126
} else {
129127
response = await fetch(
130128
`/api/query?message=${message.content}&indexName=${updatedConversation.index.indexName}`, {
@@ -140,7 +138,6 @@ const Home: React.FC<HomeProps> = ({serverSideApiKeyIsSet}) => {
140138
'x-azure-embedding-deployment-name': keyConfiguration.azureEmbeddingDeploymentName ?? '',
141139
},
142140
});
143-
console.log("handle file chat response")
144141
}
145142

146143
if (!response.ok) {
@@ -245,6 +242,7 @@ const Home: React.FC<HomeProps> = ({serverSideApiKeyIsSet}) => {
245242
updatedConversations.push(updatedConversation);
246243
}
247244

245+
console.log(`handle chat question: ${message}, response: ${text}`);
248246
setConversations(updatedConversations);
249247

250248
saveConversations(updatedConversations);

0 commit comments

Comments
 (0)