Spaces:
Sleeping
Sleeping
BolyosCsaba
commited on
Commit
Β·
5fae0de
1
Parent(s):
4c98975
updated to public
Browse files- src/protocol/events.py +4 -4
- test_app.py +2 -2
src/protocol/events.py
CHANGED
|
@@ -6,8 +6,8 @@ from ..utils.helpers import get_timestamp
|
|
| 6 |
|
| 7 |
def create_dialog_event(
|
| 8 |
event_type: str,
|
| 9 |
-
|
| 10 |
-
|
| 11 |
) -> Dict[str, Any]:
|
| 12 |
"""
|
| 13 |
Create a DialogEventObject
|
|
@@ -16,7 +16,7 @@ def create_dialog_event(
|
|
| 16 |
Args:
|
| 17 |
event_type: Type of event (e.g., "GRANT_FLOOR", "GET_MANIFEST")
|
| 18 |
event_ Event-specific data
|
| 19 |
-
|
| 20 |
|
| 21 |
Returns:
|
| 22 |
DialogEventObject dictionary
|
|
@@ -27,7 +27,7 @@ def create_dialog_event(
|
|
| 27 |
"event_data": event_data
|
| 28 |
}
|
| 29 |
|
| 30 |
-
if
|
| 31 |
event["metadata"] = metadata
|
| 32 |
|
| 33 |
return event
|
|
|
|
| 6 |
|
| 7 |
def create_dialog_event(
|
| 8 |
event_type: str,
|
| 9 |
+
event_data: Dict[str, Any],
|
| 10 |
+
metadata: Optional[Dict[str, Any]] = None
|
| 11 |
) -> Dict[str, Any]:
|
| 12 |
"""
|
| 13 |
Create a DialogEventObject
|
|
|
|
| 16 |
Args:
|
| 17 |
event_type: Type of event (e.g., "GRANT_FLOOR", "GET_MANIFEST")
|
| 18 |
event_ Event-specific data
|
| 19 |
+
meta Optional metadata
|
| 20 |
|
| 21 |
Returns:
|
| 22 |
DialogEventObject dictionary
|
|
|
|
| 27 |
"event_data": event_data
|
| 28 |
}
|
| 29 |
|
| 30 |
+
if metadata:
|
| 31 |
event["metadata"] = metadata
|
| 32 |
|
| 33 |
return event
|
test_app.py
CHANGED
|
@@ -212,7 +212,7 @@ def get_agent_dropdown_choices():
|
|
| 212 |
|
| 213 |
|
| 214 |
# Create Gradio interface
|
| 215 |
-
with gr.Blocks(title="OFP Floor Manager Test") as demo:
|
| 216 |
gr.Markdown("# π€ OpenFloor Protocol - Floor Manager Test")
|
| 217 |
gr.Markdown("Test interface for managing multi-agent floor conversations")
|
| 218 |
|
|
@@ -336,4 +336,4 @@ if __name__ == "__main__":
|
|
| 336 |
print("π Starting OFP Floor Manager Test Interface...")
|
| 337 |
print("π± Open your browser to test the interface")
|
| 338 |
print("=" * 50)
|
| 339 |
-
demo.launch(server_name="0.0.0.0", server_port=7860, share=False
|
|
|
|
| 212 |
|
| 213 |
|
| 214 |
# Create Gradio interface
|
| 215 |
+
with gr.Blocks(title="OFP Floor Manager Test", theme=gr.themes.Soft()) as demo:
|
| 216 |
gr.Markdown("# π€ OpenFloor Protocol - Floor Manager Test")
|
| 217 |
gr.Markdown("Test interface for managing multi-agent floor conversations")
|
| 218 |
|
|
|
|
| 336 |
print("π Starting OFP Floor Manager Test Interface...")
|
| 337 |
print("π± Open your browser to test the interface")
|
| 338 |
print("=" * 50)
|
| 339 |
+
demo.launch(server_name="0.0.0.0", server_port=7860, share=False)
|