nirmato ollama
1.0.0
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.
Target Platform | Target preset |
---|---|
Kotlin/JVM |
|
Kotlin/WasmJS |
|
Kotlin/JS |
|
Linux |
|
MingwX64 |
|
iOS |
|
MacOS |
|
WatchOS |
|
TvOS |
|
Version | Ollama API |
---|---|
1.0.x | 0.3.3 |
< 1.0.0 | 0.3.3 |
val ollama = OllamaClient {
logging = LoggingConfig(logLevel = LogLevel.All)
timeout = TimeoutConfig(socket = 30.seconds)
host = OllamaHost.Local
retry = RetryStrategy(0)
engine = CIO.create()
}
val response = ollama.completion {
model = "tinyllama"
prompt = "Why is the sky blue?"
}
repositories {
maven {
name = "GitHub Apache Maven Packages"
url = uri("https://maven.pkg.github.com/nirmato/nirmato-ollama")
}
}
build.gradle.kt
dependencies {
implementation("org.nirmato.ollama:nirmato-ollama-client:VERSION")
}
settings.xml
<repositories>
<repository>
<id>github</id>
<name>GitHub Apache Maven Packages</name>
<url>https://maven.pkg.github.com/nirmato/nirmato-ollama</url>
<releases>
<enabled>true</enabled>
</releases>
<snapshots>
<enabled>false</enabled>
</snapshots>
</repository>
</repositories>
<dependency>
<groupId>org.nirmato.ollama</groupId>
<artifactId>nirmato-ollama-client-[jvm]</artifactId>
<version>VERSION</version>
</dependency>
Please feel free to submit a pull request. Contributions are welcome!
JetBrains for making Kotlin.
The source code is distributed under Apache License 2.0.