#[non_exhaustive]pub struct KnowledgeBase {
pub name: String,
pub display_name: String,
pub language_code: String,
/* private fields */
}knowledge-bases only.Expand description
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.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.name: StringThe knowledge base resource name.
The name must be empty when creating a knowledge base.
Format: projects/<Project ID>/locations/<Location ID>/knowledgeBases/<Knowledge Base ID>.
display_name: StringRequired. The display name of the knowledge base. The name must be 1024 bytes or less; otherwise, the creation request fails.
language_code: StringLanguage 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.
Implementations§
Source§impl KnowledgeBase
impl KnowledgeBase
pub fn new() -> Self
Sourcepub fn set_display_name<T: Into<String>>(self, v: T) -> Self
pub fn set_display_name<T: Into<String>>(self, v: T) -> Self
Sourcepub fn set_language_code<T: Into<String>>(self, v: T) -> Self
pub fn set_language_code<T: Into<String>>(self, v: T) -> Self
Sets the value of language_code.
§Example
let x = KnowledgeBase::new().set_language_code("example");Trait Implementations§
Source§impl Clone for KnowledgeBase
impl Clone for KnowledgeBase
Source§fn clone(&self) -> KnowledgeBase
fn clone(&self) -> KnowledgeBase
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more