Package-level declarations

Types

Link copied to clipboard
@JsonSerializable
data class Message(val role: Role, val content: String, val images: List<Base64Blob>? = null)
Link copied to clipboard
interface Ollama

Docs: https://github.com/ollama/ollama/blob/main/docs/api.md

Link copied to clipboard
interface OllamaAction<R> : Action<Result<R, RemoteFailure>>
Link copied to clipboard
@KotshiJsonAdapterFactory
object OllamaJsonAdapterFactory : JsonAdapter.Factory
Link copied to clipboard
object OllamaMoshi : ConfigurableMoshi
Link copied to clipboard
typealias Prompt = UserPrompt
Link copied to clipboard
Link copied to clipboard
typealias SystemMessage = SystemPrompt
Link copied to clipboard
class Template : AbstractValue<String>

Functions

Link copied to clipboard
fun Ollama.chatCompletion(model: ModelName, messages: List<Message>, stream: Boolean? = null, format: ResponseFormat? = null, keep_alive: String? = null, options: ModelOptions? = null): Result<Sequence<ChatCompletionResponse>, RemoteFailure>
fun Ollama.chatCompletion(model: ModelName, messages: Message, stream: Boolean? = null, format: ResponseFormat? = null, keep_alive: String? = null, options: ModelOptions? = null): Result<Sequence<ChatCompletionResponse>, RemoteFailure>
Link copied to clipboard
fun Ollama.completion(model: ModelName, prompt: UserPrompt, images: List<Base64Blob>? = null, stream: Boolean? = null, system: SystemPrompt? = null, format: ResponseFormat? = null, template: Template? = null, raw: Boolean? = null, keep_alive: String? = null, options: ModelOptions? = null): Result<Sequence<CompletionResponse>, RemoteFailure>
Link copied to clipboard
fun Ollama.createEmbeddings(model: ModelName, prompt: UserPrompt, keep_alive: String? = null, options: ModelOptions? = null): Result<EmbeddingsResponse, RemoteFailure>
Link copied to clipboard
fun Ollama.getModels(): Result<ModelList, RemoteFailure>
Link copied to clipboard
fun Ollama.Companion.Http(http: HttpHandler = JavaHttpClient()): Ollama
Link copied to clipboard
fun Ollama.pullModel(name: ModelName, stream: Boolean? = null): Result<Sequence<PullResponse>, RemoteFailure>