![JAR search and dependency download from the Maven repository](/logo.png)
dev.langchain4j.model.ollama.OllamaApi Maven / Gradle / Ivy
package dev.langchain4j.model.ollama;
import okhttp3.ResponseBody;
import retrofit2.Call;
import retrofit2.http.*;
interface OllamaApi {
@POST("api/generate")
@Headers({"Content-Type: application/json"})
Call completion(@Body CompletionRequest completionRequest);
@POST("api/generate")
@Headers({"Content-Type: application/json"})
@Streaming
Call streamingCompletion(@Body CompletionRequest completionRequest);
@POST("api/embed")
@Headers({"Content-Type: application/json"})
Call embed(@Body EmbeddingRequest embeddingRequest);
@POST("api/chat")
@Headers({"Content-Type: application/json"})
Call chat(@Body ChatRequest chatRequest);
@POST("api/chat")
@Headers({"Content-Type: application/json"})
@Streaming
Call streamingChat(@Body ChatRequest chatRequest);
@GET("api/tags")
@Headers({"Content-Type: application/json"})
Call listModels();
@POST("api/show")
@Headers({"Content-Type: application/json"})
Call showInformation(@Body ShowModelInformationRequest modelDetailsRequest);
@HTTP(method = "DELETE", path = "api/delete", hasBody = true)
@Headers({"Content-Type: application/json"})
Call deleteModel(@Body DeleteModelRequest deleteModelRequest);
@GET("api/ps")
@Headers({"Content-Type: application/json"})
Call listRunningModels();
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy