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 1 commit
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
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
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}>
chriswilty marked this conversation as resolved.
Show resolved Hide resolved
Copy link
Contributor

Choose a reason for hiding this comment

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

Should use === here?

Copy link
Member

Choose a reason for hiding this comment

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

Well spotted! I feel we should activate a linter warning for this... It's eqeqeq but it's not included in the recommended ruleset, so we'd need to turn it on. It's worth having.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

ah yeah this always gets me :') changed and added a lint!

{model}
</option>
))}
Expand Down