Skip to content

Commit

Permalink
feat: optimize the console log.
Browse files Browse the repository at this point in the history
  • Loading branch information
guangzhengli committed Jun 28, 2023
1 parent 17b53bf commit a18a74f
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 6 deletions.
3 changes: 0 additions & 3 deletions components/Sidebar/KeySettings.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -41,13 +41,10 @@ export const KeySettings: FC<Props> = ({
};

const handleApiModelSelect = (value: string) => {
console.log("api model:", value);
setFromKeyConfiguration({
...fromKeyConfiguration,
apiModel: value,
});
// fromKeyConfiguration.apiModel = event.target.value;
// onKeyConfigurationChange(fromKeyConfiguration);
};

const handleChange = (event: React.ChangeEvent<HTMLInputElement>) => {
Expand Down
4 changes: 1 addition & 3 deletions pages/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -123,8 +123,6 @@ const Home: React.FC<HomeProps> = ({serverSideApiKeyIsSet}) => {
prompt: updatedConversation.prompt,
}),
});

console.log("handle chat response")
} else {
response = await fetch(
`/api/query?message=${message.content}&indexName=${updatedConversation.index.indexName}`, {
Expand All @@ -140,7 +138,6 @@ const Home: React.FC<HomeProps> = ({serverSideApiKeyIsSet}) => {
'x-azure-embedding-deployment-name': keyConfiguration.azureEmbeddingDeploymentName ?? '',
},
});
console.log("handle file chat response")
}

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

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

saveConversations(updatedConversations);
Expand Down

1 comment on commit a18a74f

@vercel
Copy link

@vercel vercel bot commented on a18a74f Jun 28, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.