Skip to content

Commit ee8652c

Browse files
committed
lint
1 parent d066cc3 commit ee8652c

File tree

2 files changed

+22
-11
lines changed

2 files changed

+22
-11
lines changed

services/web/src/components/bot/ActionProvider.tsx

Lines changed: 15 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -171,12 +171,12 @@ class ActionProvider {
171171
this.addModelSelectionToState();
172172
const message = this.createChatBotMessage(
173173
`Type one of these available options and press enter:\n\n` +
174-
`1. \`gpt-4o\` : GPT-4 Omni (fastest, multimodal, best for general use)\n\n` +
175-
`2. \`gpt-4o-mini\` : Lighter version of GPT-4o (efficient for most tasks)\n\n` +
176-
`3. \`gpt-4-turbo\` : GPT-4 Turbo (older but solid performance)\n\n` +
177-
`4. \`gpt-3.5-turbo\` : GPT-3.5 Turbo (cheaper, good for lightweight tasks)\n\n` +
178-
`5. \`gpt-3.5-turbo-16k\` : Like above but with 16k context window\n\n` +
179-
`By default, GPT-4o-mini will be used if any invalid option is entered.`,
174+
`1. \`gpt-4o\` : GPT-4 Omni (fastest, multimodal, best for general use)\n\n` +
175+
`2. \`gpt-4o-mini\` : Lighter version of GPT-4o (efficient for most tasks)\n\n` +
176+
`3. \`gpt-4-turbo\` : GPT-4 Turbo (older but solid performance)\n\n` +
177+
`4. \`gpt-3.5-turbo\` : GPT-3.5 Turbo (cheaper, good for lightweight tasks)\n\n` +
178+
`5. \`gpt-3.5-turbo-16k\` : Like above but with 16k context window\n\n` +
179+
`By default, GPT-4o-mini will be used if any invalid option is entered.`,
180180
Math.floor(Math.random() * 65536),
181181
{
182182
loading: true,
@@ -188,7 +188,10 @@ class ActionProvider {
188188
}
189189
};
190190

191-
handleModelConfirmation = (model_name: string | null, accessToken: string): void => {
191+
handleModelConfirmation = (
192+
model_name: string | null,
193+
accessToken: string,
194+
): void => {
192195
const validModels: Record<string, string> = {
193196
"1": "gpt-4o",
194197
"2": "gpt-4o-mini",
@@ -199,10 +202,13 @@ class ActionProvider {
199202
"gpt-4o-mini": "gpt-4o-mini",
200203
"gpt-4-turbo": "gpt-4-turbo",
201204
"gpt-3.5-turbo": "gpt-3.5-turbo",
202-
"gpt-3.5-turbo-16k": "gpt-3.5-turbo-16k"
205+
"gpt-3.5-turbo-16k": "gpt-3.5-turbo-16k",
203206
};
204207
const selectedModel = model_name?.trim();
205-
const modelToUse = selectedModel && validModels[selectedModel] ? validModels[selectedModel] : null;
208+
const modelToUse =
209+
selectedModel && validModels[selectedModel]
210+
? validModels[selectedModel]
211+
: null;
206212

207213
const modelUrl = APIService.CHATBOT_SERVICE + "genai/model";
208214
superagent

services/web/src/components/bot/MessageParser.tsx

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,9 @@ class MessageParser {
115115
this.state.initializationRequired = initRequired;
116116
this.state.chatHistory = chatHistory;
117117
console.log("State help:", this.state);
118-
return this.actionProvider.handleModelSelection(this.state.initializationRequired);
118+
return this.actionProvider.handleModelSelection(
119+
this.state.initializationRequired,
120+
);
119121
} else if (
120122
message_l === "clear" ||
121123
message_l === "reset" ||
@@ -131,7 +133,10 @@ class MessageParser {
131133
} else if (this.state.initializationRequired) {
132134
return this.actionProvider.handleNotInitialized();
133135
} else if (this.state.modelSelection) {
134-
return this.actionProvider.handleModelConfirmation(message, this.state.accessToken);
136+
return this.actionProvider.handleModelConfirmation(
137+
message,
138+
this.state.accessToken,
139+
);
135140
}
136141

137142
return this.actionProvider.handleChat(message, this.state.accessToken);

0 commit comments

Comments
 (0)