UNPKG

sfdx-hardis

Version:

Swiss-army-knife Toolbox for Salesforce. Allows you to define a complete CD/CD Pipeline. Orchestrate base commands and assist users with interactive wizards

22 lines 868 B
import { ChatAnthropic } from "@langchain/anthropic"; import { AbstractLLMProvider } from "./langChainBaseProvider.js"; export class LangChainAnthropicProvider extends AbstractLLMProvider { constructor(modelName, config) { if (!config.apiKey) { throw new Error("API key is required for Anthropic provider. Define it in a secured env var LANGCHAIN_LLM_MODEL_API_KEY"); } super(modelName, config); this.model = this.getModel(); } getModel() { const config = { modelName: this.modelName, anthropicApiKey: this.config.apiKey, temperature: this.config.temperature, maxTokens: this.config.maxTokens, maxRetries: this.config.maxRetries }; return new ChatAnthropic(config); } } //# sourceMappingURL=langChainAnthropicProvider.js.map