All Downloads are FREE. Search and download functionalities are using the official Maven repository.

dev.langchain4j.model.ollama.OllamaApi Maven / Gradle / Ivy

There is a newer version: 1.0.0-alpha1
Show newest version
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/embeddings")
    @Headers({"Content-Type: application/json"})
    Call embedd(@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);
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy