web-ui icon indicating copy to clipboard operation
web-ui copied to clipboard

Refactor LLM settings

Open marginal23326 opened this issue 10 months ago • 4 comments

I moved all LLM provider configs (base url, default model names, etc.), into a single dict PROVIDER_CONFIGS.

This should clean up utils.py (especially the get_llm_model function), and make it easier to add new providers.

marginal23326 avatar Feb 01 '25 03:02 marginal23326

CLA assistant check
All committers have signed the CLA.

CLAassistant avatar Feb 02 '25 05:02 CLAassistant

hello, thanks for your PR. refactor PRs need to be reviewed later, because it gets time to test all over

vvincent1234 avatar Feb 09 '25 00:02 vvincent1234

hello, thanks for your PR. refactor PRs need to be reviewed later, because it gets time to test all over

Got it, thanks for the notice.

marginal23326 avatar Feb 09 '25 01:02 marginal23326

Hi, @warmshao.

Could you review this PR when possible?

Thanks

marginal23326 avatar Mar 27 '25 18:03 marginal23326

Thank you @marginal23326 for this well-organized refactoring of the LLM settings. Centralizing the provider configurations into a single dictionary is a great step towards improving code maintainability and simplifying the addition of new providers. This change should make the get_llm_model function much cleaner and easier to manage.

The modifications in the test suite and environment file also seem well-aligned with the refactoring goals. We appreciate your contribution, and the maintainers will review the code shortly.

warmshao avatar Apr 13 '25 08:04 warmshao