UNPKG

@promptbook/utils

Version:

Promptbook: Create persistent AI agents that turn your company's scattered knowledge into action

25 lines (24 loc) 1.2 kB
import { MultipleLlmExecutionTools } from '../../_multiple/MultipleLlmExecutionTools'; import type { CreateLlmToolsFromConfigurationOptions } from './createLlmToolsFromConfiguration'; /** * Automatically configures LLM tools from environment variables in Node.js * * This utility function detects available LLM providers based on environment variables * and creates properly configured LLM execution tools for each detected provider. * * Note: This function is not cached, every call creates new instance of `MultipleLlmExecutionTools` * * Supports environment variables from .env files when dotenv is configured * Note: `$` is used to indicate that this function is not a pure function - it uses filesystem to access `.env` file * * It looks for environment variables: * - `process.env.OPENAI_API_KEY` * - `process.env.ANTHROPIC_CLAUDE_API_KEY` * - ... * * @param options Configuration options for the LLM tools * @returns A unified interface containing all detected and configured LLM tools * * @public exported from `@promptbook/node` */ export declare function $provideLlmToolsFromEnv(options?: CreateLlmToolsFromConfigurationOptions): Promise<MultipleLlmExecutionTools>;