|
36 | 36 | "metadata": {}, |
37 | 37 | "outputs": [ |
38 | 38 | { |
39 | | - "name": "stdout", |
40 | | - "output_type": "stream", |
41 | | - "text": [ |
42 | | - "registered handlers: 8\n", |
43 | | - "Entering bot_on_envelope\n", |
44 | | - "self._active_conversation: None\n", |
45 | | - "in_envelope.conversation.id: conv:558a5160-5937-4ca0-9b5e-4ee8f3e93a64\n", |
46 | | - "Processing event: {\"eventType\": \"invite\", \"to\": {\"speakerUri\": \"tag:dev.travelbot,2025:0001\"}}\n", |
47 | | - "Processing event with type: invite\n", |
48 | | - "Entering bot_on_invite\n", |
49 | | - "Entering bot_on_grant_floor\n", |
50 | | - "out_envelope: {\"schema\": {\"version\": \"1.0.0\"}, \"conversation\": {\"id\": \"conv:558a5160-5937-4ca0-9b5e-4ee8f3e93a64\", \"conversants\": [{\"identification\": {\"speakerUri\": \"tag:userproxy.com,2025:abc123\", \"serviceUrl\": \"https://userproxy.com\", \"conversationalName\": \"John Doe\", \"role\": \"User\"}}]}, \"sender\": {\"speakerUri\": \"tag:dev.travelbot,2025:0001\", \"serviceUrl\": \"https://dev.travelbot.ee/openfloor/conversation\"}, \"events\": []}\n", |
51 | | - "Entering bot_on_envelope\n", |
52 | | - "self._active_conversation: Conversation(id='conv:558a5160-5937-4ca0-9b5e-4ee8f3e93a64', conversants=[])\n", |
53 | | - "in_envelope.conversation.id: conv:558a5160-5937-4ca0-9b5e-4ee8f3e93a64\n", |
54 | | - "Processing event: {\"eventType\": \"utterance\", \"to\": {\"speakerUri\": \"tag:dev.travelbot,2025:0001\", \"private\": true}, \"parameters\": {\"dialogEvent\": {\"id\": \"de:ac725b50-ff80-465a-a966-ee0de38b4a99\", \"speakerUri\": \"tag:userproxy.com,2025:abc123\", \"span\": {\"startTime\": \"2025-05-12T13:54:08.781524\"}, \"features\": {\"text\": {\"mimeType\": \"text/plain\", \"tokens\": [{\"value\": \"Give me the times to Vancouver!\"}]}}}}}\n", |
55 | | - "Processing event with type: utterance\n", |
56 | | - "Entering bot_on_utterance\n", |
57 | | - "out_envelope: {\"schema\": {\"version\": \"1.0.0\"}, \"conversation\": {\"id\": \"conv:558a5160-5937-4ca0-9b5e-4ee8f3e93a64\", \"conversants\": [{\"identification\": {\"speakerUri\": \"tag:userproxy.com,2025:abc123\", \"serviceUrl\": \"https://userproxy.com\", \"conversationalName\": \"John Doe\", \"role\": \"User\"}}, {\"identification\": {\"speakerUri\": \"tag:dev.travelbot,2025:0001\", \"serviceUrl\": \"https://dev.travelbot.ee/openfloor/conversation\", \"organization\": \"Travelbot Inc.\", \"conversationalName\": \"travelbot\", \"department\": \"Reservations and Customer Service\", \"role\": \"Reservation Specialist\", \"synopsis\": \"Reservation specialist as part of the Travelbot system.\"}}]}, \"sender\": {\"speakerUri\": \"tag:dev.travelbot,2025:0001\", \"serviceUrl\": \"https://dev.travelbot.ee/openfloor/conversation\"}, \"events\": [{\"eventType\": \"utterance\", \"parameters\": {\"dialogEvent\": {\"id\": \"de:36cb6a90-96ba-4aad-a7eb-d0ab9f0c7976\", \"speakerUri\": \"tag:dev.travelbot,2025:0001\", \"span\": {\"startTime\": \"2025-05-12T15:28:37.352479\"}, \"features\": {\"text\": {\"mimeType\": \"text/plain\", \"tokens\": [{\"value\": \"Sorry! I'm a simple bot that has not been programmed to do anything yet.\"}]}}}}}]}\n" |
| 39 | + "ename": "ModuleNotFoundError", |
| 40 | + "evalue": "No module named 'events'", |
| 41 | + "output_type": "error", |
| 42 | + "traceback": [ |
| 43 | + "\u001b[31m---------------------------------------------------------------------------\u001b[39m", |
| 44 | + "\u001b[31mModuleNotFoundError\u001b[39m Traceback (most recent call last)", |
| 45 | + "\u001b[36mCell\u001b[39m\u001b[36m \u001b[39m\u001b[32mIn[3]\u001b[39m\u001b[32m, line 1\u001b[39m\n\u001b[32m----> \u001b[39m\u001b[32m1\u001b[39m \u001b[38;5;28;01mfrom\u001b[39;00m\u001b[38;5;250m \u001b[39m\u001b[34;01mopenfloor\u001b[39;00m\u001b[38;5;250m \u001b[39m\u001b[38;5;28;01mimport\u001b[39;00m BotAgent, Manifest, Identification, Envelope\n\u001b[32m 3\u001b[39m user_manifest = Manifest(\n\u001b[32m 4\u001b[39m Identification(\n\u001b[32m 5\u001b[39m conversationalName=\u001b[33m\"\u001b[39m\u001b[33mJohn Doe\u001b[39m\u001b[33m\"\u001b[39m,\n\u001b[32m (...)\u001b[39m\u001b[32m 9\u001b[39m )\n\u001b[32m 10\u001b[39m )\n\u001b[32m 12\u001b[39m bot_manifest=Manifest.from_file(\u001b[33m\"\u001b[39m\u001b[33m../sample_json/manifest1.json\u001b[39m\u001b[33m\"\u001b[39m)\n", |
| 46 | + "\u001b[36mFile \u001b[39m\u001b[32m~\\OneDrive\\Open Voice Network\\GitHub\\openfloor\\python\\src\\openfloor\\__init__.py:6\u001b[39m\n\u001b[32m 4\u001b[39m \u001b[38;5;28;01mfrom\u001b[39;00m\u001b[38;5;250m \u001b[39m\u001b[34;01m.\u001b[39;00m\u001b[34;01mevents\u001b[39;00m\u001b[38;5;250m \u001b[39m\u001b[38;5;28;01mimport\u001b[39;00m *\n\u001b[32m 5\u001b[39m \u001b[38;5;28;01mfrom\u001b[39;00m\u001b[38;5;250m \u001b[39m\u001b[34;01m.\u001b[39;00m\u001b[34;01mjson_serializable\u001b[39;00m\u001b[38;5;250m \u001b[39m\u001b[38;5;28;01mimport\u001b[39;00m *\n\u001b[32m----> \u001b[39m\u001b[32m6\u001b[39m \u001b[38;5;28;01mfrom\u001b[39;00m\u001b[38;5;250m \u001b[39m\u001b[34;01m.\u001b[39;00m\u001b[34;01magent\u001b[39;00m\u001b[38;5;250m \u001b[39m\u001b[38;5;28;01mimport\u001b[39;00m *\n\u001b[32m 7\u001b[39m __all__ = [\n\u001b[32m 8\u001b[39m \u001b[33m\"\u001b[39m\u001b[33mDialogEvent\u001b[39m\u001b[33m\"\u001b[39m, \n\u001b[32m 9\u001b[39m \u001b[33m\"\u001b[39m\u001b[33mDialogHistory\u001b[39m\u001b[33m\"\u001b[39m,\n\u001b[32m (...)\u001b[39m\u001b[32m 36\u001b[39m \u001b[33m\"\u001b[39m\u001b[33mBotAgent\u001b[39m\u001b[33m\"\u001b[39m,\n\u001b[32m 37\u001b[39m ]\n", |
| 47 | + "\u001b[36mFile \u001b[39m\u001b[32m~\\OneDrive\\Open Voice Network\\GitHub\\openfloor\\python\\src\\openfloor\\agent.py:2\u001b[39m\n\u001b[32m 1\u001b[39m \u001b[38;5;28;01mfrom\u001b[39;00m\u001b[38;5;250m \u001b[39m\u001b[34;01mtyping\u001b[39;00m\u001b[38;5;250m \u001b[39m\u001b[38;5;28;01mimport\u001b[39;00m Optional, List, Tuple, Dict\n\u001b[32m----> \u001b[39m\u001b[32m2\u001b[39m \u001b[38;5;28;01mimport\u001b[39;00m\u001b[38;5;250m \u001b[39m\u001b[34;01mevents\u001b[39;00m\u001b[38;5;250m \u001b[39m\u001b[38;5;28;01mas\u001b[39;00m\u001b[38;5;250m \u001b[39m\u001b[34;01mevents_module\u001b[39;00m\n\u001b[32m 3\u001b[39m \u001b[38;5;28;01mfrom\u001b[39;00m\u001b[38;5;250m \u001b[39m\u001b[34;01mabc\u001b[39;00m\u001b[38;5;250m \u001b[39m\u001b[38;5;28;01mimport\u001b[39;00m ABC, abstractmethod\n\u001b[32m 4\u001b[39m \u001b[38;5;28;01mfrom\u001b[39;00m\u001b[38;5;250m \u001b[39m\u001b[34;01mopenfloor\u001b[39;00m\u001b[38;5;250m \u001b[39m\u001b[38;5;28;01mimport\u001b[39;00m Parameters, DialogEvent, TextFeature, To, Sender, Manifest, Conversation, Envelope, Event, InviteEvent, UtteranceEvent, ContextEvent, UninviteEvent, DeclineInviteEvent, ByeEvent, GetManifestsEvent, PublishManifestsEvent, RequestFloorEvent, GrantFloorEvent, RevokeFloorEvent\n", |
| 48 | + "\u001b[31mModuleNotFoundError\u001b[39m: No module named 'events'" |
58 | 49 | ] |
59 | 50 | } |
60 | 51 | ], |
|
82 | 73 | " out_envelope = myagent.process_envelope(input_envelopes[n])\n", |
83 | 74 | " out_envelope.to_file(f\"../sample_json/out_envelope{n}.json\",as_payload=True,indent=2) \n" |
84 | 75 | ] |
| 76 | + }, |
| 77 | + { |
| 78 | + "cell_type": "code", |
| 79 | + "execution_count": null, |
| 80 | + "metadata": {}, |
| 81 | + "outputs": [], |
| 82 | + "source": [] |
85 | 83 | } |
86 | 84 | ], |
87 | 85 | "metadata": { |
88 | 86 | "kernelspec": { |
89 | | - "display_name": "Python 3", |
| 87 | + "display_name": "Python 3 (ipykernel)", |
90 | 88 | "language": "python", |
91 | 89 | "name": "python3" |
92 | 90 | }, |
|
100 | 98 | "name": "python", |
101 | 99 | "nbconvert_exporter": "python", |
102 | 100 | "pygments_lexer": "ipython3", |
103 | | - "version": "3.12.7" |
| 101 | + "version": "3.11.4" |
104 | 102 | } |
105 | 103 | }, |
106 | 104 | "nbformat": 4, |
107 | | - "nbformat_minor": 2 |
| 105 | + "nbformat_minor": 4 |
108 | 106 | } |
0 commit comments