Update model selections in README and code to reflect new naming conventions and improve clarity

main
totargaming 2 years ago
parent a770472267
commit a2ad2cc642

@ -57,7 +57,7 @@ All it takes is modest JavaScript/TypeScript knowledge and understanding of the
- 💡 Solution Generation: Get detailed explanations and solutions with time/space complexity analysis - 💡 Solution Generation: Get detailed explanations and solutions with time/space complexity analysis
- 🔧 Real-time Debugging: Debug your code with AI assistance and structured feedback - 🔧 Real-time Debugging: Debug your code with AI assistance and structured feedback
- 🎨 Advanced Window Management: Freely move, resize, change opacity, and zoom the window - 🎨 Advanced Window Management: Freely move, resize, change opacity, and zoom the window
- 🔄 Model Selection: Choose between GPT-4o and GPT-4o-mini for different processing stages - 🔄 Model Selection: Choose between GPT-4o and o3-mini for different processing stages
- 🔒 Privacy-Focused: Your API key and data never leave your computer except for OpenAI API calls - 🔒 Privacy-Focused: Your API key and data never leave your computer except for OpenAI API calls
## Global Commands ## Global Commands
@ -261,7 +261,7 @@ To add new models, simply extend the API integration in `electron/ProcessingHelp
## Configuration ## Configuration
- **OpenAI API Key**: Your personal API key is stored locally and only used for API calls to OpenAI - **OpenAI API Key**: Your personal API key is stored locally and only used for API calls to OpenAI
- **Model Selection**: You can choose between GPT-4o and GPT-4o-mini for each stage of processing: - **Model Selection**: You can choose between GPT-4o and o3-mini for each stage of processing:
- Problem Extraction: Analyzes screenshots to understand the coding problem - Problem Extraction: Analyzes screenshots to understand the coding problem
- Solution Generation: Creates optimized solutions with explanations - Solution Generation: Creates optimized solutions with explanations
- Debugging: Provides detailed analysis of errors and improvement suggestions - Debugging: Provides detailed analysis of errors and improvement suggestions

@ -60,8 +60,8 @@ export class ConfigHelper extends EventEmitter {
*/ */
private sanitizeModelSelection(model: string, provider: "openai" | "gemini" | "anthropic"): string { private sanitizeModelSelection(model: string, provider: "openai" | "gemini" | "anthropic"): string {
if (provider === "openai") { if (provider === "openai") {
// Only allow gpt-4o and gpt-4o-mini for OpenAI // Only allow gpt-4o and o3-mini for OpenAI
const allowedModels = ['gpt-4o', 'gpt-4o-mini']; const allowedModels = ['gpt-4o', 'o3-mini'];
if (!allowedModels.includes(model)) { if (!allowedModels.includes(model)) {
console.warn(`Invalid OpenAI model specified: ${model}. Using default model: gpt-4o`); console.warn(`Invalid OpenAI model specified: ${model}. Using default model: gpt-4o`);
return 'gpt-4o'; return 'gpt-4o';
@ -77,10 +77,10 @@ export class ConfigHelper extends EventEmitter {
return model; return model;
} else if (provider === "anthropic") { } else if (provider === "anthropic") {
// Only allow Claude models // Only allow Claude models
const allowedModels = ['claude-3-opus-20240229', 'claude-3-sonnet-20240229', 'claude-3-haiku-20240307']; const allowedModels = ['claude-3-7-sonnet-latest', 'claude-3-5-sonnet-20241022', 'claude-3-haiku-20240307'];
if (!allowedModels.includes(model)) { if (!allowedModels.includes(model)) {
console.warn(`Invalid Anthropic model specified: ${model}. Using default model: claude-3-opus-20240229`); console.warn(`Invalid Anthropic model specified: ${model}. Using default model: claude-3-7-sonnet-latest`);
return 'claude-3-opus-20240229'; return 'claude-3-7-sonnet-latest';
} }
return model; return model;
} }
@ -175,9 +175,9 @@ export class ConfigHelper extends EventEmitter {
updates.solutionModel = "gpt-4o"; updates.solutionModel = "gpt-4o";
updates.debuggingModel = "gpt-4o"; updates.debuggingModel = "gpt-4o";
} else if (updates.apiProvider === "anthropic") { } else if (updates.apiProvider === "anthropic") {
updates.extractionModel = "claude-3-opus-20240229"; updates.extractionModel = "claude-3-7-sonnet-latest";
updates.solutionModel = "claude-3-opus-20240229"; updates.solutionModel = "claude-3-7-sonnet-latest";
updates.debuggingModel = "claude-3-opus-20240229"; updates.debuggingModel = "claude-3-7-sonnet-latest";
} else { } else {
updates.extractionModel = "gemini-2.0-flash"; updates.extractionModel = "gemini-2.0-flash";
updates.solutionModel = "gemini-2.0-flash"; updates.solutionModel = "gemini-2.0-flash";

@ -604,7 +604,7 @@ export class ProcessingHelper {
]; ];
const response = await this.anthropicClient.messages.create({ const response = await this.anthropicClient.messages.create({
model: config.extractionModel || "claude-3-opus-20240229", model: config.extractionModel || "claude-3-7-sonnet-latest",
max_tokens: 4000, max_tokens: 4000,
messages: messages, messages: messages,
temperature: 0.2 temperature: 0.2
@ -858,7 +858,7 @@ Your solution should be efficient, well-commented, and handle edge cases.
// Send to Anthropic API // Send to Anthropic API
const response = await this.anthropicClient.messages.create({ const response = await this.anthropicClient.messages.create({
model: config.solutionModel || "claude-3-opus-20240229", model: config.solutionModel || "claude-3-7-sonnet-latest",
max_tokens: 4000, max_tokens: 4000,
messages: messages, messages: messages,
temperature: 0.2 temperature: 0.2
@ -1216,7 +1216,7 @@ If you include code examples, use proper markdown code blocks with language spec
} }
const response = await this.anthropicClient.messages.create({ const response = await this.anthropicClient.messages.create({
model: config.debuggingModel || "claude-3-opus-20240229", model: config.debuggingModel || "claude-3-7-sonnet-latest",
max_tokens: 4000, max_tokens: 4000,
messages: messages, messages: messages,
temperature: 0.2 temperature: 0.2

@ -43,8 +43,8 @@ const modelCategories: ModelCategory[] = [
description: "Best overall performance for problem extraction" description: "Best overall performance for problem extraction"
}, },
{ {
id: "gpt-4o-mini", id: "o3-mini",
name: "gpt-4o-mini", name: "o3-mini",
description: "Faster, more cost-effective option" description: "Faster, more cost-effective option"
} }
], ],
@ -62,12 +62,12 @@ const modelCategories: ModelCategory[] = [
], ],
anthropicModels: [ anthropicModels: [
{ {
id: "claude-3-opus-20240229", id: "claude-3-7-sonnet-latest",
name: "Claude 3 Opus", name: "Claude 3.7 Sonnet",
description: "Best overall performance for problem extraction" description: "Best overall performance for problem extraction"
}, },
{ {
id: "claude-3-sonnet-20240229", id: "claude-3-5-sonnet-20241022",
name: "Claude 3 Sonnet", name: "Claude 3 Sonnet",
description: "Balanced performance and speed" description: "Balanced performance and speed"
}, },
@ -89,8 +89,8 @@ const modelCategories: ModelCategory[] = [
description: "Strong overall performance for coding tasks" description: "Strong overall performance for coding tasks"
}, },
{ {
id: "gpt-4o-mini", id: "o3-mini",
name: "gpt-4o-mini", name: "o3-mini",
description: "Faster, more cost-effective option" description: "Faster, more cost-effective option"
} }
], ],
@ -108,12 +108,12 @@ const modelCategories: ModelCategory[] = [
], ],
anthropicModels: [ anthropicModels: [
{ {
id: "claude-3-opus-20240229", id: "claude-3-7-sonnet-latest",
name: "Claude 3 Opus", name: "Claude 3.7 Sonnet",
description: "Strong overall performance for coding tasks" description: "Strong overall performance for coding tasks"
}, },
{ {
id: "claude-3-sonnet-20240229", id: "claude-3-5-sonnet-20241022",
name: "Claude 3 Sonnet", name: "Claude 3 Sonnet",
description: "Balanced performance and speed" description: "Balanced performance and speed"
}, },
@ -135,8 +135,8 @@ const modelCategories: ModelCategory[] = [
description: "Best for analyzing code and error messages" description: "Best for analyzing code and error messages"
}, },
{ {
id: "gpt-4o-mini", id: "o3-mini",
name: "gpt-4o-mini", name: "o3-mini",
description: "Faster, more cost-effective option" description: "Faster, more cost-effective option"
} }
], ],
@ -154,12 +154,12 @@ const modelCategories: ModelCategory[] = [
], ],
anthropicModels: [ anthropicModels: [
{ {
id: "claude-3-opus-20240229", id: "claude-3-7-sonnet-latest",
name: "Claude 3 Opus", name: "Claude 3.7 Sonnet",
description: "Best for analyzing code and error messages" description: "Best for analyzing code and error messages"
}, },
{ {
id: "claude-3-sonnet-20240229", id: "claude-3-5-sonnet-20241022",
name: "Claude 3 Sonnet", name: "Claude 3 Sonnet",
description: "Balanced performance and speed" description: "Balanced performance and speed"
}, },
@ -248,9 +248,9 @@ export function SettingsDialog({ open: externalOpen, onOpenChange }: SettingsDia
setSolutionModel("gemini-1.5-pro"); setSolutionModel("gemini-1.5-pro");
setDebuggingModel("gemini-1.5-pro"); setDebuggingModel("gemini-1.5-pro");
} else if (provider === "anthropic") { } else if (provider === "anthropic") {
setExtractionModel("claude-3-opus-20240229"); setExtractionModel("claude-3-7-sonnet-latest");
setSolutionModel("claude-3-opus-20240229"); setSolutionModel("claude-3-7-sonnet-latest");
setDebuggingModel("claude-3-opus-20240229"); setDebuggingModel("claude-3-7-sonnet-latest");
} }
}; };

Loading…
Cancel
Save