Skip to content
This repository was archived by the owner on Apr 12, 2026. It is now read-only.

Split model_names dictionary and dynamically load chat models#148

Merged
Daethyra merged 3 commits intostreamlitfrom
split-model_dict
Jun 20, 2024
Merged

Split model_names dictionary and dynamically load chat models#148
Daethyra merged 3 commits intostreamlitfrom
split-model_dict

Conversation

@Daethyra
Copy link
Copy Markdown
Owner

  • split model_names into two dictionaries
    • model_names is now a master dictionary
  • update model_names based on the present API keys
    • ex. if an OpenAI API key is loaded via Streamlit's configuration file or manually entered in the sidebar, make all OpenAI models available in the chat model select box

Daethyra added 3 commits June 19, 2024 18:59
…olves #143

- Updated API key handling for OpenAI and Anthropic services to ensure availability of at least one key before proceeding. Refactored model dictionaries for clarity and added a master dictionary to consolidate models based on present API keys.
Refactored API key handling logic to simplify code and ensure models are accessible based on present keys.
@Daethyra Daethyra added the refactor Needs reworking, or is already reworked label Jun 20, 2024
@Daethyra Daethyra linked an issue Jun 20, 2024 that may be closed by this pull request
@Daethyra Daethyra enabled auto-merge June 20, 2024 03:04
@Daethyra Daethyra merged commit 736746b into streamlit Jun 20, 2024
@Daethyra Daethyra deleted the split-model_dict branch June 20, 2024 03:05
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

refactor Needs reworking, or is already reworked

Projects

No open projects
Status: Done

Development

Successfully merging this pull request may close these issues.

Refactor API key loading

1 participant