Skip to content

When provider_model is not provided, ChatAuto should look for known environment variables to select a default provider #266

@horeah

Description

@horeah

When provider_model is not specified and CHATLAS_CHAT_PROVIDER_MODEL is not set in the environment, ChatAuto always falls back to a default openai value.

I propose it would make more sense to check the environment for "known" variables and try to guess a better fallback: e.g. if OPENAI_API_KEY is defined, default to openai provider; if GOOGLE_API_KEY is defined, default to google provider, etc. If no known variable is detected, fallback to openai.

This would make it easier for an application that uses chatlas (to provide generic chat access, not tied to a particular provider) to be configured automatically based on the environment, w/out requiring an explicit configuration mechanism within the application (and without having to implement its own detection logic, that would later have to be kept in sync with chatlas' supported models).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions