Class OpenAIRagPuppyChatter
java.lang.Object
rocks.imsofa.ai.puppychatter.AbstractPuppyChatter<OpenAICompatiblePromptParameters,Response>
rocks.imsofa.ai.puppychatter.http.AbstractHttpPuppyChatter<OpenAICompatiblePromptParameters,Response>
rocks.imsofa.ai.puppychatter.http.AbstractToolCapableHttpPuppyChatter<OpenAICompatiblePromptParameters,Response>
rocks.imsofa.ai.puppychatter.openai.OpenAIPuppyChatter
rocks.imsofa.ai.puppychatter.openai.OpenAIRagPuppyChatter
- All Implemented Interfaces:
ToolCapableHttpPuppyChatter<OpenAICompatiblePromptParameters,,Response> PuppyChatter<OpenAICompatiblePromptParameters,,Response> RagPuppyChatter<OpenAICompatiblePromptParameters,Response>
public class OpenAIRagPuppyChatter
extends OpenAIPuppyChatter
implements RagPuppyChatter<OpenAICompatiblePromptParameters,Response>
the default implementation of rag puppychatter for openai compatible
endpoints
- Author:
- USER
-
Nested Class Summary
Nested classes/interfaces inherited from class rocks.imsofa.ai.puppychatter.openai.OpenAIPuppyChatter
OpenAIPuppyChatter.TestJsonNested classes/interfaces inherited from class rocks.imsofa.ai.puppychatter.http.AbstractHttpPuppyChatter
AbstractHttpPuppyChatter.StreamResultIterator -
Field Summary
Fields inherited from class rocks.imsofa.ai.puppychatter.http.AbstractToolCapableHttpPuppyChatter
toolCallProcessor, toolCallRequestsFields inherited from class rocks.imsofa.ai.puppychatter.http.AbstractHttpPuppyChatter
apiKey, model, urlFields inherited from class rocks.imsofa.ai.puppychatter.AbstractPuppyChatter
cacheService, replyRole, sessionHistory -
Constructor Summary
ConstructorsConstructorDescriptionOpenAIRagPuppyChatter(String url, String apiKey, String model) this will not enable anthropic compatibilityOpenAIRagPuppyChatter(String url, String apiKey, String model, CacheService cacheService) this will not enable anthropic compatibility -
Method Summary
Modifier and TypeMethodDescriptionprotected voidpreprocessMessages(RequestParameters requestParameters) Preprocesses the conversation messages prior to sending them.voidsetRagHandler(RagHandler ragHandler) Methods inherited from class rocks.imsofa.ai.puppychatter.openai.OpenAIPuppyChatter
addProviderHeaders, buildToolResponseConversations, createDefaultPromptParameter, createPromptPayload, createResponseFromConversation, createToolPayload, main, parseFullResponseContent, parseStreamChunkContent, parseToolCalls, preprocessStreamLineMethods inherited from class rocks.imsofa.ai.puppychatter.http.AbstractToolCapableHttpPuppyChatter
createPayload, handleFullResponseExtensions, setToolCallProcessorMethods inherited from class rocks.imsofa.ai.puppychatter.http.AbstractHttpPuppyChatter
_bark, _bark, constructPayloadAndSend, getRequestParameters, getSchemaMap, getStreamResultIterator, processResponseStreamFromLLMProvidersMethods inherited from class rocks.imsofa.ai.puppychatter.AbstractPuppyChatter
bark, bark, bark, bark, closeSession, createConversationFromPrompt, createSession, isCacheableMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface rocks.imsofa.ai.puppychatter.PuppyChatter
bark, bark, bark, bark, closeSession, createSession
-
Constructor Details
-
OpenAIRagPuppyChatter
this will not enable anthropic compatibility- Parameters:
url-apiKey-model-cacheService-
-
OpenAIRagPuppyChatter
this will not enable anthropic compatibility- Parameters:
url-apiKey-model-
-
-
Method Details
-
setRagHandler
- Specified by:
setRagHandlerin interfaceRagPuppyChatter<OpenAICompatiblePromptParameters,Response>
-
getRagHandler
- Specified by:
getRagHandlerin interfaceRagPuppyChatter<OpenAICompatiblePromptParameters,Response>
-
preprocessMessages
Description copied from class:AbstractHttpPuppyChatterPreprocesses the conversation messages prior to sending them. Can be overridden by subclasses to handle magic strings (e.g., dynamic model switching).- Overrides:
preprocessMessagesin classAbstractHttpPuppyChatter<OpenAICompatiblePromptParameters,Response> - Throws:
Exception
-