
Wrapper for the ollama REST API, simplifying integration and management through a modular, developer-friendly interface. Streamlines cross-platform communication with easy extensibility.
litellmkts is a wrapper for the ollama REST API that enables its use in cross-platform projects. This project simplifies API integration and management, offering a consistent and developer-friendly interface.
implementation("io.github.lauro299:litellmkts:0.0.3")git clone https://github.com/lauro299/litellmkts.git//With koin
single<ChatHandler> {
val factory = get<HandlerFactory>()
factory.createChatHandler("ollama")
}val chatHandler by inject<ChatHandler>()
chatHandler.chat(
BaseParamsModel().also {
it["model"] = modelName
it["messages"] = _state.value.messages
}
)
.catch {
onEvent(Error)
}
.map { it.message?.content ?: "" }
.reduce { accumulator, value -> "$accumulator$value" })For detailed information about available methods, visit the full documentation.
Contributions are welcome. Please follow these steps:
git checkout -b branch-namegit push origin branch-nameThe HandlerFactory class is a key part of this project as it enables the creation of various types of handlers to manage different API functionalities. Below is an overview of its implementation:
This project is licensed under MIT. See the LICENSE file for more details.
For questions or suggestions, please contact:
litellmkts is a wrapper for the ollama REST API that enables its use in cross-platform projects. This project simplifies API integration and management, offering a consistent and developer-friendly interface.
implementation("io.github.lauro299:litellmkts:0.0.3")git clone https://github.com/lauro299/litellmkts.git//With koin
single<ChatHandler> {
val factory = get<HandlerFactory>()
factory.createChatHandler("ollama")
}val chatHandler by inject<ChatHandler>()
chatHandler.chat(
BaseParamsModel().also {
it["model"] = modelName
it["messages"] = _state.value.messages
}
)
.catch {
onEvent(Error)
}
.map { it.message?.content ?: "" }
.reduce { accumulator, value -> "$accumulator$value" })For detailed information about available methods, visit the full documentation.
Contributions are welcome. Please follow these steps:
git checkout -b branch-namegit push origin branch-nameThe HandlerFactory class is a key part of this project as it enables the creation of various types of handlers to manage different API functionalities. Below is an overview of its implementation:
This project is licensed under MIT. See the LICENSE file for more details.
For questions or suggestions, please contact: