dc6079821b
Docs Tests / Check for file changes (push) Has been cancelled
Docs Tests / Test Documentation (push) Has been cancelled
Docs Tests / Documentation Linting Checks (push) Has been cancelled
Continuous Integration / Run Tests (ubuntu-24.04, 3.10, test-performance) (push) Has been cancelled
Continuous Integration / Run Tests (ubuntu-24.04, 3.10, test-policies) (push) Has been cancelled
Continuous Integration / Run Tests (ubuntu-24.04, 3.8, test-cli) (push) Has been cancelled
Continuous Integration / Run Tests (ubuntu-24.04, 3.8, test-core-featurizers) (push) Has been cancelled
Continuous Integration / Run Tests (ubuntu-24.04, 3.8, test-full-model-training) (push) Has been cancelled
Continuous Integration / Run Tests (ubuntu-24.04, 3.8, test-nlu-featurizers) (push) Has been cancelled
Continuous Integration / Run Tests (ubuntu-24.04, 3.8, test-nlu-predictors) (push) Has been cancelled
Continuous Integration / Run Tests (ubuntu-24.04, 3.8, test-other-unit-tests) (push) Has been cancelled
Continuous Integration / Run Tests (ubuntu-24.04, 3.8, test-performance) (push) Has been cancelled
Continuous Integration / Run Tests (ubuntu-24.04, 3.8, test-policies) (push) Has been cancelled
Continuous Integration / Run Tests (ubuntu-24.04, 3.9, test-cli) (push) Has been cancelled
Continuous Integration / Run Tests (ubuntu-24.04, 3.9, test-core-featurizers) (push) Has been cancelled
Continuous Integration / Run Tests (ubuntu-24.04, 3.9, test-full-model-training) (push) Has been cancelled
Continuous Integration / Run Tests (ubuntu-24.04, 3.9, test-nlu-featurizers) (push) Has been cancelled
Continuous Integration / Run Tests (ubuntu-24.04, 3.9, test-nlu-predictors) (push) Has been cancelled
Continuous Integration / Run Tests (ubuntu-24.04, 3.9, test-other-unit-tests) (push) Has been cancelled
Continuous Integration / Run Tests (ubuntu-24.04, 3.9, test-performance) (push) Has been cancelled
Continuous Integration / Run Tests (ubuntu-24.04, 3.9, test-policies) (push) Has been cancelled
Continuous Integration / Run Tests (windows-2022, 3.10, test-cli) (push) Has been cancelled
Continuous Integration / Run Tests (windows-2022, 3.10, test-core-featurizers) (push) Has been cancelled
Continuous Integration / Run Tests (windows-2022, 3.10, test-full-model-training) (push) Has been cancelled
Continuous Integration / Run Tests (windows-2022, 3.10, test-nlu-featurizers) (push) Has been cancelled
Continuous Integration / Run Tests (windows-2022, 3.10, test-nlu-predictors) (push) Has been cancelled
Continuous Integration / Run Tests (windows-2022, 3.10, test-other-unit-tests) (push) Has been cancelled
Continuous Integration / Run Tests (windows-2022, 3.10, test-performance) (push) Has been cancelled
Continuous Integration / Run Tests (windows-2022, 3.10, test-policies) (push) Has been cancelled
Continuous Integration / Run Tests (windows-2022, 3.8, test-cli) (push) Has been cancelled
Continuous Integration / Run Tests (windows-2022, 3.8, test-core-featurizers) (push) Has been cancelled
Continuous Integration / Run Tests (windows-2022, 3.8, test-full-model-training) (push) Has been cancelled
Continuous Integration / Run Tests (windows-2022, 3.8, test-nlu-featurizers) (push) Has been cancelled
Continuous Integration / Run Tests (windows-2022, 3.8, test-nlu-predictors) (push) Has been cancelled
Continuous Integration / Run Tests (windows-2022, 3.8, test-other-unit-tests) (push) Has been cancelled
Continuous Integration / Run Tests (windows-2022, 3.8, test-performance) (push) Has been cancelled
Continuous Integration / Run Tests (windows-2022, 3.8, test-policies) (push) Has been cancelled
Continuous Integration / Run Tests (windows-2022, 3.9, test-cli) (push) Has been cancelled
Continuous Integration / Run Tests (windows-2022, 3.9, test-core-featurizers) (push) Has been cancelled
Continuous Integration / Run Tests (windows-2022, 3.9, test-full-model-training) (push) Has been cancelled
Continuous Integration / Run Tests (windows-2022, 3.9, test-nlu-featurizers) (push) Has been cancelled
Continuous Integration / Run Tests (windows-2022, 3.9, test-nlu-predictors) (push) Has been cancelled
Continuous Integration / Run Tests (windows-2022, 3.9, test-other-unit-tests) (push) Has been cancelled
Continuous Integration / Run Tests (windows-2022, 3.9, test-performance) (push) Has been cancelled
Continuous Integration / Run Tests (windows-2022, 3.9, test-policies) (push) Has been cancelled
Continuous Integration / Run Flaky Tests (ubuntu-24.04, 3.10) (push) Has been cancelled
Continuous Integration / Run Flaky Tests (ubuntu-24.04, 3.8) (push) Has been cancelled
Continuous Integration / Run Flaky Tests (ubuntu-24.04, 3.9) (push) Has been cancelled
Continuous Integration / Run Flaky Tests (windows-2022, 3.10) (push) Has been cancelled
Continuous Integration / Run Flaky Tests (windows-2022, 3.8) (push) Has been cancelled
Continuous Integration / Run Flaky Tests (windows-2022, 3.9) (push) Has been cancelled
Continuous Integration / Check for file changes (push) Has been cancelled
Continuous Integration / Wait for docs tests (push) Has been cancelled
Continuous Integration / Code Quality (push) Has been cancelled
Continuous Integration / Check for changelog (push) Has been cancelled
Continuous Integration / Run Tests (ubuntu-24.04, 3.10, test-cli) (push) Has been cancelled
Continuous Integration / Run Tests (ubuntu-24.04, 3.10, test-core-featurizers) (push) Has been cancelled
Continuous Integration / Run Tests (ubuntu-24.04, 3.10, test-full-model-training) (push) Has been cancelled
Continuous Integration / Run Tests (ubuntu-24.04, 3.10, test-nlu-featurizers) (push) Has been cancelled
Continuous Integration / Run Tests (ubuntu-24.04, 3.10, test-nlu-predictors) (push) Has been cancelled
Continuous Integration / Run Tests (ubuntu-24.04, 3.10, test-other-unit-tests) (push) Has been cancelled
Continuous Integration / Upload coverage reports to codeclimate (push) Has been cancelled
Continuous Integration / Run Non-Sequential Integration Tests (push) Has been cancelled
Continuous Integration / Run Broker Integration Tests (push) Has been cancelled
Continuous Integration / Run Sequential Integration Tests (push) Has been cancelled
Continuous Integration / Build Docker base images and setup environment (push) Has been cancelled
Continuous Integration / Build Docker (default) (push) Has been cancelled
Continuous Integration / Build Docker (full) (push) Has been cancelled
Continuous Integration / Build Docker (mitie-en) (push) Has been cancelled
Continuous Integration / Build Docker (spacy-de) (push) Has been cancelled
Continuous Integration / Build Docker (spacy-en) (push) Has been cancelled
Continuous Integration / Build Docker (spacy-it) (push) Has been cancelled
Continuous Integration / Deploy to PyPI (push) Has been cancelled
Continuous Integration / Notify Slack & Publish Release Notes (push) Has been cancelled
Publish Documentation / Evaluate release tag (push) Has been cancelled
Publish Documentation / Prebuild Docs (push) Has been cancelled
Publish Documentation / Preview Docs (push) Has been cancelled
Publish Documentation / Check for file changes (push) Has been cancelled
Publish Documentation / Publish Docs (push) Has been cancelled
Automatic PR Merger / mergepal (push) Has been cancelled
CI Github Actions / Run Tests (push) Has been cancelled
Semgrep / Semgrep Workflow Security Scan (push) Has been cancelled
168 lines
5.4 KiB
Python
168 lines
5.4 KiB
Python
ENTITIES_SCHEMA = {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "object",
|
|
"properties": {
|
|
"start": {"type": "integer"},
|
|
"end": {"type": "integer"},
|
|
"entity": {"type": "string"},
|
|
"confidence": {"type": "number"},
|
|
"extractor": {"type": ["string", "null"]},
|
|
"value": {},
|
|
"role": {"type": ["string", "null"]},
|
|
"group": {"type": ["string", "null"]},
|
|
},
|
|
"required": ["entity", "value"],
|
|
},
|
|
}
|
|
|
|
INTENT = {
|
|
"type": "object",
|
|
"properties": {"name": {"type": "string"}, "confidence": {"type": "number"}},
|
|
}
|
|
|
|
RESPONSE_SCHEMA = {
|
|
"type": "object",
|
|
"properties": {
|
|
"responses": {
|
|
"type": "array",
|
|
"items": {"type": "object", "properties": {"text": {"type": "string"}}},
|
|
},
|
|
"response_templates": {
|
|
"type": "array",
|
|
"items": {"type": "object", "properties": {"text": {"type": "string"}}},
|
|
},
|
|
"confidence": {"type": "number"},
|
|
"intent_response_key": {"type": "string"},
|
|
"utter_action": {"type": "string"},
|
|
"template_name": {"type": "string"},
|
|
},
|
|
}
|
|
|
|
RANKING_SCHEMA = {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "object",
|
|
"properties": {
|
|
"id": {"type": "number"},
|
|
"confidence": {"type": "number"},
|
|
"intent_response_key": {"type": "string"},
|
|
},
|
|
},
|
|
}
|
|
|
|
USER_UTTERED = {
|
|
"properties": {
|
|
"event": {"const": "user"},
|
|
"text": {"type": ["string", "null"]},
|
|
"input_channel": {"type": ["string", "null"]},
|
|
"message_id": {"type": ["string", "null"]},
|
|
"parse_data": {
|
|
"type": "object",
|
|
"properties": {
|
|
"text": {"type": ["string", "null"]},
|
|
"intent_ranking": {"type": "array", "items": INTENT},
|
|
"intent": INTENT,
|
|
"entities": ENTITIES_SCHEMA,
|
|
"response_selector": {
|
|
"type": "object",
|
|
"oneOf": [
|
|
{"properties": {"all_retrieval_intents": {"type": "array"}}},
|
|
{
|
|
"patternProperties": {
|
|
"[\\w/]": {
|
|
"type": "object",
|
|
"properties": {
|
|
"response": RESPONSE_SCHEMA,
|
|
"ranking": RANKING_SCHEMA,
|
|
},
|
|
}
|
|
}
|
|
},
|
|
],
|
|
},
|
|
},
|
|
},
|
|
}
|
|
}
|
|
|
|
ACTION_EXECUTED = {
|
|
"properties": {
|
|
"event": {"const": "action"},
|
|
"policy": {"type": ["string", "null"]},
|
|
"confidence": {"type": ["number", "null"]},
|
|
"name": {"type": ["string", "null"]},
|
|
"hide_rule_turn": {"type": "boolean"},
|
|
"action_text": {"type": ["string", "null"]},
|
|
}
|
|
}
|
|
|
|
SLOT_SET = {
|
|
"properties": {"event": {"const": "slot"}, "name": {"type": "string"}, "value": {}},
|
|
"required": ["name", "value"],
|
|
}
|
|
|
|
ENTITIES_ADDED = {
|
|
"properties": {"event": {"const": "entities"}, "entities": ENTITIES_SCHEMA},
|
|
"required": ["entities"],
|
|
}
|
|
|
|
USER_UTTERED_FEATURIZATION = {"properties": {"event": {"const": "user_featurization"}}}
|
|
REMINDER_CANCELLED = {"properties": {"event": {"const": "cancel_reminder"}}}
|
|
REMINDER_SCHEDULED = {"properties": {"event": {"const": "reminder"}}}
|
|
ACTION_EXECUTION_REJECTED = {
|
|
"properties": {"event": {"const": "action_execution_rejected"}}
|
|
}
|
|
FORM_VALIDATION = {"properties": {"event": {"const": "form_validation"}}}
|
|
LOOP_INTERRUPTED = {"properties": {"event": {"const": "loop_interrupted"}}}
|
|
FORM = {"properties": {"event": {"const": "form"}}}
|
|
ACTIVE_LOOP = {"properties": {"event": {"const": "active_loop"}}}
|
|
ALL_SLOTS_RESET = {"properties": {"event": {"const": "reset_slots"}}}
|
|
CONVERSATION_RESUMED = {"properties": {"event": {"const": "resume"}}}
|
|
CONVERSATION_PAUSED = {"properties": {"event": {"const": "pause"}}}
|
|
FOLLOWUP_ACTION = {"properties": {"event": {"const": "followup"}}}
|
|
STORY_EXPORTED = {"properties": {"event": {"const": "export"}}}
|
|
RESTARTED = {"properties": {"event": {"const": "restart"}}}
|
|
ACTION_REVERTED = {"properties": {"event": {"const": "undo"}}}
|
|
USER_UTTERANCE_REVERTED = {"properties": {"event": {"const": "rewind"}}}
|
|
BOT_UTTERED = {"properties": {"event": {"const": "bot"}}}
|
|
SESSION_STARTED = {"properties": {"event": {"const": "session_started"}}}
|
|
AGENT_UTTERED = {"properties": {"event": {"const": "agent"}}}
|
|
|
|
EVENT_SCHEMA = {
|
|
"type": "object",
|
|
"properties": {
|
|
"event": {"type": "string"},
|
|
"timestamp": {"type": ["number", "null"]},
|
|
"metadata": {"type": ["object", "null"]},
|
|
},
|
|
"required": ["event"],
|
|
"oneOf": [
|
|
USER_UTTERED,
|
|
ACTION_EXECUTED,
|
|
SLOT_SET,
|
|
ENTITIES_ADDED,
|
|
USER_UTTERED_FEATURIZATION,
|
|
REMINDER_CANCELLED,
|
|
REMINDER_SCHEDULED,
|
|
ACTION_EXECUTION_REJECTED,
|
|
FORM_VALIDATION,
|
|
LOOP_INTERRUPTED,
|
|
FORM,
|
|
ACTIVE_LOOP,
|
|
ALL_SLOTS_RESET,
|
|
CONVERSATION_RESUMED,
|
|
CONVERSATION_PAUSED,
|
|
FOLLOWUP_ACTION,
|
|
STORY_EXPORTED,
|
|
RESTARTED,
|
|
ACTION_REVERTED,
|
|
USER_UTTERANCE_REVERTED,
|
|
BOT_UTTERED,
|
|
SESSION_STARTED,
|
|
AGENT_UTTERED,
|
|
],
|
|
}
|
|
|
|
EVENTS_SCHEMA = {"type": "array", "items": EVENT_SCHEMA}
|