Class: Xfyun::Spark::Configuration
- Inherits:
-
Object
- Object
- Xfyun::Spark::Configuration
- Defined in:
- lib/xfyun/spark.rb
Constant Summary collapse
- DEFAULT_MODEL =
"V1.5".freeze
- DEFAULT_HOST =
"spark-api.xf-yun.com".freeze
- DEFAULT_REQUEST_TIMEOUT =
120
Instance Attribute Summary collapse
-
#api_key ⇒ Object
Returns the value of attribute api_key.
-
#api_secret ⇒ Object
Returns the value of attribute api_secret.
-
#appid ⇒ Object
Returns the value of attribute appid.
-
#host ⇒ Object
Returns the value of attribute host.
-
#logger ⇒ Object
Returns the value of attribute logger.
-
#model ⇒ Object
Returns the value of attribute model.
-
#request_timeout ⇒ Object
Returns the value of attribute request_timeout.
Instance Method Summary collapse
-
#initialize ⇒ Configuration
constructor
A new instance of Configuration.
Constructor Details
#initialize ⇒ Configuration
Returns a new instance of Configuration.
17 18 19 20 21 22 23 24 25 |
# File 'lib/xfyun/spark.rb', line 17 def initialize @appid = nil @api_key = nil @api_secret = nil @model = DEFAULT_MODEL @host = DEFAULT_HOST @request_timeout = DEFAULT_REQUEST_TIMEOUT @logger = nil # Logger.new($stdout) end |
Instance Attribute Details
#api_key ⇒ Object
Returns the value of attribute api_key.
11 12 13 |
# File 'lib/xfyun/spark.rb', line 11 def api_key @api_key end |
#api_secret ⇒ Object
Returns the value of attribute api_secret.
11 12 13 |
# File 'lib/xfyun/spark.rb', line 11 def api_secret @api_secret end |
#appid ⇒ Object
Returns the value of attribute appid.
11 12 13 |
# File 'lib/xfyun/spark.rb', line 11 def appid @appid end |
#host ⇒ Object
Returns the value of attribute host.
11 12 13 |
# File 'lib/xfyun/spark.rb', line 11 def host @host end |
#logger ⇒ Object
Returns the value of attribute logger.
11 12 13 |
# File 'lib/xfyun/spark.rb', line 11 def logger @logger end |
#model ⇒ Object
Returns the value of attribute model.
11 12 13 |
# File 'lib/xfyun/spark.rb', line 11 def model @model end |
#request_timeout ⇒ Object
Returns the value of attribute request_timeout.
11 12 13 |
# File 'lib/xfyun/spark.rb', line 11 def request_timeout @request_timeout end |