gaunt-sloth-assistant
Version:
[](https://github.com/Galvanized-Pukeko/gaunt-sloth-assistant/actions/workflows/unit-tests.yml) [ {
const deepseek = await import('@langchain/deepseek');
// Use config apiKey if available, otherwise use the environment variable
const deepseekApiKey = llmConfig.apiKey || env.DEEPSEEK_API_KEY;
return new deepseek.ChatDeepSeek({
...llmConfig,
apiKey: deepseekApiKey,
model: llmConfig.model || 'deepseek-reasoner',
});
}
const jsonContent = `{
"llm": {
"type": "deepseek",
"model": "deepseek-reasoner"
}
}`;
export function init(configFileName) {
// Determine which content to use based on file extension
if (!configFileName.endsWith('.json')) {
throw new Error('Only JSON config is supported.');
}
writeFileIfNotExistsWithMessages(configFileName, jsonContent);
displayWarning(`You need to update your ${configFileName} to add your DeepSeek API key, ` +
'or define DEEPSEEK_API_KEY environment variable.');
}
//# sourceMappingURL=deepseek.js.map