We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 6f9819e commit e6aae98Copy full SHA for e6aae98
lib/openai/client.rb
@@ -2,6 +2,7 @@ module OpenAI
2
class Client
3
include OpenAI::HTTP
4
5
+ SENSITIVE_ATTRIBUTES = %i[@access_token @organization_id @extra_headers].freeze
6
CONFIG_KEYS = %i[
7
api_type
8
api_version
@@ -109,12 +110,10 @@ def beta(apis)
109
110
end
111
112
def inspect
- sensitive_attributes = %i[@access_token @organization_id @extra_headers]
113
-
114
vars = instance_variables.map do |var|
115
value = instance_variable_get(var)
116
117
- sensitive_attributes.include?(var) ? "#{var}=[REDACTED]" : "#{var}=#{value.inspect}"
+ SENSITIVE_ATTRIBUTES.include?(var) ? "#{var}=[REDACTED]" : "#{var}=#{value.inspect}"
118
119
120
"#<#{self.class}:#{object_id} #{vars.join(', ')}>"
0 commit comments