Class: Google::Apis::DialogflowV2::GoogleCloudDialogflowV2KnowledgeBase

Inherits:
Object
  • Object
show all
Includes:
Core::Hashable, Core::JsonObjectSupport
Defined in:
lib/google/apis/dialogflow_v2/classes.rb,
lib/google/apis/dialogflow_v2/representations.rb,
lib/google/apis/dialogflow_v2/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) ⇒ GoogleCloudDialogflowV2KnowledgeBase

Returns a new instance of GoogleCloudDialogflowV2KnowledgeBase.



10667
10668
10669
# File 'lib/google/apis/dialogflow_v2/classes.rb', line 10667

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)


10652
10653
10654
# File 'lib/google/apis/dialogflow_v2/classes.rb', line 10652

def display_name
  @display_name
end

#language_codeString

Language which represents the KnowledgeBase. When the KnowledgeBase is created/ updated, expect this to be present for non en-us languages. When unspecified, the default language code en-us applies. Corresponds to the JSON property languageCode

Returns:

  • (String)


10659
10660
10661
# File 'lib/google/apis/dialogflow_v2/classes.rb', line 10659

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)


10665
10666
10667
# File 'lib/google/apis/dialogflow_v2/classes.rb', line 10665

def name
  @name
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



10672
10673
10674
10675
10676
# File 'lib/google/apis/dialogflow_v2/classes.rb', line 10672

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