12345678910111213141516171819202122 |
- package com.backendsys.modules.sdk.bocha.controller;
- import com.backendsys.modules.common.utils.Result;
- import com.backendsys.modules.sdk.bocha.entity.BochaParam;
- import com.backendsys.modules.sdk.bocha.service.BochaService;
- import org.springframework.beans.factory.annotation.Autowired;
- import org.springframework.validation.annotation.Validated;
- import org.springframework.web.bind.annotation.PostMapping;
- import org.springframework.web.bind.annotation.RequestBody;
- import org.springframework.web.bind.annotation.RestController;
- @RestController
- public class BochaController {
- @Autowired
- private BochaService bochaService;
- @PostMapping("/api/bochat/web-search")
- public Result webSearch(@Validated @RequestBody BochaParam bochaParam) {
- return Result.success().put("data", bochaService.WebSearch(bochaParam));
- }
- }
|