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 • 875 B
JavaScript
import { ChatGoogleGenerativeAI } from "@langchain/google-genai";
import { AbstractLLMProvider } from "./langChainBaseProvider.js";
export class LangChainGoogleGenAiProvider extends AbstractLLMProvider {
constructor(modelName, config) {
if (!config.apiKey) {
throw new Error("API key is required for Google GenAI provider. Define it in a secured env var LANGCHAIN_LLM_MODEL_API_KEY");
}
super(modelName, config);
this.model = this.getModel();
}
getModel() {
const config = {
model: this.modelName,
apiKey: this.config.apiKey,
temperature: this.config.temperature,
maxTokens: this.config.maxTokens,
maxRetries: this.config.maxRetries
};
return new ChatGoogleGenerativeAI(config);
}
}
//# sourceMappingURL=langChainGoogleGenAi.js.map