Class Ollama4jRestController
java.lang.Object
com.bytedesk.ai.provider.vendors.ollama.Ollama4jRestController
@RestController
@RequestMapping("/api/v1/ollama4j")
public class Ollama4jRestController
extends Object
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionorg.springframework.http.ResponseEntity<JsonResult<List<io.github.ollama4j.models.response.Model>>>
org.springframework.http.ResponseEntity<JsonResult<io.github.ollama4j.models.response.LibraryModelDetail>>
getModelDetails
(String model) org.springframework.http.ResponseEntity<JsonResult<List<io.github.ollama4j.models.response.LibraryModel>>>
org.springframework.http.ResponseEntity<JsonResult<io.github.ollama4j.models.response.LibraryModelTag>>
getModelTag
(String model, String tag) org.springframework.http.ResponseEntity<JsonResult<Boolean>>
ping()
org.springframework.http.ResponseEntity<JsonResult<io.github.ollama4j.models.ps.ModelsProcessResponse>>
org.springframework.http.ResponseEntity<?>
pullModel
(io.github.ollama4j.models.response.LibraryModelTag libraryModelTag)
-
Field Details
-
ollama4jService
-
-
Constructor Details
-
Ollama4jRestController
public Ollama4jRestController()
-
-
Method Details
-
ping
-
getLocalModels
@GetMapping("/local-models") public org.springframework.http.ResponseEntity<JsonResult<List<io.github.ollama4j.models.response.Model>>> getLocalModels() -
getModels
@GetMapping("/models") public org.springframework.http.ResponseEntity<JsonResult<List<io.github.ollama4j.models.response.LibraryModel>>> getModels() -
processModels
@GetMapping("/ps") public org.springframework.http.ResponseEntity<JsonResult<io.github.ollama4j.models.ps.ModelsProcessResponse>> processModels() -
getModelDetails
@GetMapping("/models/{model}/details") public org.springframework.http.ResponseEntity<JsonResult<io.github.ollama4j.models.response.LibraryModelDetail>> getModelDetails(@PathVariable String model) -
getModelTag
@GetMapping("/models/{model}/tags/{tag}") public org.springframework.http.ResponseEntity<JsonResult<io.github.ollama4j.models.response.LibraryModelTag>> getModelTag(@PathVariable String model, @PathVariable String tag) -
pullModel
@PostMapping("/models/pull") public org.springframework.http.ResponseEntity<?> pullModel(@RequestBody io.github.ollama4j.models.response.LibraryModelTag libraryModelTag)
-