Open danemadsen opened 4 months ago
hey @danemadsen,
Indeed, sounds like a nice thing to have. It should be pretty straightforward to implement, as the model endpoints are already implemented in the respective clients.
I'm currently busy with this ticket, I can work on it afterwards.
Feature request
Many of the different AI platforms have an api for getting a list of available models. For instance Open AI and Mistral have the
/v1/models
endpoint and Ollama has the/api/tags
endpoint.Motivation
This makes it easier to for the user to dynamically set a model and means that when models go outdated, or are no longer compatible with the API they don't have to be manually removed
Your contribution
I've already implemented similar logic for Ollama, Mistral and OpenAI into maid. See below:
https://github.com/Mobile-Artificial-Intelligence/maid/blob/main/lib/classes/open_ai_model.dart#L94-L130
https://github.com/Mobile-Artificial-Intelligence/maid/blob/main/lib/classes/mistral_ai_model.dart#L92-L124
https://github.com/Mobile-Artificial-Intelligence/maid/blob/main/lib/classes/ollama_model.dart#L210-L237