Build/Refactor: lint pre-commit hook and reformat repo to spec (#314)

* build/refactor: move lint/prettier packages to project root, install husky, add pre-commit hook

* refactor: reformat files

* build: put full eslintrc back with all rules
This commit is contained in:
Dan Orlando 2023-05-18 11:09:31 -07:00 committed by GitHub
parent 8d75b25104
commit 7fdc862042
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
157 changed files with 4836 additions and 2403 deletions

View file

@ -33,11 +33,13 @@ const buildDefaultConversation = ({
'chat-bison',
modelLabel: lastConversationSetup?.modelLabel ?? null,
promptPrefix: lastConversationSetup?.promptPrefix ?? null,
examples: lastConversationSetup?.examples ?? [{ input: { content: '' }, output: { content: '' }}],
examples: lastConversationSetup?.examples ?? [
{ input: { content: '' }, output: { content: '' } }
],
temperature: lastConversationSetup?.temperature ?? 0.2,
maxOutputTokens: lastConversationSetup?.maxOutputTokens ?? 1024,
topP: lastConversationSetup?.topP ?? 0.95,
topK: lastConversationSetup?.topK ?? 40,
topK: lastConversationSetup?.topK ?? 40
};
} else if (endpoint === 'bingAI') {
conversation = {
@ -125,7 +127,9 @@ const getDefaultConversation = ({ conversation, prevConversation, endpointsConfi
// if anything happens, reset to default model
const endpoint = ['openAI', 'azureOpenAI', 'bingAI', 'chatGPTBrowser', 'google'].find(e => endpointsConfig?.[e]);
const endpoint = ['openAI', 'azureOpenAI', 'bingAI', 'chatGPTBrowser', 'google'].find(
e => endpointsConfig?.[e]
);
if (endpoint) {
conversation = buildDefaultConversation({ conversation, endpoint, endpointsConfig });
return conversation;