Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

change default model to GPT-3.5-turbo #374

Merged
merged 2 commits into from
Oct 17, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions backend/.eslintrc.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ module.exports = {
ignorePatterns: ["build", "coverage", "node_modules", "jest.config.js"],
rules: {
"@typescript-eslint/init-declarations": "error",

"@typescript-eslint/no-misused-promises": [
"error",
{
Expand All @@ -25,5 +26,6 @@ module.exports = {

"func-style": ["error", "declaration"],
"prefer-template": "error",
eqeqeq: "error",
},
};
6 changes: 3 additions & 3 deletions backend/src/langchain.ts
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ function initQAModel(

// initialise model
const model = new ChatOpenAI({
modelName: CHAT_MODELS.GPT_4,
modelName: CHAT_MODELS.GPT_3_5_TURBO,
streaming: true,
openAIApiKey: openAiApiKey,
});
Expand All @@ -146,7 +146,7 @@ function initPromptEvaluationModel(openAiApiKey: string) {

const promptInjectionChain = new LLMChain({
llm: new OpenAI({
modelName: CHAT_MODELS.GPT_4,
modelName: CHAT_MODELS.GPT_3_5_TURBO,
temperature: 0,
openAIApiKey: openAiApiKey,
}),
Expand All @@ -160,7 +160,7 @@ function initPromptEvaluationModel(openAiApiKey: string) {
);
const maliciousInputChain = new LLMChain({
llm: new OpenAI({
modelName: CHAT_MODELS.GPT_4,
modelName: CHAT_MODELS.GPT_3_5_TURBO,
temperature: 0,
openAIApiKey: openAiApiKey,
}),
Expand Down
2 changes: 1 addition & 1 deletion backend/src/models/chat.ts
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ interface ChatHistoryMessage {

// default settings for chat model
const defaultChatModel: ChatModel = {
id: CHAT_MODELS.GPT_4,
id: CHAT_MODELS.GPT_3_5_TURBO,
configuration: {
temperature: 1,
topP: 1,
Expand Down
1 change: 1 addition & 0 deletions frontend/.eslintrc.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -35,5 +35,6 @@ module.exports = {
"warn",
{ allowConstantExport: true },
],
eqeqeq: "error",
},
};
3 changes: 1 addition & 2 deletions frontend/src/components/ModelBox/ModelSelection.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -51,10 +51,9 @@ function ModelSelection() {
onChange={(e) => {
setSelectedModel(e.target.value as CHAT_MODELS);
}}
placeholder={modelInUse}
>
{chatModelOptions.map((model) => (
<option key={model} value={model}>
<option key={model} value={model} selected={model === modelInUse}>
{model}
</option>
))}
Expand Down