Class LlmConversationBuilder

java.lang.Object
com.pnfsoftware.jeb.util.llm.LlmConversationBuilder

public class LlmConversationBuilder extends Object
Factory for creating LLM conversations backed by the supported provider APIs.
  • Constructor Details

    • LlmConversationBuilder

      public LlmConversationBuilder()
      Create a conversation builder using a default network helper.
    • LlmConversationBuilder

      public LlmConversationBuilder(Net net)
      Create a conversation builder.
      Parameters:
      net - optional network helper; if null, a default helper is created
  • Method Details

    • newConversation

      public ILlmConversation newConversation(LlmApiType apiType, LlmSettings settings)
      Create a conversation for the requested API type.
      Parameters:
      apiType - LLM provider API type
      settings - conversation settings
      Returns:
      new conversation
    • newConversation

      public ILlmConversation newConversation(LlmApiType apiType, LlmSettings settings, int[] timeouts)
      Create a conversation for the requested API type.
      Parameters:
      apiType - LLM provider API type
      settings - conversation settings
      timeouts - optional network timeouts (if null, the default timeouts are used); if not-null, it must be a 3-element array of timeouts in ms (connect, read, write) that will be provided to Net.buildClient(java.lang.String)
      Returns:
      new conversation