INSTRUCTION
stringlengths
1
46.3k
RESPONSE
stringlengths
75
80.2k
Return a json dictionary representing this model.
def _to_dict(self): """Return a json dictionary representing this model.""" _dict = {} if hasattr(self, 'text') and self.text is not None: _dict['text'] = self.text if hasattr(self, 'type') and self.type is not None: _dict['type'] = self.type if hasattr(se...
Initialize a QueryEvidence object from a json dictionary.
def _from_dict(cls, _dict): """Initialize a QueryEvidence object from a json dictionary.""" args = {} if 'document_id' in _dict: args['document_id'] = _dict.get('document_id') if 'field' in _dict: args['field'] = _dict.get('field') if 'start_offset' in _di...
Return a json dictionary representing this model.
def _to_dict(self): """Return a json dictionary representing this model.""" _dict = {} if hasattr(self, 'document_id') and self.document_id is not None: _dict['document_id'] = self.document_id if hasattr(self, 'field') and self.field is not None: _dict['field'] = ...
Return a json dictionary representing this model.
def _to_dict(self): """Return a json dictionary representing this model.""" _dict = {} if hasattr(self, 'type') and self.type is not None: _dict['type'] = self.type if hasattr(self, 'text') and self.text is not None: _dict['text'] = self.text if hasattr(se...
Return a json dictionary representing this model.
def _to_dict(self): """Return a json dictionary representing this model.""" _dict = {} if hasattr(self, 'exclude') and self.exclude is not None: _dict['exclude'] = self.exclude if hasattr(self, 'include') and self.include is not None: _dict['include'] = self.inclu...
Initialize a QueryNoticesResponse object from a json dictionary.
def _from_dict(cls, _dict): """Initialize a QueryNoticesResponse object from a json dictionary.""" args = {} if 'matching_results' in _dict: args['matching_results'] = _dict.get('matching_results') if 'results' in _dict: args['results'] = [ QueryNo...
Return a json dictionary representing this model.
def _to_dict(self): """Return a json dictionary representing this model.""" _dict = {} if hasattr(self, 'matching_results') and self.matching_results is not None: _dict['matching_results'] = self.matching_results if hasattr(self, 'results') and self.results...
Initialize a QueryNoticesResult object from a json dictionary.
def _from_dict(cls, _dict): """Initialize a QueryNoticesResult object from a json dictionary.""" args = {} xtra = _dict.copy() if 'id' in _dict: args['id'] = _dict.get('id') del xtra['id'] if 'metadata' in _dict: args['metadata'] = _dict.get('m...
Return a json dictionary representing this model.
def _to_dict(self): """Return a json dictionary representing this model.""" _dict = {} if hasattr(self, 'id') and self.id is not None: _dict['id'] = self.id if hasattr(self, 'metadata') and self.metadata is not None: _dict['metadata'] = self.metadata if ha...
Return a json dictionary representing this model.
def _to_dict(self): """Return a json dictionary representing this model.""" _dict = {} if hasattr(self, 'document_id') and self.document_id is not None: _dict['document_id'] = self.document_id if hasattr(self, 'passage_score') and self.passage_score is not None: _...
Initialize a QueryRelationsArgument object from a json dictionary.
def _from_dict(cls, _dict): """Initialize a QueryRelationsArgument object from a json dictionary.""" args = {} if 'entities' in _dict: args['entities'] = [ QueryEntitiesEntity._from_dict(x) for x in (_dict.get('entities')) ] return ...
Return a json dictionary representing this model.
def _to_dict(self): """Return a json dictionary representing this model.""" _dict = {} if hasattr(self, 'relation_types') and self.relation_types is not None: _dict['relation_types'] = self.relation_types._to_dict() if hasattr(self, 'entity_types') and self.entity_types is no...
Initialize a QueryRelationsRelationship object from a json dictionary.
def _from_dict(cls, _dict): """Initialize a QueryRelationsRelationship object from a json dictionary.""" args = {} if 'type' in _dict: args['type'] = _dict.get('type') if 'frequency' in _dict: args['frequency'] = _dict.get('frequency') if 'arguments' in _d...
Return a json dictionary representing this model.
def _to_dict(self): """Return a json dictionary representing this model.""" _dict = {} if hasattr(self, 'type') and self.type is not None: _dict['type'] = self.type if hasattr(self, 'frequency') and self.frequency is not None: _dict['frequency'] = self.frequency ...
Initialize a QueryRelationsResponse object from a json dictionary.
def _from_dict(cls, _dict): """Initialize a QueryRelationsResponse object from a json dictionary.""" args = {} if 'relations' in _dict: args['relations'] = [ QueryRelationsRelationship._from_dict(x) for x in (_dict.get('relations')) ] ...
Return a json dictionary representing this model.
def _to_dict(self): """Return a json dictionary representing this model.""" _dict = {} if hasattr(self, 'relations') and self.relations is not None: _dict['relations'] = [x._to_dict() for x in self.relations] return _dict
Initialize a QueryResponse object from a json dictionary.
def _from_dict(cls, _dict): """Initialize a QueryResponse object from a json dictionary.""" args = {} if 'matching_results' in _dict: args['matching_results'] = _dict.get('matching_results') if 'results' in _dict: args['results'] = [ QueryResult._f...
Initialize a QueryResult object from a json dictionary.
def _from_dict(cls, _dict): """Initialize a QueryResult object from a json dictionary.""" args = {} xtra = _dict.copy() if 'id' in _dict: args['id'] = _dict.get('id') del xtra['id'] if 'metadata' in _dict: args['metadata'] = _dict.get('metadata...
Return a json dictionary representing this model.
def _to_dict(self): """Return a json dictionary representing this model.""" _dict = {} if hasattr(self, 'id') and self.id is not None: _dict['id'] = self.id if hasattr(self, 'metadata') and self.metadata is not None: _dict['metadata'] = self.metadata if ha...
Return a json dictionary representing this model.
def _to_dict(self): """Return a json dictionary representing this model.""" _dict = {} if hasattr(self, 'score') and self.score is not None: _dict['score'] = self.score if hasattr(self, 'confidence') and self.confidence is not None: _dict['confidence'] = self.conf...
Return a json dictionary representing this model.
def _to_dict(self): """Return a json dictionary representing this model.""" _dict = {} if hasattr(self, 'document_retrieval_strategy' ) and self.document_retrieval_strategy is not None: _dict[ 'document_retrieval_strategy'] = self.document_retrieval_...
Return a json dictionary representing this model.
def _to_dict(self): """Return a json dictionary representing this model.""" _dict = {} if hasattr(self, 'scope') and self.scope is not None: _dict['scope'] = self.scope if hasattr(self, 'status') and self.status is not None: _dict['status'] = self.status i...
Return a json dictionary representing this model.
def _to_dict(self): """Return a json dictionary representing this model.""" _dict = {} if hasattr(self, 'enabled') and self.enabled is not None: _dict['enabled'] = self.enabled if hasattr(self, 'selector_tags') and self.selector_tags is not None: _dict['selector_t...
Initialize a Source object from a json dictionary.
def _from_dict(cls, _dict): """Initialize a Source object from a json dictionary.""" args = {} if 'type' in _dict: args['type'] = _dict.get('type') if 'credential_id' in _dict: args['credential_id'] = _dict.get('credential_id') if 'schedule' in _dict: ...
Return a json dictionary representing this model.
def _to_dict(self): """Return a json dictionary representing this model.""" _dict = {} if hasattr(self, 'type') and self.type is not None: _dict['type'] = self.type if hasattr(self, 'credential_id') and self.credential_id is not None: _dict['credential_id'] = self...
Initialize a SourceOptions object from a json dictionary.
def _from_dict(cls, _dict): """Initialize a SourceOptions object from a json dictionary.""" args = {} if 'folders' in _dict: args['folders'] = [ SourceOptionsFolder._from_dict(x) for x in (_dict.get('folders')) ] if 'objects' in _di...
Return a json dictionary representing this model.
def _to_dict(self): """Return a json dictionary representing this model.""" _dict = {} if hasattr(self, 'owner_user_id') and self.owner_user_id is not None: _dict['owner_user_id'] = self.owner_user_id if hasattr(self, 'folder_id') and self.folder_id is not None: _...
Return a json dictionary representing this model.
def _to_dict(self): """Return a json dictionary representing this model.""" _dict = {} if hasattr(self, 'folders') and self.folders is not None: _dict['folders'] = [x._to_dict() for x in self.folders] if hasattr(self, 'objects') and self.objects is not None: _dict...
Return a json dictionary representing this model.
def _to_dict(self): """Return a json dictionary representing this model.""" _dict = {} if hasattr(self, 'name') and self.name is not None: _dict['name'] = self.name if hasattr(self, 'limit') and self.limit is not None: _dict['limit'] = self.limit return _d...
Return a json dictionary representing this model.
def _to_dict(self): """Return a json dictionary representing this model.""" _dict = {} if hasattr(self, 'url') and self.url is not None: _dict['url'] = self.url if hasattr(self, 'limit_to_starting_hosts' ) and self.limit_to_starting_hosts is not None: ...
Return a json dictionary representing this model.
def _to_dict(self): """Return a json dictionary representing this model.""" _dict = {} if hasattr(self, 'site_collection_path' ) and self.site_collection_path is not None: _dict['site_collection_path'] = self.site_collection_path if hasattr(self, 'limit') an...
Return a json dictionary representing this model.
def _to_dict(self): """Return a json dictionary representing this model.""" _dict = {} if hasattr(self, 'enabled') and self.enabled is not None: _dict['enabled'] = self.enabled if hasattr(self, 'time_zone') and self.time_zone is not None: _dict['time_zone'] = self...
Return a json dictionary representing this model.
def _to_dict(self): """Return a json dictionary representing this model.""" _dict = {} if hasattr(self, 'status') and self.status is not None: _dict['status'] = self.status if hasattr(self, 'last_updated') and self.last_updated is not None: _dict['last_updated'] =...
Return a json dictionary representing this model.
def _to_dict(self): """Return a json dictionary representing this model.""" _dict = {} if hasattr(self, 'field') and self.field is not None: _dict['field'] = self.field if hasattr(self, 'count') and self.count is not None: _dict['count'] = self.count retur...
Return a json dictionary representing this model.
def _to_dict(self): """Return a json dictionary representing this model.""" _dict = {} if hasattr(self, 'field') and self.field is not None: _dict['field'] = self.field if hasattr(self, 'interval') and self.interval is not None: _dict['interval'] = self.interval ...
Return a json dictionary representing this model.
def _to_dict(self): """Return a json dictionary representing this model.""" _dict = {} if hasattr(self, 'text') and self.text is not None: _dict['text'] = self.text if hasattr(self, 'tokens') and self.tokens is not None: _dict['tokens'] = self.tokens if ha...
Return a json dictionary representing this model.
def _to_dict(self): """Return a json dictionary representing this model.""" _dict = {} if hasattr(self, 'status') and self.status is not None: _dict['status'] = self.status if hasattr(self, 'type') and self.type is not None: _dict['type'] = self.type retur...
Return a json dictionary representing this model.
def _to_dict(self): """Return a json dictionary representing this model.""" _dict = {} if hasattr(self, 'size') and self.size is not None: _dict['size'] = self.size if hasattr(self, 'hits') and self.hits is not None: _dict['hits'] = self.hits._to_dict() re...
Initialize a TopHitsResults object from a json dictionary.
def _from_dict(cls, _dict): """Initialize a TopHitsResults object from a json dictionary.""" args = {} if 'matching_results' in _dict: args['matching_results'] = _dict.get('matching_results') if 'hits' in _dict: args['hits'] = [ QueryResult._from_d...
Return a json dictionary representing this model.
def _to_dict(self): """Return a json dictionary representing this model.""" _dict = {} if hasattr(self, 'matching_results') and self.matching_results is not None: _dict['matching_results'] = self.matching_results if hasattr(self, 'hits') and self.hits is no...
Initialize a TrainingDataSet object from a json dictionary.
def _from_dict(cls, _dict): """Initialize a TrainingDataSet object from a json dictionary.""" args = {} if 'environment_id' in _dict: args['environment_id'] = _dict.get('environment_id') if 'collection_id' in _dict: args['collection_id'] = _dict.get('collection_id...
Return a json dictionary representing this model.
def _to_dict(self): """Return a json dictionary representing this model.""" _dict = {} if hasattr(self, 'environment_id') and self.environment_id is not None: _dict['environment_id'] = self.environment_id if hasattr(self, 'collection_id') and self.collection_id is not None: ...
Return a json dictionary representing this model.
def _to_dict(self): """Return a json dictionary representing this model.""" _dict = {} if hasattr(self, 'document_id') and self.document_id is not None: _dict['document_id'] = self.document_id if hasattr(self, 'cross_reference') and self.cross_reference is ...
Initialize a TrainingExampleList object from a json dictionary.
def _from_dict(cls, _dict): """Initialize a TrainingExampleList object from a json dictionary.""" args = {} if 'examples' in _dict: args['examples'] = [ TrainingExample._from_dict(x) for x in (_dict.get('examples')) ] return cls(**args)
Return a json dictionary representing this model.
def _to_dict(self): """Return a json dictionary representing this model.""" _dict = {} if hasattr(self, 'examples') and self.examples is not None: _dict['examples'] = [x._to_dict() for x in self.examples] return _dict
Initialize a TrainingQuery object from a json dictionary.
def _from_dict(cls, _dict): """Initialize a TrainingQuery object from a json dictionary.""" args = {} if 'query_id' in _dict: args['query_id'] = _dict.get('query_id') if 'natural_language_query' in _dict: args['natural_language_query'] = _dict.get('natural_languag...
Return a json dictionary representing this model.
def _to_dict(self): """Return a json dictionary representing this model.""" _dict = {} if hasattr(self, 'query_id') and self.query_id is not None: _dict['query_id'] = self.query_id if hasattr(self, 'natural_language_query' ) and self.natural_language_query i...
Return a json dictionary representing this model.
def _to_dict(self): """Return a json dictionary representing this model.""" _dict = {} if hasattr(self, 'total_examples') and self.total_examples is not None: _dict['total_examples'] = self.total_examples if hasattr(self, 'available') and self.available is not None: ...
Initialize a WordHeadingDetection object from a json dictionary.
def _from_dict(cls, _dict): """Initialize a WordHeadingDetection object from a json dictionary.""" args = {} if 'fonts' in _dict: args['fonts'] = [ FontSetting._from_dict(x) for x in (_dict.get('fonts')) ] if 'styles' in _dict: args['st...
Return a json dictionary representing this model.
def _to_dict(self): """Return a json dictionary representing this model.""" _dict = {} if hasattr(self, 'fonts') and self.fonts is not None: _dict['fonts'] = [x._to_dict() for x in self.fonts] if hasattr(self, 'styles') and self.styles is not None: _dict['styles']...
Return a json dictionary representing this model.
def _to_dict(self): """Return a json dictionary representing this model.""" _dict = {} if hasattr(self, 'level') and self.level is not None: _dict['level'] = self.level if hasattr(self, 'names') and self.names is not None: _dict['names'] = self.names retur...
Return a json dictionary representing this model.
def _to_dict(self): """Return a json dictionary representing this model.""" _dict = {} if hasattr(self, 'xpaths') and self.xpaths is not None: _dict['xpaths'] = self.xpaths return _dict
Analyze general tone. Use the general purpose endpoint to analyze the tone of your input content. The service analyzes the content for emotional and language tones. The method always analyzes the tone of the full document; by default, it also analyzes the tone of each individual sentenc...
def tone(self, tone_input, sentences=None, tones=None, content_language=None, accept_language=None, content_type=None, **kwargs): """ Analyze general tone. Use the general purpose endpoint to analyze the ...
Analyze customer engagement tone. Use the customer engagement endpoint to analyze the tone of customer service and customer support conversations. For each utterance of a conversation, the method reports the most prevalent subset of the following seven tones: sad, frustrated, satisfied,...
def tone_chat(self, utterances, content_language=None, accept_language=None, **kwargs): """ Analyze customer engagement tone. Use the customer engagement endpoint to analyze the tone of customer service and customer...
Initialize a DocumentAnalysis object from a json dictionary.
def _from_dict(cls, _dict): """Initialize a DocumentAnalysis object from a json dictionary.""" args = {} if 'tones' in _dict: args['tones'] = [ ToneScore._from_dict(x) for x in (_dict.get('tones')) ] if 'tone_categories' in _dict: args[...
Return a json dictionary representing this model.
def _to_dict(self): """Return a json dictionary representing this model.""" _dict = {} if hasattr(self, 'tones') and self.tones is not None: _dict['tones'] = [x._to_dict() for x in self.tones] if hasattr(self, 'tone_categories') and self.tone_categories is ...
Initialize a SentenceAnalysis object from a json dictionary.
def _from_dict(cls, _dict): """Initialize a SentenceAnalysis object from a json dictionary.""" args = {} if 'sentence_id' in _dict: args['sentence_id'] = _dict.get('sentence_id') else: raise ValueError( 'Required property \'sentence_id\' not presen...
Return a json dictionary representing this model.
def _to_dict(self): """Return a json dictionary representing this model.""" _dict = {} if hasattr(self, 'sentence_id') and self.sentence_id is not None: _dict['sentence_id'] = self.sentence_id if hasattr(self, 'text') and self.text is not None: _dict['text'] = sel...
Initialize a ToneAnalysis object from a json dictionary.
def _from_dict(cls, _dict): """Initialize a ToneAnalysis object from a json dictionary.""" args = {} if 'document_tone' in _dict: args['document_tone'] = DocumentAnalysis._from_dict( _dict.get('document_tone')) else: raise ValueError( ...
Return a json dictionary representing this model.
def _to_dict(self): """Return a json dictionary representing this model.""" _dict = {} if hasattr(self, 'document_tone') and self.document_tone is not None: _dict['document_tone'] = self.document_tone._to_dict() if hasattr(self, 'sentences_tone') and self.sentences_tone is no...
Initialize a ToneCategory object from a json dictionary.
def _from_dict(cls, _dict): """Initialize a ToneCategory object from a json dictionary.""" args = {} if 'tones' in _dict: args['tones'] = [ ToneScore._from_dict(x) for x in (_dict.get('tones')) ] else: raise ValueError( ...
Return a json dictionary representing this model.
def _to_dict(self): """Return a json dictionary representing this model.""" _dict = {} if hasattr(self, 'tones') and self.tones is not None: _dict['tones'] = [x._to_dict() for x in self.tones] if hasattr(self, 'category_id') and self.category_id is not None: _dict...
Return a json dictionary representing this model.
def _to_dict(self): """Return a json dictionary representing this model.""" _dict = {} if hasattr(self, 'text') and self.text is not None: _dict['text'] = self.text if hasattr(self, 'user') and self.user is not None: _dict['user'] = self.user return _dict
Return a json dictionary representing this model.
def _to_dict(self): """Return a json dictionary representing this model.""" _dict = {} if hasattr(self, 'score') and self.score is not None: _dict['score'] = self.score if hasattr(self, 'tone_id') and self.tone_id is not None: _dict['tone_id'] = self.tone_id ...
Initialize a UtteranceAnalyses object from a json dictionary.
def _from_dict(cls, _dict): """Initialize a UtteranceAnalyses object from a json dictionary.""" args = {} if 'utterances_tone' in _dict: args['utterances_tone'] = [ UtteranceAnalysis._from_dict(x) for x in (_dict.get('utterances_tone')) ] ...
Return a json dictionary representing this model.
def _to_dict(self): """Return a json dictionary representing this model.""" _dict = {} if hasattr(self, 'utterances_tone') and self.utterances_tone is not None: _dict['utterances_tone'] = [ x._to_dict() for x in self.utterances_tone ] ...
Initialize a UtteranceAnalysis object from a json dictionary.
def _from_dict(cls, _dict): """Initialize a UtteranceAnalysis object from a json dictionary.""" args = {} if 'utterance_id' in _dict: args['utterance_id'] = _dict.get('utterance_id') else: raise ValueError( 'Required property \'utterance_id\' not p...
Return a json dictionary representing this model.
def _to_dict(self): """Return a json dictionary representing this model.""" _dict = {} if hasattr(self, 'utterance_id') and self.utterance_id is not None: _dict['utterance_id'] = self.utterance_id if hasattr(self, 'utterance_text') and self.utterance_text is not None: ...
Get response to user input. Send user input to a workspace and receive a response. There is no rate limit for this operation. :param str workspace_id: Unique identifier of the workspace. :param MessageInput input: An input object that includes the input text. :param list[Runtim...
def message(self, workspace_id, input=None, intents=None, entities=None, alternate_intents=None, context=None, output=None, nodes_visited_details=None, **kwargs): """ ...
List workspaces. List the workspaces associated with a Watson Assistant service instance. This operation is limited to 500 requests per 30 minutes. For more information, see **Rate limiting**. :param int page_limit: The number of records to return in each page of results. :para...
def list_workspaces(self, page_limit=None, include_count=None, sort=None, cursor=None, include_audit=None, **kwargs): """ List workspaces. List the wor...
Update workspace. Update an existing workspace with new or modified data. You must provide component objects defining the content of the updated workspace. This operation is limited to 30 request per 30 minutes. For more information, see **Rate limiting**. :param str workspace_...
def update_workspace(self, workspace_id, name=None, description=None, language=None, metadata=None, learning_opt_out=None, system_settings=None, ...
Create intent. Create a new intent. This operation is limited to 2000 requests per 30 minutes. For more information, see **Rate limiting**. :param str workspace_id: Unique identifier of the workspace. :param str intent: The name of the intent. This string must conform to the ...
def create_intent(self, workspace_id, intent, description=None, examples=None, **kwargs): """ Create intent. Create a new intent. This operation is limited to 2000 requests per ...
Update intent. Update an existing intent with new or modified data. You must provide component objects defining the content of the updated intent. This operation is limited to 2000 requests per 30 minutes. For more information, see **Rate limiting**. :param str workspace_id: Un...
def update_intent(self, workspace_id, intent, new_intent=None, new_description=None, new_examples=None, **kwargs): """ Update intent. Update an existing intent wit...
Create user input example. Add a new user input example to an intent. This operation is limited to 1000 requests per 30 minutes. For more information, see **Rate limiting**. :param str workspace_id: Unique identifier of the workspace. :param str intent: The intent name. ...
def create_example(self, workspace_id, intent, text, mentions=None, **kwargs): """ Create user input example. Add a new user input example to an intent. This operation is l...
Create entity. Create a new entity, or enable a system entity. This operation is limited to 1000 requests per 30 minutes. For more information, see **Rate limiting**. :param str workspace_id: Unique identifier of the workspace. :param str entity: The name of the entity. This st...
def create_entity(self, workspace_id, entity, description=None, metadata=None, fuzzy_match=None, values=None, **kwargs): """ Create entity. C...
Update entity. Update an existing entity with new or modified data. You must provide component objects defining the content of the updated entity. This operation is limited to 1000 requests per 30 minutes. For more information, see **Rate limiting**. :param str workspace_id: Un...
def update_entity(self, workspace_id, entity, new_entity=None, new_description=None, new_metadata=None, new_fuzzy_match=None, new_values=None, *...
Create entity value. Create a new value for an entity. This operation is limited to 1000 requests per 30 minutes. For more information, see **Rate limiting**. :param str workspace_id: Unique identifier of the workspace. :param str entity: The name of the entity. :param ...
def create_value(self, workspace_id, entity, value, metadata=None, value_type=None, synonyms=None, patterns=None, **kwargs): """ Create ...
Update entity value. Update an existing entity value with new or modified data. You must provide component objects defining the content of the updated entity value. This operation is limited to 1000 requests per 30 minutes. For more information, see **Rate limiting**. :param st...
def update_value(self, workspace_id, entity, value, new_value=None, new_metadata=None, new_value_type=None, new_synonyms=None, new_patterns=None, ...
Create dialog node. Create a new dialog node. This operation is limited to 500 requests per 30 minutes. For more information, see **Rate limiting**. :param str workspace_id: Unique identifier of the workspace. :param str dialog_node: The dialog node ID. This string must conform...
def create_dialog_node(self, workspace_id, dialog_node, description=None, conditions=None, parent=None, previous_sibling=None, outp...
Update dialog node. Update an existing dialog node with new or modified data. This operation is limited to 500 requests per 30 minutes. For more information, see **Rate limiting**. :param str workspace_id: Unique identifier of the workspace. :param str dialog_node: The dialog n...
def update_dialog_node(self, workspace_id, dialog_node, new_dialog_node=None, new_description=None, new_conditions=None, new_parent=None, ...
Initialize a Context object from a json dictionary.
def _from_dict(cls, _dict): """Initialize a Context object from a json dictionary.""" args = {} xtra = _dict.copy() if 'conversation_id' in _dict: args['conversation_id'] = _dict.get('conversation_id') del xtra['conversation_id'] if 'system' in _dict: ...
Return a json dictionary representing this model.
def _to_dict(self): """Return a json dictionary representing this model.""" _dict = {} if hasattr(self, 'conversation_id') and self.conversation_id is not None: _dict['conversation_id'] = self.conversation_id if hasattr(self, 'system') and self.system is no...
Return a json dictionary representing this model.
def _to_dict(self): """Return a json dictionary representing this model.""" _dict = {} if hasattr(self, 'text') and self.text is not None: _dict['text'] = self.text if hasattr(self, 'created') and self.created is not None: _dict['created'] = datetime_to_string(sel...
Return a json dictionary representing this model.
def _to_dict(self): """Return a json dictionary representing this model.""" _dict = {} if hasattr(self, 'counterexamples') and self.counterexamples is not None: _dict['counterexamples'] = [ x._to_dict() for x in self.counterexamples ] ...
Return a json dictionary representing this model.
def _to_dict(self): """Return a json dictionary representing this model.""" _dict = {} if hasattr(self, 'entity') and self.entity is not None: _dict['entity'] = self.entity if hasattr(self, 'description') and self.description is not None: _dict['description'] = se...
Return a json dictionary representing this model.
def _to_dict(self): """Return a json dictionary representing this model.""" _dict = {} if hasattr(self, 'intent') and self.intent is not None: _dict['intent'] = self.intent if hasattr(self, 'description') and self.description is not None: _dict['description'] = se...
Return a json dictionary representing this model.
def _to_dict(self): """Return a json dictionary representing this model.""" _dict = {} if hasattr(self, 'value') and self.value is not None: _dict['value'] = self.value if hasattr(self, 'metadata') and self.metadata is not None: _dict['metadata'] = self.metadata ...
Initialize a DialogNode object from a json dictionary.
def _from_dict(cls, _dict): """Initialize a DialogNode object from a json dictionary.""" args = {} if 'dialog_node' in _dict: args['dialog_node'] = _dict.get('dialog_node') else: raise ValueError( 'Required property \'dialog_node\' not present in D...
Return a json dictionary representing this model.
def _to_dict(self): """Return a json dictionary representing this model.""" _dict = {} if hasattr(self, 'dialog_node') and self.dialog_node is not None: _dict['dialog_node'] = self.dialog_node if hasattr(self, 'description') and self.description is not None: _dict...
Return a json dictionary representing this model.
def _to_dict(self): """Return a json dictionary representing this model.""" _dict = {} if hasattr(self, 'dialog_nodes') and self.dialog_nodes is not None: _dict['dialog_nodes'] = [x._to_dict() for x in self.dialog_nodes] if hasattr(self, 'pagination') and self.pagination is n...
Return a json dictionary representing this model.
def _to_dict(self): """Return a json dictionary representing this model.""" _dict = {} if hasattr(self, 'behavior') and self.behavior is not None: _dict['behavior'] = self.behavior if hasattr(self, 'dialog_node') and self.dialog_node is not None: _dict['dialog_nod...
Initialize a DialogNodeOutput object from a json dictionary.
def _from_dict(cls, _dict): """Initialize a DialogNodeOutput object from a json dictionary.""" args = {} xtra = _dict.copy() if 'generic' in _dict: args['generic'] = [ DialogNodeOutputGeneric._from_dict(x) for x in (_dict.get('generic')) ...
Return a json dictionary representing this model.
def _to_dict(self): """Return a json dictionary representing this model.""" _dict = {} if hasattr(self, 'generic') and self.generic is not None: _dict['generic'] = [x._to_dict() for x in self.generic] if hasattr(self, 'modifiers') and self.modifiers is not None: _...
Return a json dictionary representing this model.
def _to_dict(self): """Return a json dictionary representing this model.""" _dict = {} if hasattr(self, 'response_type') and self.response_type is not None: _dict['response_type'] = self.response_type if hasattr(self, 'values') and self.values is not None: _dict['...
Return a json dictionary representing this model.
def _to_dict(self): """Return a json dictionary representing this model.""" _dict = {} if hasattr(self, 'overwrite') and self.overwrite is not None: _dict['overwrite'] = self.overwrite return _dict
Initialize a DialogRuntimeResponseGeneric object from a json dictionary.
def _from_dict(cls, _dict): """Initialize a DialogRuntimeResponseGeneric object from a json dictionary.""" args = {} if 'response_type' in _dict: args['response_type'] = _dict.get('response_type') else: raise ValueError( 'Required property \'respon...
Return a json dictionary representing this model.
def _to_dict(self): """Return a json dictionary representing this model.""" _dict = {} if hasattr(self, 'response_type') and self.response_type is not None: _dict['response_type'] = self.response_type if hasattr(self, 'text') and self.text is not None: _dict['text...
Initialize a DialogSuggestionValue object from a json dictionary.
def _from_dict(cls, _dict): """Initialize a DialogSuggestionValue object from a json dictionary.""" args = {} if 'input' in _dict: args['input'] = MessageInput._from_dict(_dict.get('input')) if 'intents' in _dict: args['intents'] = [ RuntimeIntent....
Return a json dictionary representing this model.
def _to_dict(self): """Return a json dictionary representing this model.""" _dict = {} if hasattr(self, 'input') and self.input is not None: _dict['input'] = self.input._to_dict() if hasattr(self, 'intents') and self.intents is not None: _dict['intents'] = [x._to_...
Return a json dictionary representing this model.
def _to_dict(self): """Return a json dictionary representing this model.""" _dict = {} if hasattr(self, 'entities') and self.entities is not None: _dict['entities'] = [x._to_dict() for x in self.entities] if hasattr(self, 'pagination') and self.pagination is not None: ...