PromptingTools.jl
PromptingTools.jl copied to clipboard
[FR] Move model registry to TOML-based
New models and their aliases are currently defined in src/user_preferences.jl The file is getting hard to manage.
It would be great to move model registry (ie, model name, aliases, prompt schema, description, and prices — ideally including caching discounts!) to several separate TOML files (organized by providers?).
These model files could be easily extended by users and it would make it easier to manage.
Key functionality:
- prevent name collisions (but allow for overwrite when refreshing)
- prevent alias collisions
- allow for a list of aliases
- refresh models on demand
- register a file with user’s model preferences // or just load it (similar to prompt template loading)
- add some nice pretty print that will list all models by provider and their aliases where applicable
Extra
- could we support adding new models via LocalPreferences to make it even simpler for users?
- is there a scope to support more complex model definitions like base_url, api_key, etc?
@svilupp I have a thought this related: whichever might be the new implementation, it would be very much appreciated if it can be ensured that models can still be registered at runtime with immediate effect. :)