File tree Expand file tree Collapse file tree
OpenAIService/Configuration Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -35,6 +35,10 @@ public struct Keychain: KeychainType {
3535 let service = keychainService
3636 let accessGroup = keychainAccessGroup
3737 let scope : String
38+
39+ public static var apiKey : Keychain {
40+ Keychain ( scope: " apiKey " )
41+ }
3842
3943 public enum Error : Swift . Error {
4044 case failedToDeleteFromKeyChain
Original file line number Diff line number Diff line change @@ -19,7 +19,7 @@ public extension ChatGPTConfiguration {
1919 }
2020
2121 var apiKey : String {
22- ( try ? Keychain ( scope : " apikey " ) . get ( model. info. apiKeyName) ) ?? " "
22+ ( try ? Keychain . apiKey . get ( model. info. apiKeyName) ) ?? " "
2323 }
2424
2525 func overriding(
Original file line number Diff line number Diff line change @@ -16,7 +16,7 @@ public extension EmbeddingConfiguration {
1616 }
1717
1818 var apiKey : String {
19- ( try ? Keychain ( scope : " apikey " ) . get ( model. info. apiKeyName) ) ?? " "
19+ ( try ? Keychain . apiKey . get ( model. info. apiKeyName) ) ?? " "
2020 }
2121
2222 func overriding(
You can’t perform that action at this time.
0 commit comments