java.lang.Object
com.developer.nefarious.zjoule.plugin.chat.openai.OpenAIClient
All Implemented Interfaces:
IAIClient

public class OpenAIClient extends Object implements IAIClient
Implements the IAIClient interface for interacting with OpenAI-based models. The OpenAIClient handles chat completion requests, message creation, and management of chat message history.
  • Constructor Details

    • OpenAIClient

      public OpenAIClient(IAuthClient authClient, IMemoryMessageHistory memoryMessageHistory, IMemoryObject<String> memoryResourceGroup, IMemoryObject<Deployment> memoryDeployment, IOpenAIClientHelper openAIClientHelper)
      Constructs a new OpenAIClient with the required dependencies.
      Parameters:
      authClient - the authentication client for retrieving tokens and service URLs.
      memoryMessageHistory - the memory component for managing chat history.
      memoryResourceGroup - the memory component for resource group information.
      memoryDeployment - the memory component for deployment details.
      openAIClientHelper - the helper for constructing requests and processing responses.
  • Method Details