besser-agentic-framework 4.3.1__tar.gz → 4.3.3__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {besser_agentic_framework-4.3.1/besser_agentic_framework.egg-info → besser_agentic_framework-4.3.3}/PKG-INFO +31 -23
- {besser_agentic_framework-4.3.1 → besser_agentic_framework-4.3.3}/README.md +8 -8
- {besser_agentic_framework-4.3.1/besser/agent → besser_agentic_framework-4.3.3/baf}/__init__.py +1 -1
- {besser_agentic_framework-4.3.1/besser/agent → besser_agentic_framework-4.3.3/baf}/core/agent.py +44 -37
- {besser_agentic_framework-4.3.1/besser/agent → besser_agentic_framework-4.3.3/baf}/core/entity/entity.py +3 -3
- {besser_agentic_framework-4.3.1/besser/agent → besser_agentic_framework-4.3.3/baf}/core/intent/intent.py +6 -6
- {besser_agentic_framework-4.3.1/besser/agent → besser_agentic_framework-4.3.3/baf}/core/intent/intent_parameter.py +1 -1
- besser_agentic_framework-4.3.3/baf/core/message.py +114 -0
- {besser_agentic_framework-4.3.1/besser/agent → besser_agentic_framework-4.3.3/baf}/core/processors/audio_language_detection_processor.py +7 -7
- {besser_agentic_framework-4.3.1/besser/agent → besser_agentic_framework-4.3.3/baf}/core/processors/language_detection_processor.py +3 -3
- {besser_agentic_framework-4.3.1/besser/agent → besser_agentic_framework-4.3.3/baf}/core/processors/processor.py +3 -3
- {besser_agentic_framework-4.3.1/besser/agent → besser_agentic_framework-4.3.3/baf}/core/processors/user_adaptation_processor.py +5 -5
- {besser_agentic_framework-4.3.1/besser/agent → besser_agentic_framework-4.3.3/baf}/core/session.py +34 -15
- {besser_agentic_framework-4.3.1/besser/agent → besser_agentic_framework-4.3.3/baf}/core/state.py +25 -21
- {besser_agentic_framework-4.3.1/besser/agent → besser_agentic_framework-4.3.3/baf}/core/transition/condition.py +1 -1
- {besser_agentic_framework-4.3.1/besser/agent → besser_agentic_framework-4.3.3/baf}/core/transition/transition.py +5 -5
- {besser_agentic_framework-4.3.1/besser/agent → besser_agentic_framework-4.3.3/baf}/core/transition/transition_builder.py +10 -10
- {besser_agentic_framework-4.3.1/besser/agent → besser_agentic_framework-4.3.3/baf}/db/__init__.py +1 -1
- {besser_agentic_framework-4.3.1/besser/agent → besser_agentic_framework-4.3.3/baf}/db/db_handler.py +3 -3
- {besser_agentic_framework-4.3.1/besser/agent → besser_agentic_framework-4.3.3/baf}/db/monitoring_db.py +22 -18
- {besser_agentic_framework-4.3.1/besser/agent → besser_agentic_framework-4.3.3/baf}/db/monitoring_ui/db_connection.py +4 -4
- {besser_agentic_framework-4.3.1/besser/agent → besser_agentic_framework-4.3.3/baf}/db/monitoring_ui/flow_graph.py +2 -2
- {besser_agentic_framework-4.3.1/besser/agent → besser_agentic_framework-4.3.3/baf}/db/monitoring_ui/home.py +2 -2
- {besser_agentic_framework-4.3.1/besser/agent → besser_agentic_framework-4.3.3/baf}/db/monitoring_ui/intent_details.py +2 -2
- {besser_agentic_framework-4.3.1/besser/agent → besser_agentic_framework-4.3.3/baf}/db/monitoring_ui/monitoring_ui.py +8 -8
- {besser_agentic_framework-4.3.1/besser/agent → besser_agentic_framework-4.3.3/baf}/db/monitoring_ui/table_overview.py +2 -2
- {besser_agentic_framework-4.3.1/besser/agent → besser_agentic_framework-4.3.3/baf}/library/entity/base_entities.py +1 -1
- {besser_agentic_framework-4.3.1/besser/agent → besser_agentic_framework-4.3.3/baf}/library/intent/intent_library.py +1 -1
- {besser_agentic_framework-4.3.1/besser/agent → besser_agentic_framework-4.3.3/baf}/library/state/state_library.py +1 -1
- {besser_agentic_framework-4.3.1/besser/agent → besser_agentic_framework-4.3.3/baf}/library/transition/condition_functions.py +3 -3
- {besser_agentic_framework-4.3.1/besser/agent → besser_agentic_framework-4.3.3/baf}/library/transition/conditions.py +4 -4
- {besser_agentic_framework-4.3.1/besser/agent → besser_agentic_framework-4.3.3/baf}/library/transition/events/base_events.py +14 -11
- {besser_agentic_framework-4.3.1/besser/agent → besser_agentic_framework-4.3.3/baf}/library/transition/events/github_webhooks_events.py +1 -1
- {besser_agentic_framework-4.3.1/besser/agent → besser_agentic_framework-4.3.3/baf}/library/transition/events/gitlab_webhooks_events.py +1 -1
- {besser_agentic_framework-4.3.1/besser/agent → besser_agentic_framework-4.3.3/baf}/nlp/__init__.py +5 -5
- {besser_agentic_framework-4.3.1/besser/agent → besser_agentic_framework-4.3.3/baf}/nlp/intent_classifier/intent_classifier.py +4 -4
- {besser_agentic_framework-4.3.1/besser/agent → besser_agentic_framework-4.3.3/baf}/nlp/intent_classifier/intent_classifier_configuration.py +3 -3
- {besser_agentic_framework-4.3.1/besser/agent → besser_agentic_framework-4.3.3/baf}/nlp/intent_classifier/intent_classifier_prediction.py +3 -3
- {besser_agentic_framework-4.3.1/besser/agent → besser_agentic_framework-4.3.3/baf}/nlp/intent_classifier/llm_intent_classifier.py +8 -8
- {besser_agentic_framework-4.3.1/besser/agent → besser_agentic_framework-4.3.3/baf}/nlp/intent_classifier/simple_intent_classifier_pytorch.py +10 -10
- {besser_agentic_framework-4.3.1/besser/agent → besser_agentic_framework-4.3.3/baf}/nlp/intent_classifier/simple_intent_classifier_tensorflow.py +9 -9
- {besser_agentic_framework-4.3.1/besser/agent → besser_agentic_framework-4.3.3/baf}/nlp/llm/llm.py +6 -6
- {besser_agentic_framework-4.3.1/besser/agent → besser_agentic_framework-4.3.3/baf}/nlp/llm/llm_huggingface.py +10 -10
- {besser_agentic_framework-4.3.1/besser/agent → besser_agentic_framework-4.3.3/baf}/nlp/llm/llm_huggingface_api.py +8 -8
- {besser_agentic_framework-4.3.1/besser/agent → besser_agentic_framework-4.3.3/baf}/nlp/llm/llm_openai_api.py +10 -10
- {besser_agentic_framework-4.3.1/besser/agent → besser_agentic_framework-4.3.3/baf}/nlp/llm/llm_replicate_api.py +11 -9
- {besser_agentic_framework-4.3.1/besser/agent → besser_agentic_framework-4.3.3/baf}/nlp/ner/base/any.py +1 -1
- {besser_agentic_framework-4.3.1/besser/agent → besser_agentic_framework-4.3.3/baf}/nlp/ner/base/datetime.py +3 -3
- {besser_agentic_framework-4.3.1/besser/agent → besser_agentic_framework-4.3.3/baf}/nlp/ner/base/number.py +2 -2
- {besser_agentic_framework-4.3.1/besser/agent → besser_agentic_framework-4.3.3/baf}/nlp/ner/ner.py +4 -4
- {besser_agentic_framework-4.3.1/besser/agent → besser_agentic_framework-4.3.3/baf}/nlp/ner/ner_prediction.py +2 -2
- {besser_agentic_framework-4.3.1/besser/agent → besser_agentic_framework-4.3.3/baf}/nlp/ner/simple_ner.py +15 -15
- {besser_agentic_framework-4.3.1/besser/agent → besser_agentic_framework-4.3.3/baf}/nlp/nlp_engine.py +19 -19
- {besser_agentic_framework-4.3.1/besser/agent → besser_agentic_framework-4.3.3/baf}/nlp/preprocessing/pipelines.py +1 -1
- {besser_agentic_framework-4.3.1/besser/agent → besser_agentic_framework-4.3.3/baf}/nlp/preprocessing/text_preprocessing.py +3 -3
- {besser_agentic_framework-4.3.1/besser/agent → besser_agentic_framework-4.3.3/baf}/nlp/rag/rag.py +9 -9
- {besser_agentic_framework-4.3.1/besser/agent → besser_agentic_framework-4.3.3/baf}/nlp/speech2text/api_speech2text.py +4 -4
- {besser_agentic_framework-4.3.1/besser/agent → besser_agentic_framework-4.3.3/baf}/nlp/speech2text/hf_speech2text.py +4 -4
- {besser_agentic_framework-4.3.1/besser/agent → besser_agentic_framework-4.3.3/baf}/nlp/speech2text/luxasr_speech2text.py +2 -2
- {besser_agentic_framework-4.3.1/besser/agent → besser_agentic_framework-4.3.3/baf}/nlp/speech2text/openai_speech2text.py +4 -4
- {besser_agentic_framework-4.3.1/besser/agent → besser_agentic_framework-4.3.3/baf}/nlp/speech2text/speech2text.py +2 -2
- {besser_agentic_framework-4.3.1/besser/agent → besser_agentic_framework-4.3.3/baf}/nlp/text2speech/hf_text2speech.py +3 -3
- {besser_agentic_framework-4.3.1/besser/agent → besser_agentic_framework-4.3.3/baf}/nlp/text2speech/openai_text2speech.py +5 -5
- {besser_agentic_framework-4.3.1/besser/agent → besser_agentic_framework-4.3.3/baf}/nlp/text2speech/piper_text2speech.py +6 -5
- {besser_agentic_framework-4.3.1/besser/agent → besser_agentic_framework-4.3.3/baf}/nlp/text2speech/text2speech.py +2 -2
- {besser_agentic_framework-4.3.1/besser/agent → besser_agentic_framework-4.3.3/baf}/platforms/a2a/__init__.py +1 -1
- {besser_agentic_framework-4.3.1/besser/agent → besser_agentic_framework-4.3.3/baf}/platforms/a2a/a2a_platform.py +12 -12
- {besser_agentic_framework-4.3.1/besser/agent → besser_agentic_framework-4.3.3/baf}/platforms/a2a/agent_registry.py +3 -3
- {besser_agentic_framework-4.3.1/besser/agent → besser_agentic_framework-4.3.3/baf}/platforms/a2a/message_router.py +5 -5
- {besser_agentic_framework-4.3.1/besser/agent → besser_agentic_framework-4.3.3/baf}/platforms/a2a/server.py +5 -5
- {besser_agentic_framework-4.3.1/besser/agent → besser_agentic_framework-4.3.3/baf}/platforms/a2a/task_protocol.py +2 -2
- {besser_agentic_framework-4.3.1/besser/agent → besser_agentic_framework-4.3.3/baf}/platforms/github/__init__.py +1 -1
- {besser_agentic_framework-4.3.1/besser/agent → besser_agentic_framework-4.3.3/baf}/platforms/github/github_actions.py +1 -1
- {besser_agentic_framework-4.3.1/besser/agent → besser_agentic_framework-4.3.3/baf}/platforms/github/github_platform.py +10 -10
- {besser_agentic_framework-4.3.1/besser/agent → besser_agentic_framework-4.3.3/baf}/platforms/gitlab/__init__.py +1 -1
- {besser_agentic_framework-4.3.1/besser/agent → besser_agentic_framework-4.3.3/baf}/platforms/gitlab/gitlab_actions.py +1 -1
- {besser_agentic_framework-4.3.1/besser/agent → besser_agentic_framework-4.3.3/baf}/platforms/gitlab/gitlab_platform.py +10 -10
- {besser_agentic_framework-4.3.1/besser/agent → besser_agentic_framework-4.3.3/baf}/platforms/payload.py +17 -3
- {besser_agentic_framework-4.3.1/besser/agent → besser_agentic_framework-4.3.3/baf}/platforms/platform.py +2 -2
- {besser_agentic_framework-4.3.1/besser/agent → besser_agentic_framework-4.3.3/baf}/platforms/telegram/__init__.py +1 -1
- {besser_agentic_framework-4.3.1/besser/agent → besser_agentic_framework-4.3.3/baf}/platforms/telegram/telegram_platform.py +10 -10
- {besser_agentic_framework-4.3.1/besser/agent → besser_agentic_framework-4.3.3/baf}/platforms/websocket/__init__.py +21 -1
- {besser_agentic_framework-4.3.1/besser/agent → besser_agentic_framework-4.3.3/baf}/platforms/websocket/streamlit_ui/__init__.py +1 -1
- {besser_agentic_framework-4.3.1/besser/agent → besser_agentic_framework-4.3.3/baf}/platforms/websocket/streamlit_ui/chat.py +6 -6
- {besser_agentic_framework-4.3.1/besser/agent → besser_agentic_framework-4.3.3/baf}/platforms/websocket/streamlit_ui/chat_interface_style.py +1 -1
- {besser_agentic_framework-4.3.1/besser/agent → besser_agentic_framework-4.3.3/baf}/platforms/websocket/streamlit_ui/initialization.py +4 -4
- {besser_agentic_framework-4.3.1/besser/agent → besser_agentic_framework-4.3.3/baf}/platforms/websocket/streamlit_ui/login.py +1 -1
- {besser_agentic_framework-4.3.1/besser/agent → besser_agentic_framework-4.3.3/baf}/platforms/websocket/streamlit_ui/message_input.py +3 -3
- {besser_agentic_framework-4.3.1/besser/agent → besser_agentic_framework-4.3.3/baf}/platforms/websocket/streamlit_ui/session_management.py +1 -1
- {besser_agentic_framework-4.3.1/besser/agent → besser_agentic_framework-4.3.3/baf}/platforms/websocket/streamlit_ui/sidebar.py +5 -5
- {besser_agentic_framework-4.3.1/besser/agent → besser_agentic_framework-4.3.3/baf}/platforms/websocket/streamlit_ui/streamlit_ui.py +7 -7
- {besser_agentic_framework-4.3.1/besser/agent → besser_agentic_framework-4.3.3/baf}/platforms/websocket/streamlit_ui/websocket_callbacks.py +7 -7
- {besser_agentic_framework-4.3.1/besser/agent → besser_agentic_framework-4.3.3/baf}/platforms/websocket/websocket_platform.py +97 -59
- besser_agentic_framework-4.3.3/baf/test/components/conftest.py +56 -0
- besser_agentic_framework-4.3.3/baf/test/components/test_core_agent.py +104 -0
- besser_agentic_framework-4.3.3/baf/test/components/test_core_intent_entity.py +106 -0
- besser_agentic_framework-4.3.3/baf/test/components/test_core_message.py +82 -0
- besser_agentic_framework-4.3.3/baf/test/components/test_core_processor.py +47 -0
- besser_agentic_framework-4.3.3/baf/test/components/test_core_property.py +71 -0
- besser_agentic_framework-4.3.3/baf/test/components/test_core_session.py +67 -0
- besser_agentic_framework-4.3.3/baf/test/components/test_core_state.py +123 -0
- besser_agentic_framework-4.3.3/baf/test/components/test_core_transition.py +81 -0
- besser_agentic_framework-4.3.3/baf/test/components/test_library_events.py +78 -0
- besser_agentic_framework-4.3.3/baf/test/components/test_nlp_configurations.py +80 -0
- besser_agentic_framework-4.3.3/baf/test/components/test_nlp_engine.py +65 -0
- besser_agentic_framework-4.3.3/baf/test/components/test_nlp_preprocessing.py +68 -0
- besser_agentic_framework-4.3.3/baf/test/components/test_platforms.py +63 -0
- besser_agentic_framework-4.3.3/baf/test/components/test_workflows.py +132 -0
- besser_agentic_framework-4.3.3/baf/test/dependencies/conftest.py +6 -0
- besser_agentic_framework-4.3.3/baf/test/dependencies/test_core.py +136 -0
- besser_agentic_framework-4.3.3/baf/test/dependencies/test_docs.py +26 -0
- besser_agentic_framework-4.3.3/baf/test/dependencies/test_extras.py +92 -0
- besser_agentic_framework-4.3.3/baf/test/dependencies/test_framework.py +184 -0
- besser_agentic_framework-4.3.3/baf/test/dependencies/test_llms.py +21 -0
- besser_agentic_framework-4.3.3/baf/test/dependencies/test_tensorflow.py +21 -0
- besser_agentic_framework-4.3.3/baf/test/dependencies/test_torch.py +27 -0
- {besser_agentic_framework-4.3.1/besser/agent → besser_agentic_framework-4.3.3/baf}/test/examples/a2a_multiagent.py +4 -4
- {besser_agentic_framework-4.3.1/besser/agent → besser_agentic_framework-4.3.3/baf}/test/examples/api_speech2text_agent.py +9 -9
- {besser_agentic_framework-4.3.1/besser/agent → besser_agentic_framework-4.3.3/baf}/test/examples/github_agent.py +4 -4
- {besser_agentic_framework-4.3.1/besser/agent → besser_agentic_framework-4.3.3/baf}/test/examples/gitlab_agent.py +5 -5
- {besser_agentic_framework-4.3.1/besser/agent → besser_agentic_framework-4.3.3/baf}/test/examples/greetings_agent.py +3 -3
- {besser_agentic_framework-4.3.1/besser/agent → besser_agentic_framework-4.3.3/baf}/test/examples/llm_agent.py +8 -8
- {besser_agentic_framework-4.3.1/besser/agent → besser_agentic_framework-4.3.3/baf}/test/examples/multiagent/coder_agent.py +6 -6
- {besser_agentic_framework-4.3.1/besser/agent → besser_agentic_framework-4.3.3/baf}/test/examples/multiagent/main_agent.py +5 -5
- {besser_agentic_framework-4.3.1/besser/agent → besser_agentic_framework-4.3.3/baf}/test/examples/multiagent/reviewer_agent.py +6 -6
- {besser_agentic_framework-4.3.1/besser/agent → besser_agentic_framework-4.3.3/baf}/test/examples/rag_agent.py +8 -8
- {besser_agentic_framework-4.3.1/besser/agent → besser_agentic_framework-4.3.3/baf}/test/examples/speech2speech_agent.py +12 -12
- {besser_agentic_framework-4.3.1/besser/agent → besser_agentic_framework-4.3.3/baf}/test/examples/speech2text_agent.py +7 -7
- {besser_agentic_framework-4.3.1/besser/agent → besser_agentic_framework-4.3.3/baf}/test/examples/stargazer_agent.py +5 -5
- {besser_agentic_framework-4.3.1/besser/agent → besser_agentic_framework-4.3.3/baf}/test/examples/telegram_agent.py +3 -3
- {besser_agentic_framework-4.3.1/besser/agent → besser_agentic_framework-4.3.3/baf}/test/examples/text2speech_agent.py +6 -6
- {besser_agentic_framework-4.3.1/besser/agent → besser_agentic_framework-4.3.3/baf}/test/examples/weather_agent.py +4 -4
- {besser_agentic_framework-4.3.1/besser/agent → besser_agentic_framework-4.3.3/baf}/test/examples/web_crawl_agent.py +5 -5
- besser_agentic_framework-4.3.3/baf/utils/__init__.py +0 -0
- {besser_agentic_framework-4.3.1/besser/agent → besser_agentic_framework-4.3.3/baf}/utils/web_crawl.py +1 -1
- {besser_agentic_framework-4.3.1 → besser_agentic_framework-4.3.3/besser_agentic_framework.egg-info}/PKG-INFO +31 -23
- besser_agentic_framework-4.3.3/besser_agentic_framework.egg-info/SOURCES.txt +198 -0
- {besser_agentic_framework-4.3.1 → besser_agentic_framework-4.3.3}/besser_agentic_framework.egg-info/requires.txt +33 -13
- besser_agentic_framework-4.3.3/besser_agentic_framework.egg-info/top_level.txt +1 -0
- {besser_agentic_framework-4.3.1 → besser_agentic_framework-4.3.3}/requirements/requirements-core.txt +4 -2
- {besser_agentic_framework-4.3.1 → besser_agentic_framework-4.3.3}/requirements/requirements-extras.txt +7 -4
- besser_agentic_framework-4.3.3/requirements/requirements-tensorflow.txt +2 -0
- besser_agentic_framework-4.3.3/requirements/requirements-torch.txt +3 -0
- {besser_agentic_framework-4.3.1 → besser_agentic_framework-4.3.3}/setup.cfg +1 -1
- {besser_agentic_framework-4.3.1 → besser_agentic_framework-4.3.3}/setup.py +10 -2
- besser_agentic_framework-4.3.1/besser/agent/core/message.py +0 -52
- besser_agentic_framework-4.3.1/besser_agentic_framework.egg-info/SOURCES.txt +0 -174
- besser_agentic_framework-4.3.1/besser_agentic_framework.egg-info/top_level.txt +0 -1
- besser_agentic_framework-4.3.1/requirements/requirements-tensorflow.txt +0 -2
- besser_agentic_framework-4.3.1/requirements/requirements-torch.txt +0 -2
- {besser_agentic_framework-4.3.1 → besser_agentic_framework-4.3.3}/LICENSE +0 -0
- {besser_agentic_framework-4.3.1 → besser_agentic_framework-4.3.3}/MANIFEST.in +0 -0
- {besser_agentic_framework-4.3.1/besser → besser_agentic_framework-4.3.3/baf/core}/__init__.py +0 -0
- {besser_agentic_framework-4.3.1/besser/agent/core → besser_agentic_framework-4.3.3/baf/core/entity}/__init__.py +0 -0
- {besser_agentic_framework-4.3.1/besser/agent → besser_agentic_framework-4.3.3/baf}/core/entity/entity_entry.py +0 -0
- {besser_agentic_framework-4.3.1/besser/agent → besser_agentic_framework-4.3.3/baf}/core/file.py +0 -0
- {besser_agentic_framework-4.3.1/besser/agent/core/entity → besser_agentic_framework-4.3.3/baf/core/intent}/__init__.py +0 -0
- {besser_agentic_framework-4.3.1/besser/agent/core/intent → besser_agentic_framework-4.3.3/baf/core/processors}/__init__.py +0 -0
- {besser_agentic_framework-4.3.1/besser/agent → besser_agentic_framework-4.3.3/baf}/core/property.py +0 -0
- {besser_agentic_framework-4.3.1/besser/agent/core/processors → besser_agentic_framework-4.3.3/baf/core/transition}/__init__.py +0 -0
- {besser_agentic_framework-4.3.1/besser/agent → besser_agentic_framework-4.3.3/baf}/core/transition/event.py +0 -0
- {besser_agentic_framework-4.3.1/besser/agent/core/transition → besser_agentic_framework-4.3.3/baf/db/monitoring_ui}/__init__.py +0 -0
- {besser_agentic_framework-4.3.1/besser/agent → besser_agentic_framework-4.3.3/baf}/db/monitoring_ui/sidebar.py +0 -0
- {besser_agentic_framework-4.3.1/besser/agent → besser_agentic_framework-4.3.3/baf}/db/monitoring_ui/utils.py +0 -0
- {besser_agentic_framework-4.3.1/besser/agent/db/monitoring_ui → besser_agentic_framework-4.3.3/baf/exceptions}/__init__.py +0 -0
- {besser_agentic_framework-4.3.1/besser/agent → besser_agentic_framework-4.3.3/baf}/exceptions/exceptions.py +0 -0
- {besser_agentic_framework-4.3.1/besser/agent → besser_agentic_framework-4.3.3/baf}/exceptions/logger.py +0 -0
- {besser_agentic_framework-4.3.1/besser/agent/exceptions → besser_agentic_framework-4.3.3/baf/library}/__init__.py +0 -0
- {besser_agentic_framework-4.3.1/besser/agent/library → besser_agentic_framework-4.3.3/baf/library/coroutine}/__init__.py +0 -0
- {besser_agentic_framework-4.3.1/besser/agent → besser_agentic_framework-4.3.3/baf}/library/coroutine/async_helpers.py +0 -0
- {besser_agentic_framework-4.3.1/besser/agent/library/coroutine → besser_agentic_framework-4.3.3/baf/library/entity}/__init__.py +0 -0
- {besser_agentic_framework-4.3.1/besser/agent/library/entity → besser_agentic_framework-4.3.3/baf/library/intent}/__init__.py +0 -0
- {besser_agentic_framework-4.3.1/besser/agent/library/intent → besser_agentic_framework-4.3.3/baf/library/state}/__init__.py +0 -0
- {besser_agentic_framework-4.3.1/besser/agent/library/state → besser_agentic_framework-4.3.3/baf/library/transition}/__init__.py +0 -0
- {besser_agentic_framework-4.3.1/besser/agent/library/transition → besser_agentic_framework-4.3.3/baf/library/transition/events}/__init__.py +0 -0
- {besser_agentic_framework-4.3.1/besser/agent/library/transition/events → besser_agentic_framework-4.3.3/baf/nlp/intent_classifier}/__init__.py +0 -0
- {besser_agentic_framework-4.3.1/besser/agent/nlp/intent_classifier → besser_agentic_framework-4.3.3/baf/nlp/llm}/__init__.py +0 -0
- {besser_agentic_framework-4.3.1/besser/agent/nlp/llm → besser_agentic_framework-4.3.3/baf/nlp/ner}/__init__.py +0 -0
- {besser_agentic_framework-4.3.1/besser/agent/nlp/ner → besser_agentic_framework-4.3.3/baf/nlp/ner/base}/__init__.py +0 -0
- {besser_agentic_framework-4.3.1/besser/agent → besser_agentic_framework-4.3.3/baf}/nlp/ner/matched_parameter.py +0 -0
- {besser_agentic_framework-4.3.1/besser/agent/nlp/ner/base → besser_agentic_framework-4.3.3/baf/nlp/preprocessing}/__init__.py +0 -0
- {besser_agentic_framework-4.3.1/besser/agent/nlp/preprocessing → besser_agentic_framework-4.3.3/baf/nlp/rag}/__init__.py +0 -0
- {besser_agentic_framework-4.3.1/besser/agent/nlp/rag → besser_agentic_framework-4.3.3/baf/nlp/speech2text}/__init__.py +0 -0
- {besser_agentic_framework-4.3.1/besser/agent/nlp/speech2text → besser_agentic_framework-4.3.3/baf/nlp/text2speech}/__init__.py +0 -0
- {besser_agentic_framework-4.3.1/besser/agent → besser_agentic_framework-4.3.3/baf}/nlp/utils.py +0 -0
- {besser_agentic_framework-4.3.1/besser/agent/nlp/text2speech → besser_agentic_framework-4.3.3/baf/platforms}/__init__.py +0 -0
- {besser_agentic_framework-4.3.1/besser/agent → besser_agentic_framework-4.3.3/baf}/platforms/a2a/agent_card.py +0 -0
- {besser_agentic_framework-4.3.1/besser/agent → besser_agentic_framework-4.3.3/baf}/platforms/a2a/client.py +0 -0
- {besser_agentic_framework-4.3.1/besser/agent → besser_agentic_framework-4.3.3/baf}/platforms/a2a/error_handler.py +0 -0
- {besser_agentic_framework-4.3.1/besser/agent → besser_agentic_framework-4.3.3/baf}/platforms/github/github_objects.py +0 -0
- {besser_agentic_framework-4.3.1/besser/agent → besser_agentic_framework-4.3.3/baf}/platforms/gitlab/gitlab_objects.py +0 -0
- {besser_agentic_framework-4.3.1/besser/agent → besser_agentic_framework-4.3.3/baf}/platforms/websocket/streamlit_ui/audio_queue.py +0 -0
- {besser_agentic_framework-4.3.1/besser/agent → besser_agentic_framework-4.3.3/baf}/platforms/websocket/streamlit_ui/profile_selector.py +0 -0
- {besser_agentic_framework-4.3.1/besser/agent → besser_agentic_framework-4.3.3/baf}/platforms/websocket/streamlit_ui/user_db.py +0 -0
- {besser_agentic_framework-4.3.1/besser/agent → besser_agentic_framework-4.3.3/baf}/platforms/websocket/streamlit_ui/vars.py +0 -0
- {besser_agentic_framework-4.3.1/besser/agent/platforms → besser_agentic_framework-4.3.3/baf/test}/__init__.py +0 -0
- {besser_agentic_framework-4.3.1/besser/agent/test → besser_agentic_framework-4.3.3/baf/test/components}/__init__.py +0 -0
- {besser_agentic_framework-4.3.1/besser/agent/test/examples → besser_agentic_framework-4.3.3/baf/test/dependencies}/__init__.py +0 -0
- {besser_agentic_framework-4.3.1/besser/agent/test/examples/multiagent → besser_agentic_framework-4.3.3/baf/test/examples}/__init__.py +0 -0
- {besser_agentic_framework-4.3.1/besser/agent/utils → besser_agentic_framework-4.3.3/baf/test/examples/multiagent}/__init__.py +0 -0
- {besser_agentic_framework-4.3.1 → besser_agentic_framework-4.3.3}/besser_agentic_framework.egg-info/dependency_links.txt +0 -0
- {besser_agentic_framework-4.3.1 → besser_agentic_framework-4.3.3}/pyproject.toml +0 -0
- {besser_agentic_framework-4.3.1 → besser_agentic_framework-4.3.3}/requirements/requirements-docs.txt +0 -0
- {besser_agentic_framework-4.3.1 → besser_agentic_framework-4.3.3}/requirements/requirements-llms.txt +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: besser-agentic-framework
|
|
3
|
-
Version: 4.3.
|
|
3
|
+
Version: 4.3.3
|
|
4
4
|
Summary: BESSER Agentic Framework (BAF)
|
|
5
5
|
Author: Luxembourg Institute of Science and Technology
|
|
6
6
|
License: MIT
|
|
@@ -18,7 +18,8 @@ Requires-Dist: dateparser==1.1.8
|
|
|
18
18
|
Requires-Dist: langdetect==1.0.9
|
|
19
19
|
Requires-Dist: markdownify==1.2.2
|
|
20
20
|
Requires-Dist: nltk==3.9.1
|
|
21
|
-
Requires-Dist: numpy==1.26.4
|
|
21
|
+
Requires-Dist: numpy==1.26.4; python_version < "3.13"
|
|
22
|
+
Requires-Dist: numpy<3,>=2.1; python_version >= "3.13"
|
|
22
23
|
Requires-Dist: pandas==2.3.3
|
|
23
24
|
Requires-Dist: python-telegram-bot==21.0
|
|
24
25
|
Requires-Dist: psycopg2-binary>=2.9.10
|
|
@@ -27,7 +28,8 @@ Requires-Dist: pyvis==0.3.2
|
|
|
27
28
|
Requires-Dist: PyYAML==6.0.2
|
|
28
29
|
Requires-Dist: requests==2.31.0
|
|
29
30
|
Requires-Dist: snowballstemmer==2.2.0
|
|
30
|
-
Requires-Dist: sqlalchemy==2.0.29
|
|
31
|
+
Requires-Dist: sqlalchemy==2.0.29; python_version < "3.13"
|
|
32
|
+
Requires-Dist: sqlalchemy<2.1,>=2.0.31; python_version >= "3.13"
|
|
31
33
|
Requires-Dist: streamlit==1.40.0
|
|
32
34
|
Requires-Dist: streamlit-antd-components==0.3.2
|
|
33
35
|
Requires-Dist: text2num==2.5.0
|
|
@@ -35,16 +37,19 @@ Requires-Dist: websocket-client==1.6.4
|
|
|
35
37
|
Requires-Dist: websockets==11.0.3
|
|
36
38
|
Requires-Dist: bcrypt==4.0.1
|
|
37
39
|
Provides-Extra: extras
|
|
38
|
-
Requires-Dist: spacy==3.7
|
|
40
|
+
Requires-Dist: spacy==3.8.7; extra == "extras"
|
|
39
41
|
Requires-Dist: scikit-learn>=1.7.0; extra == "extras"
|
|
40
42
|
Requires-Dist: librosa==0.10.1; extra == "extras"
|
|
41
43
|
Requires-Dist: SpeechRecognition==3.10.0; extra == "extras"
|
|
42
44
|
Requires-Dist: soundfile==0.13.1; extra == "extras"
|
|
43
45
|
Requires-Dist: opencv-python==4.10.0.84; extra == "extras"
|
|
44
46
|
Requires-Dist: plotly==5.18.0; extra == "extras"
|
|
45
|
-
Requires-Dist: chromadb==0.5.4; extra == "extras"
|
|
46
|
-
Requires-Dist:
|
|
47
|
-
Requires-Dist: langchain
|
|
47
|
+
Requires-Dist: chromadb==0.5.4; python_version < "3.13" and extra == "extras"
|
|
48
|
+
Requires-Dist: chromadb==1.0.0; python_version >= "3.13" and extra == "extras"
|
|
49
|
+
Requires-Dist: langchain==0.2.9; python_version < "3.13" and extra == "extras"
|
|
50
|
+
Requires-Dist: langchain-community==0.2.7; python_version < "3.13" and extra == "extras"
|
|
51
|
+
Requires-Dist: langchain==0.3.10; python_version >= "3.13" and extra == "extras"
|
|
52
|
+
Requires-Dist: langchain-community==0.3.10; python_version >= "3.13" and extra == "extras"
|
|
48
53
|
Requires-Dist: pypdf==4.3.1; extra == "extras"
|
|
49
54
|
Requires-Dist: tiktoken==0.9.0; extra == "extras"
|
|
50
55
|
Provides-Extra: llms
|
|
@@ -53,9 +58,9 @@ Requires-Dist: replicate==0.23.1; extra == "llms"
|
|
|
53
58
|
Requires-Dist: transformers==4.53.0; extra == "llms"
|
|
54
59
|
Provides-Extra: tensorflow
|
|
55
60
|
Requires-Dist: keras==3.12.0; extra == "tensorflow"
|
|
56
|
-
Requires-Dist: tensorflow==2.20.0; extra == "tensorflow"
|
|
61
|
+
Requires-Dist: tensorflow-cpu==2.20.0; extra == "tensorflow"
|
|
57
62
|
Provides-Extra: torch
|
|
58
|
-
Requires-Dist: torch==2.
|
|
63
|
+
Requires-Dist: torch==2.6.0+cpu; extra == "torch"
|
|
59
64
|
Requires-Dist: scikit-learn>=1.7.0; extra == "torch"
|
|
60
65
|
Provides-Extra: docs
|
|
61
66
|
Requires-Dist: sphinx==7.2.3; extra == "docs"
|
|
@@ -64,24 +69,27 @@ Requires-Dist: sphinx-paramlinks==0.6.0; extra == "docs"
|
|
|
64
69
|
Requires-Dist: furo==2023.8.19; extra == "docs"
|
|
65
70
|
Requires-Dist: m2r2==0.3.3; extra == "docs"
|
|
66
71
|
Provides-Extra: all
|
|
67
|
-
Requires-Dist: spacy==3.7
|
|
72
|
+
Requires-Dist: spacy==3.8.7; extra == "all"
|
|
68
73
|
Requires-Dist: scikit-learn>=1.7.0; extra == "all"
|
|
69
74
|
Requires-Dist: librosa==0.10.1; extra == "all"
|
|
70
75
|
Requires-Dist: SpeechRecognition==3.10.0; extra == "all"
|
|
71
76
|
Requires-Dist: soundfile==0.13.1; extra == "all"
|
|
72
77
|
Requires-Dist: opencv-python==4.10.0.84; extra == "all"
|
|
73
78
|
Requires-Dist: plotly==5.18.0; extra == "all"
|
|
74
|
-
Requires-Dist: chromadb==0.5.4; extra == "all"
|
|
75
|
-
Requires-Dist:
|
|
76
|
-
Requires-Dist: langchain
|
|
79
|
+
Requires-Dist: chromadb==0.5.4; python_version < "3.13" and extra == "all"
|
|
80
|
+
Requires-Dist: chromadb==1.0.0; python_version >= "3.13" and extra == "all"
|
|
81
|
+
Requires-Dist: langchain==0.2.9; python_version < "3.13" and extra == "all"
|
|
82
|
+
Requires-Dist: langchain-community==0.2.7; python_version < "3.13" and extra == "all"
|
|
83
|
+
Requires-Dist: langchain==0.3.10; python_version >= "3.13" and extra == "all"
|
|
84
|
+
Requires-Dist: langchain-community==0.3.10; python_version >= "3.13" and extra == "all"
|
|
77
85
|
Requires-Dist: pypdf==4.3.1; extra == "all"
|
|
78
86
|
Requires-Dist: tiktoken==0.9.0; extra == "all"
|
|
79
87
|
Requires-Dist: openai==1.93.0; extra == "all"
|
|
80
88
|
Requires-Dist: replicate==0.23.1; extra == "all"
|
|
81
89
|
Requires-Dist: transformers==4.53.0; extra == "all"
|
|
82
90
|
Requires-Dist: keras==3.12.0; extra == "all"
|
|
83
|
-
Requires-Dist: tensorflow==2.20.0; extra == "all"
|
|
84
|
-
Requires-Dist: torch==2.
|
|
91
|
+
Requires-Dist: tensorflow-cpu==2.20.0; extra == "all"
|
|
92
|
+
Requires-Dist: torch==2.6.0+cpu; extra == "all"
|
|
85
93
|
Requires-Dist: scikit-learn>=1.7.0; extra == "all"
|
|
86
94
|
Dynamic: license-file
|
|
87
95
|
Dynamic: provides-extra
|
|
@@ -152,13 +160,13 @@ Note that if you want to set your agent's language to **Luxembourgish**, you wil
|
|
|
152
160
|
|
|
153
161
|
### Example agents
|
|
154
162
|
|
|
155
|
-
- [greetings_agent](https://github.com/BESSER-PEARL/BESSER-Agentic-Framework/blob/main/
|
|
156
|
-
- [weather_agent](https://github.com/BESSER-PEARL/BESSER-Agentic-Framework/blob/main/
|
|
157
|
-
- [llm_agent](https://github.com/BESSER-PEARL/BESSER-Agentic-Framework/blob/main/
|
|
158
|
-
- [rag_agent](https://github.com/BESSER-PEARL/BESSER-Agentic-Framework/blob/main/
|
|
159
|
-
- [telegram_agent](https://github.com/BESSER-PEARL/BESSER-Agentic-Framework/blob/main/
|
|
160
|
-
- [github_agent](https://github.com/BESSER-PEARL/BESSER-Agentic-Framework/blob/main/
|
|
161
|
-
- [gitlab_agent](https://github.com/BESSER-PEARL/BESSER-Agentic-Framework/blob/main/
|
|
162
|
-
- [a2a_multiagent](https://github.com/BESSER-PEARL/BESSER-Agentic-Framework/blob/main/
|
|
163
|
+
- [greetings_agent](https://github.com/BESSER-PEARL/BESSER-Agentic-Framework/blob/main/baf/test/examples/greetings_agent.py): Very simple agent for the first contact with the framework
|
|
164
|
+
- [weather_agent](https://github.com/BESSER-PEARL/BESSER-Agentic-Framework/blob/main/baf/test/examples/weather_agent.py): Introducing [entities](https://besser-agentic-framework.readthedocs.io/latest/wiki/core/entities.html)
|
|
165
|
+
- [llm_agent](https://github.com/BESSER-PEARL/BESSER-Agentic-Framework/blob/main/baf/test/examples/llm_agent.py): Introducing [Large Language Models (LLMs)](https://besser-agentic-framework.readthedocs.io/latest/wiki/nlp/llm.html)
|
|
166
|
+
- [rag_agent](https://github.com/BESSER-PEARL/BESSER-Agentic-Framework/blob/main/baf/test/examples/rag_agent.py): Introducing [Retrieval Augmented Generation (RAG)](https://besser-agentic-framework.readthedocs.io/latest/wiki/nlp/rag.html)
|
|
167
|
+
- [telegram_agent](https://github.com/BESSER-PEARL/BESSER-Agentic-Framework/blob/main/baf/test/examples/telegram_agent.py): Introducing the [TelegramPlatform](https://besser-agentic-framework.readthedocs.io/latest/wiki/platforms/telegram_platform.html)
|
|
168
|
+
- [github_agent](https://github.com/BESSER-PEARL/BESSER-Agentic-Framework/blob/main/baf/test/examples/github_agent.py): Introducing [GitHubPlatform](https://besser-agentic-framework.readthedocs.io/latest/wiki/platforms/github_platform.html)
|
|
169
|
+
- [gitlab_agent](https://github.com/BESSER-PEARL/BESSER-Agentic-Framework/blob/main/baf/test/examples/gitlab_agent.py): Introducing the [GitLabPlatform](https://besser-agentic-framework.readthedocs.io/latest/wiki/platforms/gitlab_platform.html)
|
|
170
|
+
- [a2a_multiagent](https://github.com/BESSER-PEARL/BESSER-Agentic-Framework/blob/main/baf/test/examples/a2a_multiagent.py): Introducing the [A2APlatform](https://besser-agentic-framework.readthedocs.io/latest/wiki/platforms/a2a_platform.html)
|
|
163
171
|
|
|
164
172
|
For more example agents, check out the [BAF-agent-examples](https://github.com/BESSER-PEARL/BAF-agent-examples) repository!
|
|
@@ -63,13 +63,13 @@ Note that if you want to set your agent's language to **Luxembourgish**, you wil
|
|
|
63
63
|
|
|
64
64
|
### Example agents
|
|
65
65
|
|
|
66
|
-
- [greetings_agent](https://github.com/BESSER-PEARL/BESSER-Agentic-Framework/blob/main/
|
|
67
|
-
- [weather_agent](https://github.com/BESSER-PEARL/BESSER-Agentic-Framework/blob/main/
|
|
68
|
-
- [llm_agent](https://github.com/BESSER-PEARL/BESSER-Agentic-Framework/blob/main/
|
|
69
|
-
- [rag_agent](https://github.com/BESSER-PEARL/BESSER-Agentic-Framework/blob/main/
|
|
70
|
-
- [telegram_agent](https://github.com/BESSER-PEARL/BESSER-Agentic-Framework/blob/main/
|
|
71
|
-
- [github_agent](https://github.com/BESSER-PEARL/BESSER-Agentic-Framework/blob/main/
|
|
72
|
-
- [gitlab_agent](https://github.com/BESSER-PEARL/BESSER-Agentic-Framework/blob/main/
|
|
73
|
-
- [a2a_multiagent](https://github.com/BESSER-PEARL/BESSER-Agentic-Framework/blob/main/
|
|
66
|
+
- [greetings_agent](https://github.com/BESSER-PEARL/BESSER-Agentic-Framework/blob/main/baf/test/examples/greetings_agent.py): Very simple agent for the first contact with the framework
|
|
67
|
+
- [weather_agent](https://github.com/BESSER-PEARL/BESSER-Agentic-Framework/blob/main/baf/test/examples/weather_agent.py): Introducing [entities](https://besser-agentic-framework.readthedocs.io/latest/wiki/core/entities.html)
|
|
68
|
+
- [llm_agent](https://github.com/BESSER-PEARL/BESSER-Agentic-Framework/blob/main/baf/test/examples/llm_agent.py): Introducing [Large Language Models (LLMs)](https://besser-agentic-framework.readthedocs.io/latest/wiki/nlp/llm.html)
|
|
69
|
+
- [rag_agent](https://github.com/BESSER-PEARL/BESSER-Agentic-Framework/blob/main/baf/test/examples/rag_agent.py): Introducing [Retrieval Augmented Generation (RAG)](https://besser-agentic-framework.readthedocs.io/latest/wiki/nlp/rag.html)
|
|
70
|
+
- [telegram_agent](https://github.com/BESSER-PEARL/BESSER-Agentic-Framework/blob/main/baf/test/examples/telegram_agent.py): Introducing the [TelegramPlatform](https://besser-agentic-framework.readthedocs.io/latest/wiki/platforms/telegram_platform.html)
|
|
71
|
+
- [github_agent](https://github.com/BESSER-PEARL/BESSER-Agentic-Framework/blob/main/baf/test/examples/github_agent.py): Introducing [GitHubPlatform](https://besser-agentic-framework.readthedocs.io/latest/wiki/platforms/github_platform.html)
|
|
72
|
+
- [gitlab_agent](https://github.com/BESSER-PEARL/BESSER-Agentic-Framework/blob/main/baf/test/examples/gitlab_agent.py): Introducing the [GitLabPlatform](https://besser-agentic-framework.readthedocs.io/latest/wiki/platforms/gitlab_platform.html)
|
|
73
|
+
- [a2a_multiagent](https://github.com/BESSER-PEARL/BESSER-Agentic-Framework/blob/main/baf/test/examples/a2a_multiagent.py): Introducing the [A2APlatform](https://besser-agentic-framework.readthedocs.io/latest/wiki/platforms/a2a_platform.html)
|
|
74
74
|
|
|
75
75
|
For more example agents, check out the [BAF-agent-examples](https://github.com/BESSER-PEARL/BAF-agent-examples) repository!
|
{besser_agentic_framework-4.3.1/besser/agent → besser_agentic_framework-4.3.3/baf}/core/agent.py
RENAMED
|
@@ -8,33 +8,33 @@ from typing import Any, Callable, get_type_hints
|
|
|
8
8
|
|
|
9
9
|
import yaml
|
|
10
10
|
|
|
11
|
-
from
|
|
12
|
-
from
|
|
13
|
-
from
|
|
14
|
-
from
|
|
15
|
-
from
|
|
16
|
-
from
|
|
17
|
-
from
|
|
18
|
-
from
|
|
19
|
-
from
|
|
20
|
-
from
|
|
21
|
-
from
|
|
22
|
-
from
|
|
23
|
-
from
|
|
24
|
-
from
|
|
11
|
+
from baf.core.transition.event import Event
|
|
12
|
+
from baf.core.message import Message, MessageType
|
|
13
|
+
from baf.core.entity.entity import Entity
|
|
14
|
+
from baf.core.intent.intent import Intent
|
|
15
|
+
from baf.core.intent.intent_parameter import IntentParameter
|
|
16
|
+
from baf.core.property import Property
|
|
17
|
+
from baf.core.processors.processor import Processor
|
|
18
|
+
from baf.core.session import Session
|
|
19
|
+
from baf.core.state import State
|
|
20
|
+
from baf.core.transition.transition import Transition
|
|
21
|
+
from baf.db import DB_MONITORING
|
|
22
|
+
from baf.db.db_handler import DBHandler
|
|
23
|
+
from baf.db.monitoring_db import MonitoringDB
|
|
24
|
+
from baf.exceptions.exceptions import AgentNotTrainedError, DuplicatedEntityError, DuplicatedInitialStateError, \
|
|
25
25
|
DuplicatedIntentError, DuplicatedStateError, InitialStateNotFound
|
|
26
|
-
from
|
|
27
|
-
from
|
|
28
|
-
from
|
|
26
|
+
from baf.exceptions.logger import logger
|
|
27
|
+
from baf.library.transition.events.base_events import ReceiveMessageEvent, ReceiveJSONEvent, ReceiveFileEvent
|
|
28
|
+
from baf.nlp.intent_classifier.intent_classifier_configuration import IntentClassifierConfiguration, \
|
|
29
29
|
SimpleIntentClassifierConfiguration
|
|
30
|
-
from
|
|
31
|
-
from
|
|
32
|
-
from
|
|
33
|
-
from
|
|
34
|
-
from
|
|
35
|
-
from
|
|
36
|
-
from
|
|
37
|
-
from
|
|
30
|
+
from baf.nlp.intent_classifier.intent_classifier_prediction import IntentClassifierPrediction
|
|
31
|
+
from baf.nlp.nlp_engine import NLPEngine
|
|
32
|
+
from baf.platforms.platform import Platform
|
|
33
|
+
from baf.platforms.telegram.telegram_platform import TelegramPlatform
|
|
34
|
+
from baf.platforms.websocket.websocket_platform import WebSocketPlatform
|
|
35
|
+
from baf.platforms.github.github_platform import GitHubPlatform
|
|
36
|
+
from baf.platforms.gitlab.gitlab_platform import GitLabPlatform
|
|
37
|
+
from baf.platforms.a2a.a2a_platform import A2APlatform
|
|
38
38
|
|
|
39
39
|
|
|
40
40
|
class Agent:
|
|
@@ -123,7 +123,7 @@ class Agent:
|
|
|
123
123
|
|
|
124
124
|
Example YAML properties file, ``config.yaml``:
|
|
125
125
|
|
|
126
|
-
.. literalinclude:: ../../../../
|
|
126
|
+
.. literalinclude:: ../../../../baf/agent/test/examples/config.yaml
|
|
127
127
|
|
|
128
128
|
Args:
|
|
129
129
|
path (str): the path to the properties file
|
|
@@ -146,6 +146,8 @@ class Agent:
|
|
|
146
146
|
return
|
|
147
147
|
|
|
148
148
|
if isinstance(data, list):
|
|
149
|
+
if prefix:
|
|
150
|
+
self._config[prefix] = data
|
|
149
151
|
for index, item in enumerate(data):
|
|
150
152
|
if isinstance(item, dict) and len(item) == 1:
|
|
151
153
|
item_key, item_value = next(iter(item.items()))
|
|
@@ -532,6 +534,9 @@ class Agent:
|
|
|
532
534
|
else:
|
|
533
535
|
t = MessageType.STR
|
|
534
536
|
session.save_message(Message(t=t, content=event.message, is_user=True, timestamp=datetime.now()))
|
|
537
|
+
if isinstance(event, ReceiveFileEvent):
|
|
538
|
+
session.save_message(Message(t=MessageType.FILE, content=event.file.get_json_string(), is_user=True, timestamp=datetime.now()))
|
|
539
|
+
|
|
535
540
|
logger.info(f'Received event: {event.log()}')
|
|
536
541
|
|
|
537
542
|
def process(self, session: Session, message: Any, is_user_message: bool) -> Any:
|
|
@@ -564,7 +569,7 @@ class Agent:
|
|
|
564
569
|
same fallback body to all agent states.
|
|
565
570
|
|
|
566
571
|
See also:
|
|
567
|
-
:func:`~
|
|
572
|
+
:func:`~baf.core.state.State.set_fallback_body`
|
|
568
573
|
|
|
569
574
|
Args:
|
|
570
575
|
body (Callable[[Session], None]): the fallback body
|
|
@@ -600,12 +605,14 @@ class Agent:
|
|
|
600
605
|
else:
|
|
601
606
|
return None
|
|
602
607
|
|
|
603
|
-
def _new_session(self, session_id: str, platform: Platform) -> Session:
|
|
608
|
+
def _new_session(self, session_id: str, platform: Platform, username: str or None = None, session_name: str or None = None) -> Session:
|
|
604
609
|
"""Create a new session for the agent.
|
|
605
610
|
|
|
606
611
|
Args:
|
|
607
612
|
session_id (str): the session id
|
|
608
613
|
platform (Platform): the platform where the session is to be created and used
|
|
614
|
+
username (str): the name of the session user (optional)
|
|
615
|
+
session_name (str): the name of the session (optional)
|
|
609
616
|
|
|
610
617
|
Returns:
|
|
611
618
|
Session: the session
|
|
@@ -614,7 +621,7 @@ class Agent:
|
|
|
614
621
|
raise ValueError(f'Trying to create a new session with an existing id" {session_id}')
|
|
615
622
|
if platform not in self._platforms:
|
|
616
623
|
raise ValueError(f"Platform {platform.__class__.__name__} not found in agent '{self.name}'")
|
|
617
|
-
session = Session(session_id, self, platform)
|
|
624
|
+
session = Session(session_id, self, platform, username, session_name)
|
|
618
625
|
self._sessions[session_id] = session
|
|
619
626
|
if self._persist_sessions and self._monitoring_db_session_exists(session_id, platform):
|
|
620
627
|
dest_state = self._monitoring_db_get_last_state_of_session(session_id, platform)
|
|
@@ -633,10 +640,10 @@ class Agent:
|
|
|
633
640
|
session._run_event_thread()
|
|
634
641
|
return session
|
|
635
642
|
|
|
636
|
-
def get_or_create_session(self, session_id: str, platform: Platform) -> Session:
|
|
643
|
+
def get_or_create_session(self, session_id: str, platform: Platform, username: str or None = None, session_name: str or None = None) -> Session:
|
|
637
644
|
session = self._get_session(session_id)
|
|
638
645
|
if session is None:
|
|
639
|
-
session = self._new_session(session_id, platform)
|
|
646
|
+
session = self._new_session(session_id, platform, username, session_name)
|
|
640
647
|
return session
|
|
641
648
|
|
|
642
649
|
def close_session(self, session_id: str) -> None:
|
|
@@ -669,7 +676,7 @@ class Agent:
|
|
|
669
676
|
use_ui: bool = True,
|
|
670
677
|
authenticate_users: bool = False,
|
|
671
678
|
) -> WebSocketPlatform:
|
|
672
|
-
"""Use the :class:`~
|
|
679
|
+
"""Use the :class:`~baf.platforms.websocket.websocket_platform.WebSocketPlatform` on this agent.
|
|
673
680
|
|
|
674
681
|
Args:
|
|
675
682
|
use_ui (bool): if true, the default UI will be run to use this platform
|
|
@@ -687,7 +694,7 @@ class Agent:
|
|
|
687
694
|
return websocket_platform
|
|
688
695
|
|
|
689
696
|
def use_telegram_platform(self) -> TelegramPlatform:
|
|
690
|
-
"""Use the :class:`~
|
|
697
|
+
"""Use the :class:`~baf.platforms.telegram.telegram_platform.TelegramPlatform` on this agent.
|
|
691
698
|
|
|
692
699
|
Returns:
|
|
693
700
|
TelegramPlatform: the telegram platform
|
|
@@ -697,7 +704,7 @@ class Agent:
|
|
|
697
704
|
return telegram_platform
|
|
698
705
|
|
|
699
706
|
def use_github_platform(self) -> GitHubPlatform:
|
|
700
|
-
"""Use the :class:`~
|
|
707
|
+
"""Use the :class:`~baf.platforms.github.github_platform.GitHubPlatform` on this agent.
|
|
701
708
|
|
|
702
709
|
Returns:
|
|
703
710
|
GitHubPlatform: the GitHub platform
|
|
@@ -707,7 +714,7 @@ class Agent:
|
|
|
707
714
|
return github_platform
|
|
708
715
|
|
|
709
716
|
def use_gitlab_platform(self) -> GitLabPlatform:
|
|
710
|
-
"""Use the :class:`~
|
|
717
|
+
"""Use the :class:`~baf.platforms.gitlab.gitlab_platform.GitLabPlatform` on this agent.
|
|
711
718
|
|
|
712
719
|
Returns:
|
|
713
720
|
GitLabPlatform: the GitLab platform
|
|
@@ -717,7 +724,7 @@ class Agent:
|
|
|
717
724
|
return gitlab_platform
|
|
718
725
|
|
|
719
726
|
def use_a2a_platform(self) -> A2APlatform:
|
|
720
|
-
"""Use the :class: `~
|
|
727
|
+
"""Use the :class: `~baf.platforms.a2a.a2a_platform.A2APlatform` on this agent.
|
|
721
728
|
|
|
722
729
|
Returns:
|
|
723
730
|
A2APlatform: the A2A platform
|
|
@@ -727,7 +734,7 @@ class Agent:
|
|
|
727
734
|
return a2a_platform
|
|
728
735
|
|
|
729
736
|
def use_db_handler(self) -> DBHandler:
|
|
730
|
-
"""Use the :class:`~
|
|
737
|
+
"""Use the :class:`~baf.db.db_handler.DBHandler` on this agent.
|
|
731
738
|
|
|
732
739
|
DB connections are established lazily, when the first query is executed.
|
|
733
740
|
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
from typing import TYPE_CHECKING
|
|
2
2
|
|
|
3
|
-
from
|
|
4
|
-
from
|
|
3
|
+
from baf.core.entity.entity_entry import EntityEntry
|
|
4
|
+
from baf.nlp.preprocessing.text_preprocessing import process_text
|
|
5
5
|
|
|
6
6
|
if TYPE_CHECKING:
|
|
7
|
-
from
|
|
7
|
+
from baf.nlp.nlp_engine import NLPEngine
|
|
8
8
|
|
|
9
9
|
|
|
10
10
|
class Entity:
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
from typing import TYPE_CHECKING
|
|
2
2
|
|
|
3
|
-
from
|
|
4
|
-
from
|
|
5
|
-
from
|
|
6
|
-
from
|
|
7
|
-
from
|
|
3
|
+
from baf.core.entity.entity import Entity
|
|
4
|
+
from baf.core.intent.intent_parameter import IntentParameter
|
|
5
|
+
from baf.exceptions.exceptions import DuplicatedIntentParameterError
|
|
6
|
+
from baf.nlp.preprocessing.text_preprocessing import process_text
|
|
7
|
+
from baf.nlp.utils import replace_value_in_sentence
|
|
8
8
|
|
|
9
9
|
if TYPE_CHECKING:
|
|
10
|
-
from
|
|
10
|
+
from baf.nlp.nlp_engine import NLPEngine
|
|
11
11
|
|
|
12
12
|
|
|
13
13
|
class Intent:
|
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
from datetime import datetime
|
|
2
|
+
from enum import Enum
|
|
3
|
+
from typing import Any
|
|
4
|
+
|
|
5
|
+
from baf.platforms.payload import PayloadAction
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
class MessageType(Enum):
|
|
9
|
+
"""Enumeration of the different message types in :class:`Message`."""
|
|
10
|
+
|
|
11
|
+
STR = 'str'
|
|
12
|
+
JSON = 'json'
|
|
13
|
+
MARKDOWN = 'markdown'
|
|
14
|
+
HTML = 'html'
|
|
15
|
+
FILE = 'file'
|
|
16
|
+
IMAGE = 'image'
|
|
17
|
+
DATAFRAME = 'dataframe'
|
|
18
|
+
PLOTLY = 'plotly'
|
|
19
|
+
LOCATION = 'location'
|
|
20
|
+
OPTIONS = 'options'
|
|
21
|
+
AUDIO = 'audio'
|
|
22
|
+
RAG_ANSWER = 'rag_answer'
|
|
23
|
+
UI = 'ui'
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
def get_message_type(value: str):
|
|
27
|
+
for message_type in MessageType:
|
|
28
|
+
if message_type.value == value:
|
|
29
|
+
return message_type
|
|
30
|
+
return None
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
class Message:
|
|
34
|
+
"""
|
|
35
|
+
A conversation message. It is used by the streamlit UI to display the messages properly, depending on the sender
|
|
36
|
+
(i.e., user or agent) and the type (string, audio, file, DataFrame, plot, etc.)
|
|
37
|
+
|
|
38
|
+
Args:
|
|
39
|
+
t (MessageType): The type of the message
|
|
40
|
+
content (Any): The message content
|
|
41
|
+
is_user (bool): Whether the message comes from the user (true) or the agent (false)
|
|
42
|
+
timestamp (datetime): The timestamp of the message (when the message was sent)
|
|
43
|
+
|
|
44
|
+
Attributes:
|
|
45
|
+
type (MessageType): The type of the message
|
|
46
|
+
content (Any): The message content
|
|
47
|
+
is_user (bool): Whether the message comes from the user (true) or the agent (false)
|
|
48
|
+
timestamp (datetime): The timestamp of the message (when the message was sent)
|
|
49
|
+
"""
|
|
50
|
+
|
|
51
|
+
def __init__(self, t: MessageType, content: Any, is_user: bool, timestamp: datetime):
|
|
52
|
+
self.type: MessageType = t
|
|
53
|
+
self.content: Any = content
|
|
54
|
+
self.is_user: bool = is_user
|
|
55
|
+
self.timestamp: datetime = timestamp
|
|
56
|
+
# TODO: Parse content to specific type (in DB, messages are stored a str)
|
|
57
|
+
|
|
58
|
+
def get_action(self):
|
|
59
|
+
if self.is_user:
|
|
60
|
+
match self.type:
|
|
61
|
+
case MessageType.STR:
|
|
62
|
+
return PayloadAction.USER_MESSAGE
|
|
63
|
+
case MessageType.JSON:
|
|
64
|
+
return PayloadAction.USER_MESSAGE # TODO: Not implemented
|
|
65
|
+
case MessageType.MARKDOWN:
|
|
66
|
+
return PayloadAction.USER_MESSAGE # TODO: Not implemented
|
|
67
|
+
case MessageType.HTML:
|
|
68
|
+
return PayloadAction.USER_MESSAGE # TODO: Not implemented
|
|
69
|
+
case MessageType.FILE:
|
|
70
|
+
return PayloadAction.USER_FILE
|
|
71
|
+
case MessageType.IMAGE:
|
|
72
|
+
return PayloadAction.USER_FILE # TODO: Not implemented
|
|
73
|
+
case MessageType.DATAFRAME:
|
|
74
|
+
return PayloadAction.USER_MESSAGE # TODO: Not implemented
|
|
75
|
+
case MessageType.PLOTLY:
|
|
76
|
+
return PayloadAction.USER_MESSAGE # TODO: Not implemented
|
|
77
|
+
case MessageType.LOCATION:
|
|
78
|
+
return PayloadAction.USER_MESSAGE # TODO: Not implemented
|
|
79
|
+
case MessageType.OPTIONS:
|
|
80
|
+
return PayloadAction.USER_MESSAGE # TODO: Not implemented
|
|
81
|
+
case MessageType.AUDIO:
|
|
82
|
+
return PayloadAction.USER_VOICE
|
|
83
|
+
case MessageType.RAG_ANSWER:
|
|
84
|
+
return PayloadAction.USER_MESSAGE # TODO: Not implemented
|
|
85
|
+
case MessageType.UI:
|
|
86
|
+
return PayloadAction.USER_MESSAGE # TODO: Not implemented
|
|
87
|
+
else:
|
|
88
|
+
match self.type:
|
|
89
|
+
case MessageType.STR:
|
|
90
|
+
return PayloadAction.AGENT_REPLY_STR
|
|
91
|
+
case MessageType.JSON:
|
|
92
|
+
return PayloadAction.AGENT_REPLY_STR # TODO: Not implemented
|
|
93
|
+
case MessageType.MARKDOWN:
|
|
94
|
+
return PayloadAction.AGENT_REPLY_MARKDOWN
|
|
95
|
+
case MessageType.HTML:
|
|
96
|
+
return PayloadAction.AGENT_REPLY_HTML
|
|
97
|
+
case MessageType.FILE:
|
|
98
|
+
return PayloadAction.AGENT_REPLY_FILE
|
|
99
|
+
case MessageType.IMAGE:
|
|
100
|
+
return PayloadAction.AGENT_REPLY_IMAGE
|
|
101
|
+
case MessageType.DATAFRAME:
|
|
102
|
+
return PayloadAction.AGENT_REPLY_DF
|
|
103
|
+
case MessageType.PLOTLY:
|
|
104
|
+
return PayloadAction.AGENT_REPLY_PLOTLY
|
|
105
|
+
case MessageType.LOCATION:
|
|
106
|
+
return PayloadAction.AGENT_REPLY_LOCATION
|
|
107
|
+
case MessageType.OPTIONS:
|
|
108
|
+
return PayloadAction.AGENT_REPLY_OPTIONS
|
|
109
|
+
case MessageType.AUDIO:
|
|
110
|
+
return PayloadAction.AGENT_REPLY_AUDIO
|
|
111
|
+
case MessageType.RAG_ANSWER:
|
|
112
|
+
return PayloadAction.AGENT_REPLY_RAG
|
|
113
|
+
case MessageType.UI:
|
|
114
|
+
return PayloadAction.AGENT_REPLY_UI
|
|
@@ -5,18 +5,18 @@ import soundfile as sf
|
|
|
5
5
|
import numpy as np
|
|
6
6
|
|
|
7
7
|
|
|
8
|
-
from
|
|
9
|
-
from
|
|
10
|
-
from
|
|
11
|
-
from
|
|
8
|
+
from baf.core.processors.processor import Processor
|
|
9
|
+
from baf.core.session import Session
|
|
10
|
+
from baf.nlp.nlp_engine import NLPEngine
|
|
11
|
+
from baf.nlp.llm.llm import LLM
|
|
12
12
|
|
|
13
|
-
from
|
|
13
|
+
from baf.exceptions.logger import logger
|
|
14
14
|
|
|
15
|
-
from
|
|
15
|
+
from baf.nlp.speech2text.speech2text import Speech2Text
|
|
16
16
|
|
|
17
17
|
|
|
18
18
|
if TYPE_CHECKING:
|
|
19
|
-
from
|
|
19
|
+
from baf.core.agent import Agent
|
|
20
20
|
|
|
21
21
|
|
|
22
22
|
class AudioLanguageDetectionProcessor(Processor):
|
|
@@ -2,11 +2,11 @@ from typing import TYPE_CHECKING
|
|
|
2
2
|
|
|
3
3
|
from langdetect import detect
|
|
4
4
|
|
|
5
|
-
from
|
|
6
|
-
from
|
|
5
|
+
from baf.core.processors.processor import Processor
|
|
6
|
+
from baf.core.session import Session
|
|
7
7
|
|
|
8
8
|
if TYPE_CHECKING:
|
|
9
|
-
from
|
|
9
|
+
from baf.core.agent import Agent
|
|
10
10
|
|
|
11
11
|
|
|
12
12
|
class LanguageDetectionProcessor(Processor):
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
from abc import ABC, abstractmethod
|
|
2
2
|
from typing import Any, TYPE_CHECKING
|
|
3
3
|
|
|
4
|
-
from
|
|
5
|
-
from
|
|
4
|
+
from baf.core.session import Session
|
|
5
|
+
from baf.exceptions.exceptions import ProcessorTargetUndefined
|
|
6
6
|
|
|
7
7
|
if TYPE_CHECKING:
|
|
8
|
-
from
|
|
8
|
+
from baf.core.agent import Agent
|
|
9
9
|
|
|
10
10
|
|
|
11
11
|
class Processor(ABC):
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
from
|
|
2
|
-
from
|
|
3
|
-
from
|
|
4
|
-
from
|
|
5
|
-
from
|
|
1
|
+
from baf.core.processors.processor import Processor
|
|
2
|
+
from baf.nlp.llm.llm import LLM
|
|
3
|
+
from baf.core.agent import Agent
|
|
4
|
+
from baf.core.session import Session
|
|
5
|
+
from baf.nlp.nlp_engine import NLPEngine
|
|
6
6
|
|
|
7
7
|
|
|
8
8
|
class UserAdaptationProcessor(Processor):
|