Class: Google::Apis::DialogflowV2beta1::GoogleCloudDialogflowV2beta1KnowledgeBase

Inherits:
Object
  • Object
show all
Includes:
Core::Hashable, Core::JsonObjectSupport
Defined in:
lib/google/apis/dialogflow_v2beta1/classes.rb,
lib/google/apis/dialogflow_v2beta1/representations.rb,
lib/google/apis/dialogflow_v2beta1/representations.rb

Overview

A knowledge base represents a collection of knowledge documents that you provide to Dialogflow. Your knowledge documents contain information that may be useful during conversations with end-users. Some Dialogflow features use knowledge bases when looking for a response to an end-user input. For more information, see the knowledge base guide. Note: The projects.agent.knowledgeBases resource is deprecated; only use projects.knowledgeBases.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ GoogleCloudDialogflowV2beta1KnowledgeBase

Returns a new instance of GoogleCloudDialogflowV2beta1KnowledgeBase.



9767
9768
9769
# File 'lib/google/apis/dialogflow_v2beta1/classes.rb', line 9767

def initialize(**args)
   update!(**args)
end

Instance Attribute Details

#display_nameString

Required. The display name of the knowledge base. The name must be 1024 bytes or less; otherwise, the creation request fails. Corresponds to the JSON property displayName

Returns:

  • (String)


9752
9753
9754
# File 'lib/google/apis/dialogflow_v2beta1/classes.rb', line 9752

def display_name
  @display_name
end

#language_codeString

Language which represents the KnowledgeBase. When the KnowledgeBase is created/ updated, this is populated for all non en-us languages. If not populated, the default language en-us applies. Corresponds to the JSON property languageCode

Returns:

  • (String)


9759
9760
9761
# File 'lib/google/apis/dialogflow_v2beta1/classes.rb', line 9759

def language_code
  @language_code
end

#nameString

The knowledge base resource name. The name must be empty when creating a knowledge base. Format: projects//locations//knowledgeBases/. Corresponds to the JSON property name

Returns:

  • (String)


9765
9766
9767
# File 'lib/google/apis/dialogflow_v2beta1/classes.rb', line 9765

def name
  @name
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



9772
9773
9774
9775
9776
# File 'lib/google/apis/dialogflow_v2beta1/classes.rb', line 9772

def update!(**args)
  @display_name = args[:display_name] if args.key?(:display_name)
  @language_code = args[:language_code] if args.key?(:language_code)
  @name = args[:name] if args.key?(:name)
end