Module: RubyCoded::Auth::Providers::OpenAI
- Defined in:
- lib/ruby_coded/auth/providers/openai.rb
Overview
OpenAI provider’s configuration
Class Method Summary collapse
- .auth_methods ⇒ Object
- .auth_url ⇒ Object
- .client_id ⇒ Object
- .console_url ⇒ Object
- .display_name ⇒ Object
- .key_pattern ⇒ Object
- .redirect_uri ⇒ Object
- .ruby_llm_key ⇒ Object
- .scopes ⇒ Object
- .token_url ⇒ Object
Class Method Details
.auth_methods ⇒ Object
16 17 18 19 20 21 22 23 |
# File 'lib/ruby_coded/auth/providers/openai.rb', line 16 def self.auth_methods [ { key: :oauth, label: "With your OpenAI account (requires API credits, " \ "your ChatGPT subscription does not cover API usage)" }, { key: :api_key, label: "With an OpenAI API key (requires API credits at platform.openai.com)" } ] end |
.auth_url ⇒ Object
25 26 27 |
# File 'lib/ruby_coded/auth/providers/openai.rb', line 25 def self.auth_url "https://auth.openai.com/oauth/authorize" end |
.client_id ⇒ Object
12 13 14 |
# File 'lib/ruby_coded/auth/providers/openai.rb', line 12 def self.client_id "app_EMoamEEZ73f0CkXaXp7hrann" end |
.console_url ⇒ Object
33 34 35 |
# File 'lib/ruby_coded/auth/providers/openai.rb', line 33 def self.console_url "https://platform.openai.com/account/api-keys" end |
.display_name ⇒ Object
8 9 10 |
# File 'lib/ruby_coded/auth/providers/openai.rb', line 8 def self.display_name "OpenAI" end |
.key_pattern ⇒ Object
37 38 39 |
# File 'lib/ruby_coded/auth/providers/openai.rb', line 37 def self.key_pattern /\Ask-/ end |
.redirect_uri ⇒ Object
41 42 43 |
# File 'lib/ruby_coded/auth/providers/openai.rb', line 41 def self.redirect_uri "http://localhost:1455/auth/callback" end |
.ruby_llm_key ⇒ Object
49 50 51 |
# File 'lib/ruby_coded/auth/providers/openai.rb', line 49 def self.ruby_llm_key :openai_api_key end |
.scopes ⇒ Object
45 46 47 |
# File 'lib/ruby_coded/auth/providers/openai.rb', line 45 def self.scopes "offline_access" end |
.token_url ⇒ Object
29 30 31 |
# File 'lib/ruby_coded/auth/providers/openai.rb', line 29 def self.token_url "https://auth.openai.com/oauth/token" end |