Initial commit
This commit is contained in:
commit
641bc16087
19 changed files with 838 additions and 0 deletions
19
src/main/kotlin/uk/co/brmartin/ollama/api.kt
Normal file
19
src/main/kotlin/uk/co/brmartin/ollama/api.kt
Normal file
|
@ -0,0 +1,19 @@
|
|||
package uk.co.brmartin.ollama
|
||||
|
||||
import kotlinx.serialization.SerialName
|
||||
import kotlinx.serialization.Serializable
|
||||
|
||||
@Serializable
|
||||
data class ResponseBody(val response: String)
|
||||
|
||||
@Serializable
|
||||
data class RequestBody(
|
||||
val model: String,
|
||||
val prompt: String,
|
||||
val suffix: String,
|
||||
val options: Options,
|
||||
val stream: Boolean = true,
|
||||
)
|
||||
|
||||
@Serializable
|
||||
data class Options(val temperature: Int, @SerialName("num_predict") val numPredict: Int)
|
Loading…
Add table
Add a link
Reference in a new issue