Package com.pnfsoftware.jeb.util.llm
Class LlmConversationBuilder
java.lang.Object
com.pnfsoftware.jeb.util.llm.LlmConversationBuilder
Factory for creating LLM conversations backed by the supported provider APIs.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classBase type for content blocks sent to or received from an LLM conversation.static classstatic classstatic classText content block.static classTool response content block sent back to an LLM after a tool-use request.static classTool-use request returned by an LLM.static final recordUsage and timing counters collected for a conversation.static classDefinition of a tool that may be made available to an LLM. -
Constructor Summary
ConstructorsConstructorDescriptionCreate a conversation builder using a default network helper.Create a conversation builder. -
Method Summary
Modifier and TypeMethodDescriptionnewConversation(LlmApiType apiType, LlmSettings settings) Create a conversation for the requested API type.newConversation(LlmApiType apiType, LlmSettings settings, int[] timeouts) Create a conversation for the requested API type.
-
Constructor Details
-
LlmConversationBuilder
public LlmConversationBuilder()Create a conversation builder using a default network helper. -
LlmConversationBuilder
Create a conversation builder.- Parameters:
net- optional network helper; if null, a default helper is created
-
-
Method Details
-
newConversation
Create a conversation for the requested API type.- Parameters:
apiType- LLM provider API typesettings- conversation settings- Returns:
- new conversation
-
newConversation
Create a conversation for the requested API type.- Parameters:
apiType- LLM provider API typesettings- conversation settingstimeouts- optional network timeouts (if null, thedefault timeoutsare used); if not-null, it must be a 3-element array of timeouts in ms (connect, read, write) that will be provided toNet.buildClient(java.lang.String)- Returns:
- new conversation
-