Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Example usage error #19

Open
2 tasks done
tanaygodse opened this issue Sep 7, 2024 · 0 comments
Open
2 tasks done

Example usage error #19

tanaygodse opened this issue Sep 7, 2024 · 0 comments
Assignees

Comments

@tanaygodse
Copy link
Contributor

Prerequisites

  • I checked the documentation and found no answer to my problem
  • I checked the existing issues and made sure there are no similar bug reports

Category

Bug (unexpected behavior)

Expected Behavior

Example should give an output at the end of the conversation with AI Engine

Observed Behavior

Got a key error 'digest', similar to issue: #18

Complete Log:
18:29:05 DEBUG selector_events: Using selector: KqueueSelector
18:29:05 DEBUG ai-engine: 🚀 Starting example execution
18:29:05 DEBUG client: get_function_groups
18:29:05 DEBUG client:

📤 Request triggered : GET https://agentverse.ai/v1beta1/function-groups/public/
18:29:05 DEBUG client: body=None
18:29:05 DEBUG client: ---------------------------

18:29:05 DEBUG client:

📤 Request triggered : GET https://agentverse.ai/v1beta1/function-groups/
18:29:05 DEBUG client: body=None
18:29:05 DEBUG client: ---------------------------

18:29:06 DEBUG client:

📤 Request triggered : POST https://agentverse.ai/v1beta1/engine/chat/sessions
18:29:06 DEBUG client: body='{"email": "", "functionGroup": "523a7194-214f-48fd-b5be-b0e953cc35a3", "preferencesEnabled": false, "requestModel": "next-gen"}'
18:29:06 DEBUG client: ---------------------------

18:29:07 INFO ai-engine:

🤖 Interaction time

🎯 What is your objective [default: Find a flight to warsaw.]: Find a flight to warsaw
18:29:21 DEBUG client:

📤 Request triggered : POST https://agentverse.ai/v1beta1/engine/chat/sessions/6868b7e4-09aa-4c81-8862-04dc8f21dea9/submit
18:29:21 DEBUG client: body='{"payload": {"session_id": "6868b7e4-09aa-4c81-8862-04dc8f21dea9", "type": "start", "objective": "Find a flight to warsaw", "message_id": "c2d7543f-78ea-458f-8ca4-d70e072fe1bf", "context": "", "bucket_id": "523a7194-214f-48fd-b5be-b0e953cc35a3"}}'
18:29:21 DEBUG client: ---------------------------

18:29:22 DEBUG client:

📤 Request triggered : GET https://agentverse.ai/v1beta1/engine/chat/sessions/6868b7e4-09aa-4c81-8862-04dc8f21dea9/new-messages
18:29:22 DEBUG client: body=None
18:29:22 DEBUG client: ---------------------------

18:29:22 INFO ai-engine:
🤖 Processing

18:29:24 DEBUG ai-engine: No messages: 1 times in a row
18:29:24 DEBUG client:

📤 Request triggered : GET https://agentverse.ai/v1beta1/engine/chat/sessions/6868b7e4-09aa-4c81-8862-04dc8f21dea9/new-messages
18:29:24 DEBUG client: body=None
18:29:24 DEBUG client: ---------------------------

18:29:25 INFO ai-engine:
🤖 Processing

18:29:26 DEBUG ai-engine: No messages: 2 times in a row
18:29:26 DEBUG client:

📤 Request triggered : GET https://agentverse.ai/v1beta1/engine/chat/sessions/6868b7e4-09aa-4c81-8862-04dc8f21dea9/new-messages
18:29:26 DEBUG client: body=None
18:29:26 DEBUG client: ---------------------------

18:29:27 DEBUG client:
📥 Message received: {'agent_json': {'context_json': None,
'functions': None,
'options': [{'key': 0, 'value': 'Flights'}],
'text': 'Found a function for your objective. Please select.',
'type': 'task_list'},
'message_id': 'b5756058-7673-4746-a93b-85e3d95b0ba6',
'referral_id': None,
'score': 0.0,
'session_id': '6868b7e4-09aa-4c81-8862-04dc8f21dea9',
'timestamp': '2024-09-07T01:29:26.469345',
'type': 'agent_json'}

18:29:27 DEBUG client: -----------------

18:29:27 INFO ai-engine:

🤖 Interaction time
Please select a key from the list below:

➡ 🔑 0 -> 🧰 Flights

Enter task key: 0
18:29:31 DEBUG ai-engine: 0
18:29:31 DEBUG client:

📤 Request triggered : POST https://agentverse.ai/v1beta1/engine/chat/sessions/6868b7e4-09aa-4c81-8862-04dc8f21dea9/submit
18:29:31 DEBUG client: body='{"payload": {"session_id": "6868b7e4-09aa-4c81-8862-04dc8f21dea9", "type": "user_json", "message_id": "790edfcb-238b-453a-85b9-0f5bf46a7031", "referral_id": "b5756058-7673-4746-a93b-85e3d95b0ba6", "user_json": {"type": "task_list", "selection": [0]}}}'
18:29:31 DEBUG client: ---------------------------

18:29:32 INFO ai-engine:
🤖 Processing

18:29:33 DEBUG ai-engine: No messages: 0 times in a row
18:29:33 DEBUG client:

📤 Request triggered : GET https://agentverse.ai/v1beta1/engine/chat/sessions/6868b7e4-09aa-4c81-8862-04dc8f21dea9/new-messages?last_message_id=b5756058-7673-4746-a93b-85e3d95b0ba6
18:29:33 DEBUG client: body=None
18:29:33 DEBUG client: ---------------------------

18:29:34 DEBUG client:
📥 Message received: {'agent_info': "I am on it and will start working on the 'Flights' function.",
'message_id': '42a3b402-50da-4411-8379-dafe44d61d73',
'referral_id': None,
'score': 0.0,
'session_id': '6868b7e4-09aa-4c81-8862-04dc8f21dea9',
'timestamp': '2024-09-07T01:29:32.250997',
'type': 'agent_info'}

18:29:34 DEBUG client: -----------------

18:29:34 INFO ai-engine:
🤖 ℹ Informative message

---> ✨I am on it and will start working on the 'Flights' function.
18:29:37 INFO ai-engine:
🤖 Processing

18:29:39 DEBUG ai-engine: No messages: 0 times in a row
18:29:39 DEBUG client:

📤 Request triggered : GET https://agentverse.ai/v1beta1/engine/chat/sessions/6868b7e4-09aa-4c81-8862-04dc8f21dea9/new-messages?last_message_id=42a3b402-50da-4411-8379-dafe44d61d73
18:29:39 DEBUG client: body=None
18:29:39 DEBUG client: ---------------------------

18:29:40 DEBUG client:
📥 Message received: {'agent_json': {'context_json': None,
'functions': None,
'options': None,
'text': 'What is the date of the flight?',
'type': 'date'},
'message_id': 'f658428d-aee6-4a04-ba60-fe272b31ece4',
'referral_id': None,
'score': 0.0,
'session_id': '6868b7e4-09aa-4c81-8862-04dc8f21dea9',
'timestamp': '2024-09-07T01:29:35.460239',
'type': 'agent_json'}

18:29:40 DEBUG client: -----------------

18:29:40 INFO ai-engine:

🤖 Interaction time
What is the date of the flight?
✍ (enter to skip): September 10 2024
18:29:57 DEBUG client:

📤 Request triggered : POST https://agentverse.ai/v1beta1/engine/chat/sessions/6868b7e4-09aa-4c81-8862-04dc8f21dea9/submit
18:29:57 DEBUG client: body='{"payload": {"session_id": "6868b7e4-09aa-4c81-8862-04dc8f21dea9", "type": "user_message", "message_id": "e2bf0d1e-b6ab-481a-b4b4-fc046f2202fc", "referral_id": "f658428d-aee6-4a04-ba60-fe272b31ece4", "user_message": "September 10 2024"}}'
18:29:57 DEBUG client: ---------------------------

18:29:57 INFO ai-engine:
🤖 Processing

18:29:59 DEBUG ai-engine: No messages: 0 times in a row
18:29:59 DEBUG client:

📤 Request triggered : GET https://agentverse.ai/v1beta1/engine/chat/sessions/6868b7e4-09aa-4c81-8862-04dc8f21dea9/new-messages?last_message_id=f658428d-aee6-4a04-ba60-fe272b31ece4
18:29:59 DEBUG client: body=None
18:29:59 DEBUG client: ---------------------------

18:29:59 INFO ai-engine:
🤖 Processing

18:30:00 DEBUG ai-engine: No messages: 1 times in a row
18:30:00 DEBUG client:

📤 Request triggered : GET https://agentverse.ai/v1beta1/engine/chat/sessions/6868b7e4-09aa-4c81-8862-04dc8f21dea9/new-messages?last_message_id=f658428d-aee6-4a04-ba60-fe272b31ece4
18:30:00 DEBUG client: body=None
18:30:00 DEBUG client: ---------------------------

18:30:01 DEBUG client:
📥 Message received: {'agent_message': 'What is the departure airport IATA code?',
'message_id': '23271c44-8f75-4fd8-8edc-a3f08668156c',
'referral_id': None,
'score': 0.0,
'session_id': '6868b7e4-09aa-4c81-8862-04dc8f21dea9',
'timestamp': '2024-09-07T01:30:00.109938',
'type': 'agent_message'}

18:30:01 DEBUG client: -----------------

18:30:01 INFO ai-engine:

🤖 Interaction time
What is the departure airport iata code?
✍ (enter to skip): SFO
18:30:11 DEBUG client:

📤 Request triggered : POST https://agentverse.ai/v1beta1/engine/chat/sessions/6868b7e4-09aa-4c81-8862-04dc8f21dea9/submit
18:30:11 DEBUG client: body='{"payload": {"session_id": "6868b7e4-09aa-4c81-8862-04dc8f21dea9", "type": "user_message", "message_id": "b42f3a49-d8c3-4696-a7ff-96886c975ba6", "referral_id": "23271c44-8f75-4fd8-8edc-a3f08668156c", "user_message": "SFO"}}'
18:30:11 DEBUG client: ---------------------------

18:30:11 INFO ai-engine:
🤖 Processing

18:30:13 DEBUG ai-engine: No messages: 0 times in a row
18:30:13 DEBUG client:

📤 Request triggered : GET https://agentverse.ai/v1beta1/engine/chat/sessions/6868b7e4-09aa-4c81-8862-04dc8f21dea9/new-messages?last_message_id=23271c44-8f75-4fd8-8edc-a3f08668156c
18:30:13 DEBUG client: body=None
18:30:13 DEBUG client: ---------------------------

18:30:13 INFO ai-engine:
🤖 Processing

18:30:15 DEBUG ai-engine: No messages: 1 times in a row
18:30:15 DEBUG client:

📤 Request triggered : GET https://agentverse.ai/v1beta1/engine/chat/sessions/6868b7e4-09aa-4c81-8862-04dc8f21dea9/new-messages?last_message_id=23271c44-8f75-4fd8-8edc-a3f08668156c
18:30:15 DEBUG client: body=None
18:30:15 DEBUG client: ---------------------------

18:30:16 DEBUG client:
📥 Message received: {'agent_message': 'How many persons are going to fly?',
'message_id': '2f893930-d047-4c9d-a382-3718351bb9e0',
'referral_id': None,
'score': 0.0,
'session_id': '6868b7e4-09aa-4c81-8862-04dc8f21dea9',
'timestamp': '2024-09-07T01:30:13.777095',
'type': 'agent_message'}

18:30:16 DEBUG client: -----------------

18:30:16 INFO ai-engine:

🤖 Interaction time
How many persons are going to fly?
✍ (enter to skip): 2
18:30:19 DEBUG client:

📤 Request triggered : POST https://agentverse.ai/v1beta1/engine/chat/sessions/6868b7e4-09aa-4c81-8862-04dc8f21dea9/submit
18:30:19 DEBUG client: body='{"payload": {"session_id": "6868b7e4-09aa-4c81-8862-04dc8f21dea9", "type": "user_message", "message_id": "1cdc0423-f29f-4075-b209-3d4ab6810011", "referral_id": "2f893930-d047-4c9d-a382-3718351bb9e0", "user_message": "2"}}'
18:30:19 DEBUG client: ---------------------------

18:30:19 INFO ai-engine:
🤖 Processing

18:30:21 DEBUG ai-engine: No messages: 0 times in a row
18:30:21 DEBUG client:

📤 Request triggered : GET https://agentverse.ai/v1beta1/engine/chat/sessions/6868b7e4-09aa-4c81-8862-04dc8f21dea9/new-messages?last_message_id=2f893930-d047-4c9d-a382-3718351bb9e0
18:30:21 DEBUG client: body=None
18:30:21 DEBUG client: ---------------------------

18:30:21 INFO ai-engine:
🤖 Processing

18:30:23 DEBUG ai-engine: No messages: 1 times in a row
18:30:23 DEBUG client:

📤 Request triggered : GET https://agentverse.ai/v1beta1/engine/chat/sessions/6868b7e4-09aa-4c81-8862-04dc8f21dea9/new-messages?last_message_id=2f893930-d047-4c9d-a382-3718351bb9e0
18:30:23 DEBUG client: body=None
18:30:23 DEBUG client: ---------------------------

18:30:23 DEBUG client:
📥 Message received: {'agent_json': {'context_json': {'args': {'date': '10.09.2024',
'from': 'SFO',
'persons': 2,
'to': 'WAW',
'trip': 'oneway'}},
'functions': None,
'options': None,
'text': 'Please confirm the following details',
'type': 'context_json'},
'message_id': '8de4e166-71b2-459d-bf01-e209a611a8ff',
'referral_id': None,
'score': 0.0,
'session_id': '6868b7e4-09aa-4c81-8862-04dc8f21dea9',
'timestamp': '2024-09-07T01:30:22.557358',
'type': 'agent_json'}

18:30:23 DEBUG client: -----------------

18:30:23 DEBUG ai-engine: Unhandled exception: 'digest'
Error 'digest'
18:30:23 DEBUG client:

📤 Request triggered : DELETE https://agentverse.ai/v1beta1/engine/chat/sessions/6868b7e4-09aa-4c81-8862-04dc8f21dea9
18:30:23 DEBUG client: body=None
18:30:23 DEBUG client: ---------------------------

Traceback (most recent call last):
File "/ai-engine-sdk/ai-engine.py", line 124, in
asyncio.run(main())
File "/opt/homebrew/Cellar/[email protected]/3.12.3/Frameworks/Python.framework/Versions/3.12/lib/python3.12/asyncio/runners.py", line 194, in run
return runner.run(main)
^^^^^^^^^^^^^^^^
File "/opt/homebrew/Cellar/[email protected]/3.12.3/Frameworks/Python.framework/Versions/3.12/lib/python3.12/asyncio/runners.py", line 118, in run
return self._loop.run_until_complete(task)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/homebrew/Cellar/[email protected]/3.12.3/Frameworks/Python.framework/Versions/3.12/lib/python3.12/asyncio/base_events.py", line 687, in run_until_complete
return future.result()
^^^^^^^^^^^^^^^
File "/ai-engine-sdk/ai-engine.py", line 110, in main
raise e
File "/ai-engine-sdk/ai-engine.py", line 46, in main
messages: list[ApiBaseMessage] = await session.get_messages()
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/venv/lib/python3.12/site-packages/ai_engine_sdk/client.py", line 205, in get_messages
'model': agent_json['context_json']['digest'],
~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^
KeyError: 'digest'

To Reproduce

No response

Version

v

Environment Details (Optional)

No response

Failure Logs (Optional)

No response

Additional Information (Optional)

No response

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants