Skip to content

Commit

Permalink
feat(presentation): refactor AgentController to use a new explain-biz…
Browse files Browse the repository at this point in the history
… endpoint for providing business logic explanations.
  • Loading branch information
phodal committed Mar 30, 2024
1 parent b086944 commit c3b6faf
Showing 1 changed file with 5 additions and 9 deletions.
@@ -1,17 +1,13 @@
package cc.unitmesh.cf.presentation

import cc.unitmesh.cf.domains.DomainClassify
import org.springframework.web.bind.annotation.*

@RestController
@RequestMapping("/agents")
class AgentController(val classify: DomainClassify) {
companion object {
private val log = org.slf4j.LoggerFactory.getLogger(AgentController::class.java)
}

@PostMapping("/smart")
fun smartAgent(@RequestParam("q") query: String): String {
@RequestMapping("/agent")
class AgentController {
@PostMapping("/explain-biz")
// todo: align to OpenAPI format and return Flow<String>
fun explainBiz(): String {
// 1. find problem domain
// 2. match problem domain to solution domain
// 3. find solution domain
Expand Down

0 comments on commit c3b6faf

Please sign in to comment.