Open code-october opened 4 weeks ago
The recent updates introduce a feature to fetch available models from the OpenAI API within the Settings
component. This includes displaying titles, subtitles, and a confirmation dialog for users. Additionally, the locale files for English and Chinese have been updated to support this new feature. A new function fetchAvailableModels
has been added to handle the model fetching process.
Files | Change Summaries |
---|---|
app/components/settings.tsx |
Added functionality to fetch and display available models from the OpenAI API. |
app/locales/cn.ts |
Added AvailableModels section with titles, subtitles, actions, and confirmations in Chinese. |
app/locales/en.ts |
Added AvailableModels section with titles, subtitles, actions, and confirmations in English. |
app/store/access.ts |
Introduced fetchAvailableModels function to fetch and format available models from the API. |
sequenceDiagram
participant User
participant SettingsComponent
participant OpenAIAPI
participant LocaleStore
participant AccessStore
User->>SettingsComponent: Click "Fetch Available Models"
SettingsComponent->>LocaleStore: Get confirmation message
LocaleStore-->>SettingsComponent: Return confirmation message
SettingsComponent->>User: Display confirmation dialog
User->>SettingsComponent: Confirm action
SettingsComponent->>AccessStore: Call fetchAvailableModels function
AccessStore->>OpenAIAPI: Fetch available models
OpenAIAPI-->>AccessStore: Return available models
AccessStore-->>SettingsComponent: Provide formatted model IDs
SettingsComponent->>User: Display fetched models
In code we trust, a feature bright,
To fetch the models in the night.
With titles, prompts, and dialogs clear,
Now models from afar are near.
In English, Chinese, all can see,
The magic of our new API spree.
🌟✨
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?
@code-october is attempting to deploy a commit to the NextChat Team on Vercel.
A member of the Team first needs to authorize it.
Your build has completed!
[Preview deployment]()
Summary by CodeRabbit