Skip to content

Commit

Permalink
Fix typos in Mistral endpoint and improve user feedback during file g…
Browse files Browse the repository at this point in the history
…eneration

Signed-off-by: kshitij79 <[email protected]>
  • Loading branch information
kshitij79 committed Aug 21, 2024
1 parent 664ab50 commit c60ccfa
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
2 changes: 1 addition & 1 deletion client/src/copilot/generators/suggestionProvider.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ export async function getSuggestion(client: LanguageClient, documents: Documents
case 'openai':
apiUrl = DEFAULT_LLM_ENDPOINTS.OPENAI;
break;
case 'mistralai':
case 'mistral':
apiUrl = DEFAULT_LLM_ENDPOINTS.MISTRALAI;
break;
default:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,19 +53,23 @@ export function createFileGeneratorPanel(context: vscode.ExtensionContext, clien
try {
await generateGrammarFile(client, message.filePath);
updateGeneratingState('grammar', false);
vscode.window.showInformationMessage('Grammar file generated successfully');
} catch (error) {
log(`Error generating grammar file: ${error.message}`);
updateGeneratingState('grammar', false, error.message);
vscode.window.showErrorMessage('Error generating grammar file');
}
break;
case FILE_GENERATORS.GENERATE_MODEL_FILE:
updateGeneratingState('model', true);
try {
await generateModelFile(client, message.packageFile, message.grammarFile);
updateGeneratingState('model', false);
vscode.window.showInformationMessage('Model file generated successfully');
} catch (error) {
log(`Error generating model file: ${error.message}`);
updateGeneratingState('model', false, error.message);
vscode.window.showErrorMessage('Error generating model file');
}
break;
case FILE_GENERATORS.REQUEST_FILE_LIST:
Expand Down
2 changes: 1 addition & 1 deletion client/src/copilot/utils/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ export const DEFAULT_LLM_MODELS = {
export const DEFAULT_LLM_ENDPOINTS = {
GEMINI: 'https://generativelanguage.googleapis.com/v1beta/models/gemini-pro:generateContent',
OPENAI: 'https://api.openai.com/v1/chat/completions',
MISTRALAI: 'https://api.mistralai.com/v1/chat/completions'
MISTRALAI: 'https://api.mistral.ai/v1/chat/completions'
};

// Constants for Panel Manager
Expand Down

0 comments on commit c60ccfa

Please sign in to comment.