https://github.com/waseigo/ollamex
An Elixir wrapper of the ollama REST API
https://github.com/waseigo/ollamex
Last synced: 6 months ago
JSON representation
An Elixir wrapper of the ollama REST API
- Host: GitHub
- URL: https://github.com/waseigo/ollamex
- Owner: waseigo
- License: apache-2.0
- Created: 2024-01-10T20:14:56.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2025-02-14T20:57:46.000Z (8 months ago)
- Last Synced: 2025-03-25T04:03:56.148Z (6 months ago)
- Language: Elixir
- Homepage:
- Size: 891 KB
- Stars: 12
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Ollamex
An Elixir wrapper of [ollama](https://ollama.ai/)'s REST API with a few niceties built-in, such as dealing with endless LLM repetitions through a timeout.
Ollamex is written based on the [ollama REST API documentation](https://github.com/jmorganca/ollama/blob/main/docs/api.md) for the following endpoints:
* [List Local Models](https://github.com/jmorganca/ollama/blob/main/docs/api.md#list-local-models)
* [Generate a completion](https://github.com/jmorganca/ollama/blob/main/docs/api.md#generate-a-completion)
* [Generate a chat completion](https://github.com/jmorganca/ollama/blob/main/docs/api.md#generate-a-chat-completion)
* [Generate embeddings](https://github.com/jmorganca/ollama/blob/main/docs/api.md#generate-embeddings) (**new** since v0.2.0)The [primary motivation](https://overbring.com/blog/2024-01-10-ollamex-ollama-api-elixir-released/) for this simple Elixir wrapper was to use a timeout and avoid situations in which the LLM gets stuck generating a stream of `\n`, `\t` and whitespace.
## Installation
The package is [available in Hex](https://hex.pm/packages/ollamex) and can be installed by adding `ollamex` to your list of dependencies in `mix.exs`:
```elixir
def deps do
[
{:ollamex, "~> 0.2.0"}
]
end
```## Documentation
The docs can be found at .
## Homepage
The homepage of Ollamex can be found at [overbring.com](https://overbring.com/software/ollamex).
## Donate
Has this library been useful for your project?
[](https://ko-fi.com/V7V119L07A)