NextChat icon indicating copy to clipboard operation
NextChat copied to clipboard

[Feature] Multiple base URLs for different models

Open ThomasBaruzier opened this issue 1 year ago • 3 comments

Is your feature request related to a problem? Please describe. It would be useful to be able to use one frontend for multiple backends. For instance, Being able to use OpenAI models as well as local models could prevent one from using multiple instances of the same website.

Describe the solution you'd like A possible solution would be to be able to provide a base URL for each model in the CUSTOM_MODELS variable used when launch a nextchat docker container. For instance: CUSTOM_MODELS='+all,+local-model-1[https://local-api-1.website],+local-model-2[https://local-api-2.website]'. For each model that doesn't have a specified URL, the BASE_URL is used instead.

Describe alternatives you've considered Running multiples instances of the website under different subdomains and multiple nginx server configurations.

ThomasBaruzier avatar Jan 15 '24 14:01 ThomasBaruzier

Thinking of it, it would be useful to be able to select a custom model for title generation. Using a local model for this task would be free.

ThomasBaruzier avatar Jan 16 '24 16:01 ThomasBaruzier

Is your feature request related to a problem? Please describe. It would be useful to be able to use one frontend for multiple backends. For instance, Being able to use OpenAI models as well as local models could prevent one from using multiple instances of the same website.

Describe the solution you'd like A possible solution would be to be able to provide a base URL for each model in the CUSTOM_MODELS variable used when launch a nextchat docker container. For instance: CUSTOM_MODELS='+all,+local-model-1[https://local-api-1.website],+local-model-2[https://local-api-2.website]'. For each model that doesn't have a specified URL, the BASE_URL is used instead.

Describe alternatives you've considered Running multiples instances of the website under different subdomains and multiple nginx server configurations.

Writing that in typescript presents a significant challenge; it's not an easy task, unlike in go so easy plus easy scalable

H0llyW00dzZ avatar Jan 19 '24 02:01 H0llyW00dzZ

@ThomasBaruzier we may consider support different model in the future, but it may takes some time to implement

fred-bf avatar Jan 25 '24 08:01 fred-bf