Watson Conversation Service data structures.
Data srcutures used in Watson Conversation Service.
Based on the documentation available at: https://www.ibm.com/watson/developercloud/conversation/api/v1/
Version 2017-05-26.
type workspace_status
= Wcs_t.workspace_status
=
| Ws_non_existent |
| Ws_training |
| Ws_failed |
| Ws_available |
| Ws_unavailable |
type workspace_response
= Wcs_t.workspace_response
=
{
ws_rsp_name : string option; |
ws_rsp_description : string option; |
ws_rsp_language : string option; |
ws_rsp_metadata : json option; |
ws_rsp_created : string option; |
ws_rsp_updated : string option; |
ws_rsp_workspace_id : string; |
}
A workspace metadata.
type next_step
= Wcs_t.next_step
=
{
next_behavior : string; |
next_selector : selector; |
next_dialog_node : string; |
}
Type of goto definitions.
type intent_example
= Wcs_t.intent_example
=
{
ex_text : string; |
ex_created : string option; |
ex_updated : string option; |
}
Type of intent examples.
type intent_def
= Wcs_t.intent_def
=
{
i_def_intent : string; |
i_def_description : string option; |
i_def_examples : intent_example list; |
i_def_created : string option; |
i_def_updated : string option; |
}
Type of intent definitions.
type entity_value
= Wcs_t.entity_value
=
{
e_val_value : string; |
e_val_metadata : json option; |
e_val_synonyms : string list; |
e_val_created : string option; |
e_val_updated : string option; |
}
Type of entity values.
type entity_def
= Wcs_t.entity_def
=
{
e_def_entity : string; |
e_def_description : string option; |
e_def_metadata : json option; |
e_def_source : string option; |
e_def_open_list : bool option; |
e_def_values : entity_value list; |
e_def_created : string option; |
e_def_updated : string option; |
e_def_fuzzy_match : bool option; |
}
Type of entity definitions.
type dialog_node_type
= Wcs_t.dialog_node_type
=
| Node_standard |
| Node_response_condition |
| Node_frame |
| Node_event_handler |
| Node_slot |
Dialog node type.
type dialog_node_event_name
= Wcs_t.dialog_node_event_name
=
| Evt_focus |
| Evt_input |
| Evt_nomatch |
| Evt_filled |
| Evt_generic |
type dialog_node
= Wcs_t.dialog_node
=
{
node_dialog_node : string; |
node_type_ : dialog_node_type option; |
node_description : string option; |
node_conditions : spel option; |
node_parent : string option; |
node_previous_sibling : string option; |
node_output : output_def option; |
node_context : json_spel option; |
node_metadata : json option; |
node_next_step : next_step option; |
node_child_input_kind : string option; |
node_created : string option; |
node_updated : string option; |
node_event_name : dialog_node_event_name option; |
node_variable : string option; |
}
Type of dialog nodes.
type workspace
= Wcs_t.workspace
=
{
ws_name : string option; |
ws_description : string option; |
ws_language : string option; |
ws_metadata : json option; |
ws_counterexamples : intent_example list; |
ws_dialog_nodes : dialog_node list; |
ws_entities : entity_def list; |
ws_intents : intent_def list; |
ws_created : string option; |
ws_updated : string option; |
ws_modified : string option; |
ws_created_by : string option; |
ws_modified_by : string option; |
ws_workspace_id : string option; |
ws_status : workspace_status option; |
}
Type of workspaces
type sort_workspace_criteria
= Wcs_t.sort_workspace_criteria
=
| Sort_name_incr |
| Sort_modified_incr |
| Sort_workspace_id_incr |
| Sort_name_decr |
| Sort_modified_decr |
| Sort_workspace_id_decr |
Sorting criteria for list of workspaces.
type sort_logs_criteria
= Wcs_t.sort_logs_criteria
=
| Sort_request_timestamp_incr |
| Sort_request_timestamp_decr |
Sorting criteria for logs.
type pagination_response
= Wcs_t.pagination_response
=
{
pag_refresh_url : string option; |
pag_next_url : string option; |
pag_total : int option; |
pag_matched : int option; |
}
Pagination information
type output
= Wcs_t.output
=
{
out_log_messages : log_message list; |
out_text : string list; |
out_nodes_visited : string list; |
out_error : string option; |
}
type entity
= Wcs_t.entity
=
{
e_entity : string; |
e_location : int list; |
e_value : string; |
e_confidence : float; |
}
type log_entry
= Wcs_t.log_entry
=
{
log_request : message_request; |
log_response : message_response; |
log_log_id : string; |
log_request_timestamp : string; |
log_response_timestamp : string; |
}
type logs_response
= Wcs_t.logs_response
=
{
logs_rsp_logs : log_entry list; |
logs_rsp_pagination : pagination_response; |
}
type logs_request
= Wcs_t.logs_request
=
{
logs_filter : string option; |
logs_sort : sort_logs_criteria option; |
logs_page_limit : int option; |
logs_cursor : string option; |
}
Request for the list the events from the log of a workspace.
type list_workspaces_response
= Wcs_t.list_workspaces_response
=
{
list_ws_rsp_workspaces : workspace_response list; |
list_ws_rsp_pagination : pagination_response; |
}
Response to the list of workspaces request.
type list_workspaces_request
= Wcs_t.list_workspaces_request
=
{
list_ws_req_page_limit : int option; |
list_ws_req_include_count : bool option; |
list_ws_req_sort : sort_workspace_criteria option; |
list_ws_req_cursor : string option; |
}
Request the list of workspaces.
type get_workspace_request
= Wcs_t.get_workspace_request
=
{
get_ws_req_workspace_id : string; |
get_ws_req_export : bool option; |
}
type credential
= Wcs_t.credential
=
{
cred_url : string; |
cred_password : string; |
cred_username : string; |
}
Watson Conversation Service credentials.
type create_response
= Wcs_t.create_response
=
{
crea_rsp_name : string option; |
crea_rsp_description : string option; |
crea_rsp_language : string option; |
crea_rsp_metadata : json option; |
crea_rsp_created : string option; |
crea_rsp_updated : string option; |
crea_rsp_workspace_id : string option; |
}
type action_def
= Wcs_t.action_def
=
{
act_def_name : string; |
act_def_agent : string; |
act_def_type_ : string; |
act_def_parameters : json_spel; |
act_def_result_variable : string option; |
}
type action
= Wcs_t.action
=
{
act_name : string; |
act_agent : string; |
act_type_ : string; |
act_parameters : json; |
act_result_variable : string option; |
}
val write_workspace_status : Bi_outbuf.t ‑> workspace_status ‑> unit
Output a JSON value of type workspace_status.
val string_of_workspace_status : ?len:int ‑> workspace_status ‑> string
Serialize a value of type workspace_status into a JSON string.
val read_workspace_status : Yojson.Safe.lexer_state ‑> Lexing.lexbuf ‑> workspace_status
Input JSON data of type workspace_status.
val workspace_status_of_string : string ‑> workspace_status
Deserialize JSON data of type workspace_status.
val string_of_json : ?len:int ‑> json ‑> string
Serialize a value of type json into a JSON string.
val write_workspace_response : Bi_outbuf.t ‑> workspace_response ‑> unit
Output a JSON value of type workspace_response.
val string_of_workspace_response : ?len:int ‑> workspace_response ‑> string
Serialize a value of type workspace_response into a JSON string.
val read_workspace_response : Yojson.Safe.lexer_state ‑> Lexing.lexbuf ‑> workspace_response
Input JSON data of type workspace_response.
val workspace_response_of_string : string ‑> workspace_response
Deserialize JSON data of type workspace_response.
val string_of_spel : ?len:int ‑> spel ‑> string
Serialize a value of type spel into a JSON string.
val string_of_selector : ?len:int ‑> selector ‑> string
Serialize a value of type selector into a JSON string.
val read_selector : Yojson.Safe.lexer_state ‑> Lexing.lexbuf ‑> selector
Input JSON data of type selector.
val string_of_json_spel : ?len:int ‑> json_spel ‑> string
Serialize a value of type json_spel into a JSON string.
val read_json_spel : Yojson.Safe.lexer_state ‑> Lexing.lexbuf ‑> json_spel
Input JSON data of type json_spel.
val string_of_output_def : ?len:int ‑> output_def ‑> string
Serialize a value of type output_def into a JSON string.
val read_output_def : Yojson.Safe.lexer_state ‑> Lexing.lexbuf ‑> output_def
Input JSON data of type output_def.
val string_of_next_step : ?len:int ‑> next_step ‑> string
Serialize a value of type next_step into a JSON string.
val read_next_step : Yojson.Safe.lexer_state ‑> Lexing.lexbuf ‑> next_step
Input JSON data of type next_step.
val write_intent_example : Bi_outbuf.t ‑> intent_example ‑> unit
Output a JSON value of type intent_example.
val string_of_intent_example : ?len:int ‑> intent_example ‑> string
Serialize a value of type intent_example into a JSON string.
val read_intent_example : Yojson.Safe.lexer_state ‑> Lexing.lexbuf ‑> intent_example
Input JSON data of type intent_example.
val intent_example_of_string : string ‑> intent_example
Deserialize JSON data of type intent_example.
val string_of_intent_def : ?len:int ‑> intent_def ‑> string
Serialize a value of type intent_def into a JSON string.
val read_intent_def : Yojson.Safe.lexer_state ‑> Lexing.lexbuf ‑> intent_def
Input JSON data of type intent_def.
val write_entity_value : Bi_outbuf.t ‑> entity_value ‑> unit
Output a JSON value of type entity_value.
val string_of_entity_value : ?len:int ‑> entity_value ‑> string
Serialize a value of type entity_value into a JSON string.
val read_entity_value : Yojson.Safe.lexer_state ‑> Lexing.lexbuf ‑> entity_value
Input JSON data of type entity_value.
val string_of_entity_def : ?len:int ‑> entity_def ‑> string
Serialize a value of type entity_def into a JSON string.
val read_entity_def : Yojson.Safe.lexer_state ‑> Lexing.lexbuf ‑> entity_def
Input JSON data of type entity_def.
val write_dialog_node_type : Bi_outbuf.t ‑> dialog_node_type ‑> unit
Output a JSON value of type dialog_node_type.
val string_of_dialog_node_type : ?len:int ‑> dialog_node_type ‑> string
Serialize a value of type dialog_node_type into a JSON string.
val read_dialog_node_type : Yojson.Safe.lexer_state ‑> Lexing.lexbuf ‑> dialog_node_type
Input JSON data of type dialog_node_type.
val dialog_node_type_of_string : string ‑> dialog_node_type
Deserialize JSON data of type dialog_node_type.
val write_dialog_node_event_name : Bi_outbuf.t ‑> dialog_node_event_name ‑> unit
Output a JSON value of type dialog_node_event_name.
val string_of_dialog_node_event_name : ?len:int ‑> dialog_node_event_name ‑> string
Serialize a value of type dialog_node_event_name into a JSON string.
val read_dialog_node_event_name : Yojson.Safe.lexer_state ‑> Lexing.lexbuf ‑> dialog_node_event_name
Input JSON data of type dialog_node_event_name.
val dialog_node_event_name_of_string : string ‑> dialog_node_event_name
Deserialize JSON data of type dialog_node_event_name.
val string_of_dialog_node : ?len:int ‑> dialog_node ‑> string
Serialize a value of type dialog_node into a JSON string.
val read_dialog_node : Yojson.Safe.lexer_state ‑> Lexing.lexbuf ‑> dialog_node
Input JSON data of type dialog_node.
val string_of_workspace : ?len:int ‑> workspace ‑> string
Serialize a value of type workspace into a JSON string.
val read_workspace : Yojson.Safe.lexer_state ‑> Lexing.lexbuf ‑> workspace
Input JSON data of type workspace.
val string_of_version : ?len:int ‑> version ‑> string
Serialize a value of type version into a JSON string.
val read_version : Yojson.Safe.lexer_state ‑> Lexing.lexbuf ‑> version
Input JSON data of type version.
val write_sort_workspace_criteria : Bi_outbuf.t ‑> sort_workspace_criteria ‑> unit
Output a JSON value of type sort_workspace_criteria.
val string_of_sort_workspace_criteria : ?len:int ‑> sort_workspace_criteria ‑> string
Serialize a value of type sort_workspace_criteria into a JSON string.
val read_sort_workspace_criteria : Yojson.Safe.lexer_state ‑> Lexing.lexbuf ‑> sort_workspace_criteria
Input JSON data of type sort_workspace_criteria.
val sort_workspace_criteria_of_string : string ‑> sort_workspace_criteria
Deserialize JSON data of type sort_workspace_criteria.
val write_sort_logs_criteria : Bi_outbuf.t ‑> sort_logs_criteria ‑> unit
Output a JSON value of type sort_logs_criteria.
val string_of_sort_logs_criteria : ?len:int ‑> sort_logs_criteria ‑> string
Serialize a value of type sort_logs_criteria into a JSON string.
val read_sort_logs_criteria : Yojson.Safe.lexer_state ‑> Lexing.lexbuf ‑> sort_logs_criteria
Input JSON data of type sort_logs_criteria.
val sort_logs_criteria_of_string : string ‑> sort_logs_criteria
Deserialize JSON data of type sort_logs_criteria.
val write_pagination_response : Bi_outbuf.t ‑> pagination_response ‑> unit
Output a JSON value of type pagination_response.
val string_of_pagination_response : ?len:int ‑> pagination_response ‑> string
Serialize a value of type pagination_response into a JSON string.
val read_pagination_response : Yojson.Safe.lexer_state ‑> Lexing.lexbuf ‑> pagination_response
Input JSON data of type pagination_response.
val pagination_response_of_string : string ‑> pagination_response
Deserialize JSON data of type pagination_response.
val string_of_log_message : ?len:int ‑> log_message ‑> string
Serialize a value of type log_message into a JSON string.
val read_log_message : Yojson.Safe.lexer_state ‑> Lexing.lexbuf ‑> log_message
Input JSON data of type log_message.
val string_of_output : ?len:int ‑> output ‑> string
Serialize a value of type output into a JSON string.
val string_of_intent : ?len:int ‑> intent ‑> string
Serialize a value of type intent into a JSON string.
val string_of_input : ?len:int ‑> input ‑> string
Serialize a value of type input into a JSON string.
val string_of_entity : ?len:int ‑> entity ‑> string
Serialize a value of type entity into a JSON string.
val write_message_response : Bi_outbuf.t ‑> message_response ‑> unit
Output a JSON value of type message_response.
val string_of_message_response : ?len:int ‑> message_response ‑> string
Serialize a value of type message_response into a JSON string.
val read_message_response : Yojson.Safe.lexer_state ‑> Lexing.lexbuf ‑> message_response
Input JSON data of type message_response.
val message_response_of_string : string ‑> message_response
Deserialize JSON data of type message_response.
val write_message_request : Bi_outbuf.t ‑> message_request ‑> unit
Output a JSON value of type message_request.
val string_of_message_request : ?len:int ‑> message_request ‑> string
Serialize a value of type message_request into a JSON string.
val read_message_request : Yojson.Safe.lexer_state ‑> Lexing.lexbuf ‑> message_request
Input JSON data of type message_request.
val message_request_of_string : string ‑> message_request
Deserialize JSON data of type message_request.
val string_of_log_entry : ?len:int ‑> log_entry ‑> string
Serialize a value of type log_entry into a JSON string.
val read_log_entry : Yojson.Safe.lexer_state ‑> Lexing.lexbuf ‑> log_entry
Input JSON data of type log_entry.
val write_logs_response : Bi_outbuf.t ‑> logs_response ‑> unit
Output a JSON value of type logs_response.
val string_of_logs_response : ?len:int ‑> logs_response ‑> string
Serialize a value of type logs_response into a JSON string.
val read_logs_response : Yojson.Safe.lexer_state ‑> Lexing.lexbuf ‑> logs_response
Input JSON data of type logs_response.
val write_logs_request : Bi_outbuf.t ‑> logs_request ‑> unit
Output a JSON value of type logs_request.
val string_of_logs_request : ?len:int ‑> logs_request ‑> string
Serialize a value of type logs_request into a JSON string.
val read_logs_request : Yojson.Safe.lexer_state ‑> Lexing.lexbuf ‑> logs_request
Input JSON data of type logs_request.
val write_list_workspaces_response : Bi_outbuf.t ‑> list_workspaces_response ‑> unit
Output a JSON value of type list_workspaces_response.
val string_of_list_workspaces_response : ?len:int ‑> list_workspaces_response ‑> string
Serialize a value of type list_workspaces_response into a JSON string.
val read_list_workspaces_response : Yojson.Safe.lexer_state ‑> Lexing.lexbuf ‑> list_workspaces_response
Input JSON data of type list_workspaces_response.
val list_workspaces_response_of_string : string ‑> list_workspaces_response
Deserialize JSON data of type list_workspaces_response.
val write_list_workspaces_request : Bi_outbuf.t ‑> list_workspaces_request ‑> unit
Output a JSON value of type list_workspaces_request.
val string_of_list_workspaces_request : ?len:int ‑> list_workspaces_request ‑> string
Serialize a value of type list_workspaces_request into a JSON string.
val read_list_workspaces_request : Yojson.Safe.lexer_state ‑> Lexing.lexbuf ‑> list_workspaces_request
Input JSON data of type list_workspaces_request.
val list_workspaces_request_of_string : string ‑> list_workspaces_request
Deserialize JSON data of type list_workspaces_request.
val write_get_workspace_request : Bi_outbuf.t ‑> get_workspace_request ‑> unit
Output a JSON value of type get_workspace_request.
val string_of_get_workspace_request : ?len:int ‑> get_workspace_request ‑> string
Serialize a value of type get_workspace_request into a JSON string.
val read_get_workspace_request : Yojson.Safe.lexer_state ‑> Lexing.lexbuf ‑> get_workspace_request
Input JSON data of type get_workspace_request.
val get_workspace_request_of_string : string ‑> get_workspace_request
Deserialize JSON data of type get_workspace_request.
val string_of_credential : ?len:int ‑> credential ‑> string
Serialize a value of type credential into a JSON string.
val read_credential : Yojson.Safe.lexer_state ‑> Lexing.lexbuf ‑> credential
Input JSON data of type credential.
val write_create_response : Bi_outbuf.t ‑> create_response ‑> unit
Output a JSON value of type create_response.
val string_of_create_response : ?len:int ‑> create_response ‑> string
Serialize a value of type create_response into a JSON string.
val read_create_response : Yojson.Safe.lexer_state ‑> Lexing.lexbuf ‑> create_response
Input JSON data of type create_response.
val create_response_of_string : string ‑> create_response
Deserialize JSON data of type create_response.
val string_of_context : ?len:int ‑> context ‑> string
Serialize a value of type context into a JSON string.
val read_context : Yojson.Safe.lexer_state ‑> Lexing.lexbuf ‑> context
Input JSON data of type context.
val string_of_action_def : ?len:int ‑> action_def ‑> string
Serialize a value of type action_def into a JSON string.
val read_action_def : Yojson.Safe.lexer_state ‑> Lexing.lexbuf ‑> action_def
Input JSON data of type action_def.