-
-
Notifications
You must be signed in to change notification settings - Fork 14
feat: OpenAIモデル名を変更可能にする #121
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
The head ref may contain hidden characters: "120-feat-\u3044\u3044\u611F\u3058\u5909\u63DB\u7528\u306Eapi\u306E\u30E2\u30C7\u30EB\u540D\u3092\u5909\u66F4\u53EF\u80FD\u306B\u3059\u308B"
Conversation
OpenAI APIを利用する際、gpt-4o-mini以外のモデル (GPT-4.1など) も利用できるように、設定画面からモデル名を指定できるようにする。 主な変更点: - `Config` に `OpenAiModelName` 設定項目を追加 (デフォルト値: "gpt-4o-mini") - 設定画面 (`ConfigWindow`) にモデル名を入力するTextFieldを追加 - `OpenAIClient` が設定されたモデル名を使用するように修正 - Config定義の構成をリファクタリングし、再宣言エラーを解消 - APIリクエスト時に使用するモデル名をデバッグログに出力する機能を追加
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR adds the ability to specify a custom OpenAI model name via the settings UI, updating both configuration and API request handling.
- Added a new Config setting (openAiModelName) with a default value "gpt-4o-mini".
- Updated the settings window (ConfigWindow.swift) to include a TextField for inputting the model name.
- Modified OpenAIClient and azooKeyMacInputController to use the configured model name and log it for debugging purposes.
Reviewed Changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated no comments.
Show a summary per file
File | Description |
---|---|
azooKeyMac/Windows/ConfigWindow.swift | Added TextField and binding for OpenAI model name. |
azooKeyMac/InputController/azooKeyMacInputController.swift | Updated API request to include the model name and enhanced related debug messages. |
azooKeyMac/InputController/OpenAIClient.swift | Changed OpenAI request JSON construction to use the provided model name. |
azooKeyMac/Configs/StringConfigItem.swift | Refactored config item definition for openAiApiKey. |
azooKeyMac/Configs/CustomCodableConfigItem.swift | Added new config item for openAiModelName with default value. |
Comments suppressed due to low confidence (1)
azooKeyMac/Configs/CustomCodableConfigItem.swift:146
- [nitpick] Consider renaming the config property to align with the external branding 'OpenAI' (with AI in uppercase), for example, renaming 'openAiModelName' to 'openAIModelName'.
static let openAiModelName = OpenAiModelName()
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
まだAIには任せきれないですね
f190c32
to
eef614d
Compare
eef614d
to
fc82153
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
動作確認OK!٩(ˊᗜˋ*)و
OpenAI APIを利用する際、gpt-4o-mini以外のモデル (GPT-4.1など) も利用できるように、設定画面からモデル名を指定できるようにする。
主な変更点:
Config
にOpenAiModelName
設定項目を追加 (デフォルト値: "gpt-4o-mini")ConfigWindow
) にモデル名を入力するTextFieldを追加OpenAIClient
が設定されたモデル名を使用するように修正