Class CompassUtil
java.lang.Object
com.ssgllc.fish.service.util.registered.CompassUtil
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic com.ssgllc.fish.service.dto.CompassDTOs.CompassChatResponseDTO
adHocChat
(String assistant, String category, String threadId, String extraContext, String message, List<String> tools, List<String> documentCollections, String llm, Integer maxMemory) Initiates an ad-hoc chat session with a specified assistant using given parameters including message, tools, context, model and max memory.
-
Constructor Details
-
CompassUtil
public CompassUtil(com.ssgllc.fish.service.CompassService compassService)
-
-
Method Details
-
adHocChat
public static com.ssgllc.fish.service.dto.CompassDTOs.CompassChatResponseDTO adHocChat(String assistant, String category, String threadId, String extraContext, String message, List<String> tools, List<String> documentCollections, String llm, Integer maxMemory) Initiates an ad-hoc chat session with a specified assistant using given parameters including message, tools, context, model and max memory.- Parameters:
assistant
- The code identifying the assistant to interact with.category
- The category under which the assistant operates.threadId
- The identifier for the chat thread; if null, a new thread ID is generated.extraContext
- Additional context or instructions for the assistant to consider during the chat.message
- The input message sent to the assistant.tools
- A list of tool identifiers that the assistant can access during the chat.documentCollections
- A list of document collection identifiers the assistant can reference.llm
- The language model identifier to use for the chat interaction.maxMemory
- The maximum number of messages in the thread history to use for context- Returns:
- A
CompassDTOs.CompassChatResponseDTO
containing the assistant's response and chat metadata.
Groovy example:
return compassUtil.adHocChat("casetivity-chat", "other-chat", null, "You have access to a 'SayHello' tool, when someone says hi to you, say hi back with this tool, respond back to the user exactly what you receive in the message field from this tool. If you are asked anything else, don't use this tool.", "hi", ["casetivity:all"], ["cas"], "gpt-5-nano", 4)
-