You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I would find it very helpful if common inference parameters, such as temperature or max. tokens, had normalized argument names. These could then be automatically mapped to the required configuration names for each provider.
For example:
AWS provider uses topP and maxTokens
OpenAI provider uses top_p and max_tokens
This discrepancy necessitates the use of if-else statements to handle different providers, which seems counter to the framework's goal of streamlining integration.
While I am not a professional developer, here’s an idea for implementation:
I think some kind of translator module if we create, will help in this aspect. The translator module will have the state or the fields of the config.
One good thing would have been if we could track the config classes of each Provider 😅. Then hard coding normalized fields won't be required. But yeah, I don't think we can use it here as these providers are being used as packages, And we have no control over the Python environment paths (As they will be user-specific)
Then whenever we call the Provider class and with the set of configs, the translator module will parse the user-given configs to the proper field name w.r.t. the Provider class. Also, for field data type validation can be easily performed by Pydantic.
This is my initial approach. ConfigTranslator will use the providers_config.yml which will contain the mapping between different Providers' config and the NORM_KWARGS@viictorjimenezzz mentioned before. And as we keep adding more Providers we can update the YAML file.
I would find it very helpful if common inference parameters, such as temperature or max. tokens, had normalized argument names. These could then be automatically mapped to the required configuration names for each provider.
For example:
topP
andmaxTokens
top_p
andmax_tokens
This discrepancy necessitates the use of if-else statements to handle different providers, which seems counter to the framework's goal of streamlining integration.
While I am not a professional developer, here’s an idea for implementation:
See: https://github.com/viictorjimenezzz/aisuite
Thank you for considering this request!
The text was updated successfully, but these errors were encountered: