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.
-
#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.
16 17 18 19 20 21 22 23 |
# File 'lib/xfyun/spark.rb', line 16 def initialize @appid = nil @api_key = nil @api_secret = nil @model = DEFAULT_MODEL @host = DEFAULT_HOST @request_timeout = DEFAULT_REQUEST_TIMEOUT end |
Instance Attribute Details
#api_key ⇒ Object
Returns the value of attribute api_key.
10 11 12 |
# File 'lib/xfyun/spark.rb', line 10 def api_key @api_key end |
#api_secret ⇒ Object
Returns the value of attribute api_secret.
10 11 12 |
# File 'lib/xfyun/spark.rb', line 10 def api_secret @api_secret end |
#appid ⇒ Object
Returns the value of attribute appid.
10 11 12 |
# File 'lib/xfyun/spark.rb', line 10 def appid @appid end |
#host ⇒ Object
Returns the value of attribute host.
10 11 12 |
# File 'lib/xfyun/spark.rb', line 10 def host @host end |
#model ⇒ Object
Returns the value of attribute model.
10 11 12 |
# File 'lib/xfyun/spark.rb', line 10 def model @model end |
#request_timeout ⇒ Object
Returns the value of attribute request_timeout.
10 11 12 |
# File 'lib/xfyun/spark.rb', line 10 def request_timeout @request_timeout end |