Class TurAIAgentChatAPI
java.lang.Object
com.viglet.turing.api.agent.TurAIAgentChatAPI
@RestController
@RequestMapping("/api/v2/ai-agent/{agentId}")
public class TurAIAgentChatAPI
extends Object
Chat endpoint for AI Agent. Each agent has its own LLM instances,
MCP servers and system prompt.
- Since:
- 2026.1.14
- Author:
- Alexandre Oliveira
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final recordstatic final recordstatic final record -
Constructor Summary
ConstructorsConstructorDescriptionTurAIAgentChatAPI(TurAIAgentRepository turAIAgentRepository, TurLLMInstanceRepository turLLMInstanceRepository, TurGenAiLlmProviderFactory llmProviderFactory, TurSecretCryptoService turSecretCryptoService, TurNativeToolService nativeToolService, TurMcpToolCallbackService mcpToolCallbackService, TurLLMTokenUsageService tokenUsageService) -
Method Summary
Modifier and TypeMethodDescriptionreactor.core.publisher.Flux<TurAIAgentChatAPI.ChatResponse> chat(String agentId, TurAIAgentChatAPI.AgentChatRequest request) contextInfo(String agentId, String llmInstanceId)
-
Constructor Details
-
TurAIAgentChatAPI
public TurAIAgentChatAPI(TurAIAgentRepository turAIAgentRepository, TurLLMInstanceRepository turLLMInstanceRepository, TurGenAiLlmProviderFactory llmProviderFactory, TurSecretCryptoService turSecretCryptoService, TurNativeToolService nativeToolService, TurMcpToolCallbackService mcpToolCallbackService, TurLLMTokenUsageService tokenUsageService)
-
-
Method Details
-
chat
@PostMapping(value="/chat", produces="text/event-stream", consumes="application/json") public reactor.core.publisher.Flux<TurAIAgentChatAPI.ChatResponse> chat(@PathVariable String agentId, @RequestBody TurAIAgentChatAPI.AgentChatRequest request) -
contextInfo
@GetMapping("/chat/context-info") public TurLLMChatAPI.ContextInfoResponse contextInfo(@PathVariable String agentId, @RequestParam String llmInstanceId)
-