Module: Anthropic
- Defined in:
- lib/anthropic.rb,
lib/anthropic/version.rb,
lib/anthropic/api/base.rb,
lib/anthropic/client/base.rb,
lib/anthropic/api/messages.rb,
lib/anthropic/bootstrapper.rb,
lib/anthropic/api/completions.rb,
lib/anthropic/client/standard.rb,
lib/anthropic/client/streaming.rb,
lib/anthropic/api/concerns/requestable.rb,
lib/anthropic/api/concerns/validatable.rb
Overview
Namespace for anthropic-rb gem
Defined Under Namespace
Modules: Api, Bootstrapper, Client
Constant Summary
collapse
- VERSION =
'0.6.0'
Class Method Summary
collapse
Class Method Details
.api_host ⇒ Object
32
33
34
|
# File 'lib/anthropic.rb', line 32
def self.api_host
@api_host || ENV.fetch('ANTHROPIC_API_HOST', 'https://api.anthropic.com')
end
|
.api_host=(api_host = nil) ⇒ Object
36
37
38
|
# File 'lib/anthropic.rb', line 36
def self.api_host=(api_host = nil)
@api_host = api_host
end
|
.api_key ⇒ Object
24
25
26
|
# File 'lib/anthropic.rb', line 24
def self.api_key
@api_key || ENV.fetch('ANTHROPIC_API_KEY', nil)
end
|
.api_key=(api_key = nil) ⇒ Object
28
29
30
|
# File 'lib/anthropic.rb', line 28
def self.api_key=(api_key = nil)
@api_key = api_key
end
|
.api_version ⇒ Object
40
41
42
|
# File 'lib/anthropic.rb', line 40
def self.api_version
@api_version || ENV.fetch('ANTHROPIC_API_VERSION', '2023-06-01')
end
|
.api_version=(api_version = nil) ⇒ Object
44
45
46
|
# File 'lib/anthropic.rb', line 44
def self.api_version=(api_version = nil)
@api_version = api_version
end
|
.betas ⇒ Object
48
49
50
|
# File 'lib/anthropic.rb', line 48
def self.betas
@betas
end
|
.reset ⇒ Object
18
19
20
21
22
|
# File 'lib/anthropic.rb', line 18
def self.reset
@api_key = nil
@api_host = nil
@api_version = nil
end
|
.setup {|_self| ... } ⇒ Object
.versions ⇒ Object
52
53
54
|
# File 'lib/anthropic.rb', line 52
def self.versions
@versions
end
|