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

    Function withOpenAI

    • Creates an OpenAI client configuration with logging enabled

      Usage: const openai = new OpenAI(withOpenAI(apiKey, heliconeApiKey, heliconeBaseLoggingUrl, accountAddress, agentRequest, customProperties));

      Parameters

      • 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 OpenAIConfiguration

      Configuration object for OpenAI constructor with logging enabled