8000 feat: OpenAIモデル名を変更可能にする by nyanko3141592 · Pull Request #121 · azooKey/azooKey-Desktop · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

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

Conversation

nyanko3141592
Copy link
Collaborator

OpenAI APIを利用する際、gpt-4o-mini以外のモデル (GPT-4.1など) も利用できるように、設定画面からモデル名を指定できるようにする。

主な変更点:

  • ConfigOpenAiModelName 設定項目を追加 (デフォルト値: "gpt-4o-mini")
  • 設定画面 (ConfigWindow) にモデル名を入力するTextFieldを追加
  • OpenAIClient が設定されたモデル名を使用するように修正
  • Config定義の構成をリファクタリングし、再宣言エラーを解消
  • APIリクエスト時に使用するモデル名をデバッグログに出力する機能を追加

OpenAI APIを利用する際、gpt-4o-mini以外のモデル (GPT-4.1など) も利用できるように、設定画面からモデル名を指定できるようにする。

主な変更点:
- `Config` に `OpenAiModelName` 設定項目を追加 (デフォルト値: "gpt-4o-mini")
- 設定画面 (`ConfigWindow`) にモデル名を入力するTextFieldを追加
- `OpenAIClient` が設定されたモデル名を使用するように修正
- Config定義の構成をリファクタリングし、再宣言エラーを解消
- APIリクエスト時に使用するモデル名をデバッグログに出力する機能を追加
Copy link
@Copilot Copilot AI left a 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()

Copy link
Member
@ensan-hcl ensan-hcl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

まだAIには任せきれないですね

@nyanko3141592 nyanko3141592 force-pushed the 120-feat-いい感じ変換用のapiのモデル名を変更可能にする branch 2 times, most recently from f190c32 to eef614d Compare April 19, 2025 09:24
@nyanko3141592 nyanko3141592 force-pushed the 120-feat-いい感じ変換用のapiのモデル名を変更可能にする branch from eef614d to fc82153 Compare April 19, 2025 09:25
@ensan-hcl ensan-hcl self-requested a review April 22, 2025 13:32
Copy link
Member
@ensan-hcl ensan-hcl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

動作確認OK!٩(ˊᗜˋ*)و

@ensan-hcl ensan-hcl merged commit 180ed77 into main Apr 22, 2025
@ensan-hcl ensan-hcl deleted the 120-feat-いい感じ変換用のapiのモデル名を変更可能にする branch April 22, 2025 13:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

feat: いい感じ変換用のAPIのモデル名を変更可能にする
2 participants
0