@nevermined-io/payments
    Preparing search index...

    Function withLangchain

    • Creates a ChatOpenAI configuration with logging enabled

      Usage: const llm = new ChatOpenAI(withLangchain("gpt-4o-mini", apiKey, heliconeApiKey, heliconeBaseLoggingUrl, accountAddress, agentRequest, customProperties));

      Parameters

      • model: string

        The OpenAI model to use (e.g., "gpt-4o-mini", "gpt-4")

      • apiKey: string

        The OpenAI API key

      • heliconeApiKey: string

        The Helicone API key for logging

      • heliconeBaseLoggingUrl: string

        The Helicone base logging endpoint URL

      • accountAddress: string

        The account address for logging purposes

      • environmentName: EnvironmentName

        The environment name for logging purposes

      • agentRequest: StartAgentRequest

        The agent request for logging purposes

      • customProperties: CustomProperties

        Custom properties to add as Helicone headers

      Returns ChatOpenAIConfiguration

      Configuration object for ChatOpenAI constructor with logging enabled