View Source Ollamex.API (Ollamex v0.2.0)
Defines the struct for the parameters of the ollama REST API and provides helper functions for initializing a struct, updating the list of models, and generating a list of models available by the API.
Summary
Functions
Returns a flat list of available LLMs from the ollama REST API api
.
Lazy way of creating a new struct with default values (incl. an URL of http://localhost:11434/api
), instead of %Ollamex.API{}
, that also fetches the list of available LLMs from the ollama REST API.
Same as new/0
, but can be provided with a string representing the full URL of an ollama REST API.
Returns the provided %Ollama.API{}
struct, enriched with the available LLMs from the ollama REST API api
as a list of %Ollama.LLModel{}
structs in the :models
parameter.
Functions
Returns a flat list of available LLMs from the ollama REST API api
.
Lazy way of creating a new struct with default values (incl. an URL of http://localhost:11434/api
), instead of %Ollamex.API{}
, that also fetches the list of available LLMs from the ollama REST API.
Same as new/0
, but can be provided with a string representing the full URL of an ollama REST API.
Returns the provided %Ollama.API{}
struct, enriched with the available LLMs from the ollama REST API api
as a list of %Ollama.LLModel{}
structs in the :models
parameter.