2025-04-11 10:26:40 +00:00
|
|
|
package com.ai.controller;
|
|
|
|
|
|
|
|
import com.ai.service.SimilarService;
|
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
|
import org.springframework.web.bind.annotation.RequestMapping;
|
|
|
|
import org.springframework.web.bind.annotation.RestController;
|
|
|
|
|
|
|
|
@RestController
|
|
|
|
@RequestMapping("/milvus")
|
|
|
|
public class MilvusController {
|
|
|
|
|
|
|
|
@Autowired
|
|
|
|
private SimilarService similarService;
|
|
|
|
|
|
|
|
@RequestMapping("/create")
|
|
|
|
public String create() {
|
|
|
|
similarService.createCollection();
|
|
|
|
return "milvus collection create";
|
|
|
|
}
|
2025-04-12 03:16:44 +00:00
|
|
|
|
|
|
|
@RequestMapping("/vector")
|
|
|
|
public String vector() {
|
|
|
|
similarService.insertProducts();
|
|
|
|
return "vector create";
|
|
|
|
}
|
2025-04-11 10:26:40 +00:00
|
|
|
}
|