8000 GitHub - nomisRev/nirmato-ollama: Ollama client for Kotlin Multiplatform
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

nomisRev/nirmato-ollama

 
 

Repository files navigation

nirmato-ollama

kotlin Build Status License

Unofficial Ollama API client for Kotlin multiplatform.

The implementation follows the OpenAPI definition Ollama API described in Ollama API Docs.

Warning

nirmato-ollama is under development.

Report any issue or bug in the GitHub repository.

Dependency

Add the dependency to your project:

Warning

nirmato-ollama is not yet available in a repository.

Gradle

implementation("org.nirmato.ollama:nirmato-ollama-client-ktor:0.1.0")

// example using ktor CIO engine
implementation("io.ktor:ktor-client-cio:3.0.3")

Maven

<dependency>
    <groupId>org.nirmato.ollama</groupId>
    <artifactId>nirmato-ollama-client-ktor</artifactId>
    <version>0.1.0</version>
</dependency>

<!-- example using ktor CIO engine -->
<dependency>
    <groupId>io.ktor</groupId>
    <artifactId>ktor-client-cio</artifactId>
    <version>3.0.3</version>
</dependency>

Alternatively, you can choose individual components of this library.

Usage

val ollamaClient = OllamaClient(CIO)

val request = chatRequest {
    model("tinyllama")
    messages(listOf(Message(role = USER, content = "Why is the sky blue?")))
}

val response = ollamaClient.chat(request)

Acknowledgements

JetBrains for making Kotlin.

License

The source code is distributed under Apache License 2.0.

About

Ollama client for Kotlin Multiplatform

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Kotlin 99.9%
  • JavaScript 0.1%
0