Class Nl2sqlForGraphController

java.lang.Object
com.alibaba.cloud.ai.controller.Nl2sqlForGraphController

@RestController @RequestMapping("nl2sql") public class Nl2sqlForGraphController extends Object
Author:
zhangshenghang
  • 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