Package com.alibaba.cloud.ai.controller
Class Nl2sqlForGraphController
java.lang.Object
com.alibaba.cloud.ai.controller.Nl2sqlForGraphController
- Author:
- zhangshenghang
-
Constructor Summary
ConstructorsConstructorDescriptionNl2sqlForGraphController(com.alibaba.cloud.ai.graph.StateGraph stateGraph, SimpleVectorStoreService simpleVectorStoreService, DatasourceService datasourceService) -
Method Summary
Modifier and TypeMethodDescriptionvoidreactor.core.publisher.Flux<org.springframework.http.codec.ServerSentEvent<String>>streamSearch(String query, String agentId, jakarta.servlet.http.HttpServletResponse response)
-
Constructor Details
-
Nl2sqlForGraphController
public Nl2sqlForGraphController(@Qualifier("nl2sqlGraph") com.alibaba.cloud.ai.graph.StateGraph stateGraph, SimpleVectorStoreService simpleVectorStoreService, DatasourceService datasourceService) throws com.alibaba.cloud.ai.graph.exception.GraphStateException - Throws:
com.alibaba.cloud.ai.graph.exception.GraphStateException
-
-
Method Details
-
search
@GetMapping("/search") public String search(@RequestParam String query, @RequestParam String dataSetId, @RequestParam String agentId) throws Exception - Throws:
Exception
-
init
@GetMapping("/init") public void init(@RequestParam(required=false,defaultValue="1") Integer agentId) throws Exception - Throws:
Exception
-
streamSearch
@GetMapping(value="/stream/search", produces="text/event-stream") public reactor.core.publisher.Flux<org.springframework.http.codec.ServerSentEvent<String>> streamSearch(@RequestParam String query, @RequestParam String agentId, jakarta.servlet.http.HttpServletResponse response) throws Exception - Throws:
Exception
-