check_installation
Verify proper installation of Unsloth software to ensure compatibility and functionality for optimizing and fine-tuning large language models.
Instructions
Check if Unsloth is properly installed
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/index.ts:235-258 (handler)Handler for the 'check_installation' tool. Calls the checkUnslothInstallation helper method and returns a success or error text response based on whether Unsloth is installed.case 'check_installation': { const isInstalled = await this.checkUnslothInstallation(); if (!isInstalled) { return { content: [ { type: 'text', text: 'Unsloth is not installed. Please install it with: pip install unsloth', }, ], isError: true, }; } return { content: [ { type: 'text', text: 'Unsloth is properly installed.', }, ], }; }
- src/index.ts:70-77 (registration)Registration of the 'check_installation' tool in the list of tools, including name, description, and empty input schema.{ name: 'check_installation', description: 'Check if Unsloth is properly installed', inputSchema: { type: 'object', properties: {}, }, },
- src/index.ts:46-53 (helper)Helper method that executes a Python command to check if the 'unsloth' package can be imported, indicating proper installation.private async checkUnslothInstallation(): Promise<boolean> { try { await execPromise('python -c "import unsloth"'); return true; } catch (error) { return false; } }