besser-agentic-framework 4.3.0__tar.gz → 4.3.2__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.0/besser_agentic_framework.egg-info → besser_agentic_framework-4.3.2}/PKG-INFO +9 -9
- {besser_agentic_framework-4.3.0 → besser_agentic_framework-4.3.2}/README.md +8 -8
- {besser_agentic_framework-4.3.0/besser/agent → besser_agentic_framework-4.3.2/baf}/__init__.py +1 -1
- {besser_agentic_framework-4.3.0/besser/agent → besser_agentic_framework-4.3.2/baf}/core/agent.py +35 -33
- {besser_agentic_framework-4.3.0/besser/agent → besser_agentic_framework-4.3.2/baf}/core/entity/entity.py +3 -3
- {besser_agentic_framework-4.3.0/besser/agent → besser_agentic_framework-4.3.2/baf}/core/intent/intent.py +6 -6
- {besser_agentic_framework-4.3.0/besser/agent → besser_agentic_framework-4.3.2/baf}/core/intent/intent_parameter.py +1 -1
- {besser_agentic_framework-4.3.0/besser/agent → besser_agentic_framework-4.3.2/baf}/core/message.py +1 -0
- {besser_agentic_framework-4.3.0/besser/agent → besser_agentic_framework-4.3.2/baf}/core/processors/audio_language_detection_processor.py +7 -7
- {besser_agentic_framework-4.3.0/besser/agent → besser_agentic_framework-4.3.2/baf}/core/processors/language_detection_processor.py +3 -3
- {besser_agentic_framework-4.3.0/besser/agent → besser_agentic_framework-4.3.2/baf}/core/processors/processor.py +3 -3
- {besser_agentic_framework-4.3.0/besser/agent → besser_agentic_framework-4.3.2/baf}/core/processors/user_adaptation_processor.py +5 -5
- {besser_agentic_framework-4.3.0/besser/agent → besser_agentic_framework-4.3.2/baf}/core/session.py +15 -15
- {besser_agentic_framework-4.3.0/besser/agent → besser_agentic_framework-4.3.2/baf}/core/state.py +20 -20
- {besser_agentic_framework-4.3.0/besser/agent → besser_agentic_framework-4.3.2/baf}/core/transition/condition.py +1 -1
- {besser_agentic_framework-4.3.0/besser/agent → besser_agentic_framework-4.3.2/baf}/core/transition/transition.py +5 -5
- {besser_agentic_framework-4.3.0/besser/agent → besser_agentic_framework-4.3.2/baf}/core/transition/transition_builder.py +9 -9
- {besser_agentic_framework-4.3.0/besser/agent → besser_agentic_framework-4.3.2/baf}/db/__init__.py +1 -1
- {besser_agentic_framework-4.3.0/besser/agent → besser_agentic_framework-4.3.2/baf}/db/db_handler.py +23 -7
- {besser_agentic_framework-4.3.0/besser/agent → besser_agentic_framework-4.3.2/baf}/db/monitoring_db.py +13 -13
- {besser_agentic_framework-4.3.0/besser/agent → besser_agentic_framework-4.3.2/baf}/db/monitoring_ui/db_connection.py +4 -4
- {besser_agentic_framework-4.3.0/besser/agent → besser_agentic_framework-4.3.2/baf}/db/monitoring_ui/flow_graph.py +2 -2
- {besser_agentic_framework-4.3.0/besser/agent → besser_agentic_framework-4.3.2/baf}/db/monitoring_ui/home.py +2 -2
- {besser_agentic_framework-4.3.0/besser/agent → besser_agentic_framework-4.3.2/baf}/db/monitoring_ui/intent_details.py +2 -2
- {besser_agentic_framework-4.3.0/besser/agent → besser_agentic_framework-4.3.2/baf}/db/monitoring_ui/monitoring_ui.py +8 -8
- {besser_agentic_framework-4.3.0/besser/agent → besser_agentic_framework-4.3.2/baf}/db/monitoring_ui/table_overview.py +2 -2
- {besser_agentic_framework-4.3.0/besser/agent → besser_agentic_framework-4.3.2/baf}/library/entity/base_entities.py +1 -1
- {besser_agentic_framework-4.3.0/besser/agent → besser_agentic_framework-4.3.2/baf}/library/intent/intent_library.py +1 -1
- {besser_agentic_framework-4.3.0/besser/agent → besser_agentic_framework-4.3.2/baf}/library/state/state_library.py +1 -1
- {besser_agentic_framework-4.3.0/besser/agent → besser_agentic_framework-4.3.2/baf}/library/transition/condition_functions.py +3 -3
- {besser_agentic_framework-4.3.0/besser/agent → besser_agentic_framework-4.3.2/baf}/library/transition/conditions.py +4 -4
- {besser_agentic_framework-4.3.0/besser/agent → besser_agentic_framework-4.3.2/baf}/library/transition/events/base_events.py +6 -6
- {besser_agentic_framework-4.3.0/besser/agent → besser_agentic_framework-4.3.2/baf}/library/transition/events/github_webhooks_events.py +1 -1
- {besser_agentic_framework-4.3.0/besser/agent → besser_agentic_framework-4.3.2/baf}/library/transition/events/gitlab_webhooks_events.py +1 -1
- {besser_agentic_framework-4.3.0/besser/agent → besser_agentic_framework-4.3.2/baf}/nlp/__init__.py +5 -5
- {besser_agentic_framework-4.3.0/besser/agent → besser_agentic_framework-4.3.2/baf}/nlp/intent_classifier/intent_classifier.py +4 -4
- {besser_agentic_framework-4.3.0/besser/agent → besser_agentic_framework-4.3.2/baf}/nlp/intent_classifier/intent_classifier_configuration.py +3 -3
- {besser_agentic_framework-4.3.0/besser/agent → besser_agentic_framework-4.3.2/baf}/nlp/intent_classifier/intent_classifier_prediction.py +3 -3
- {besser_agentic_framework-4.3.0/besser/agent → besser_agentic_framework-4.3.2/baf}/nlp/intent_classifier/llm_intent_classifier.py +8 -8
- {besser_agentic_framework-4.3.0/besser/agent → besser_agentic_framework-4.3.2/baf}/nlp/intent_classifier/simple_intent_classifier_pytorch.py +10 -10
- {besser_agentic_framework-4.3.0/besser/agent → besser_agentic_framework-4.3.2/baf}/nlp/intent_classifier/simple_intent_classifier_tensorflow.py +9 -9
- {besser_agentic_framework-4.3.0/besser/agent → besser_agentic_framework-4.3.2/baf}/nlp/llm/llm.py +6 -6
- {besser_agentic_framework-4.3.0/besser/agent → besser_agentic_framework-4.3.2/baf}/nlp/llm/llm_huggingface.py +10 -10
- {besser_agentic_framework-4.3.0/besser/agent → besser_agentic_framework-4.3.2/baf}/nlp/llm/llm_huggingface_api.py +8 -8
- {besser_agentic_framework-4.3.0/besser/agent → besser_agentic_framework-4.3.2/baf}/nlp/llm/llm_openai_api.py +10 -10
- {besser_agentic_framework-4.3.0/besser/agent → besser_agentic_framework-4.3.2/baf}/nlp/llm/llm_replicate_api.py +11 -9
- {besser_agentic_framework-4.3.0/besser/agent → besser_agentic_framework-4.3.2/baf}/nlp/ner/base/any.py +1 -1
- {besser_agentic_framework-4.3.0/besser/agent → besser_agentic_framework-4.3.2/baf}/nlp/ner/base/datetime.py +3 -3
- {besser_agentic_framework-4.3.0/besser/agent → besser_agentic_framework-4.3.2/baf}/nlp/ner/base/number.py +2 -2
- {besser_agentic_framework-4.3.0/besser/agent → besser_agentic_framework-4.3.2/baf}/nlp/ner/ner.py +4 -4
- {besser_agentic_framework-4.3.0/besser/agent → besser_agentic_framework-4.3.2/baf}/nlp/ner/ner_prediction.py +2 -2
- {besser_agentic_framework-4.3.0/besser/agent → besser_agentic_framework-4.3.2/baf}/nlp/ner/simple_ner.py +15 -15
- {besser_agentic_framework-4.3.0/besser/agent → besser_agentic_framework-4.3.2/baf}/nlp/nlp_engine.py +19 -19
- {besser_agentic_framework-4.3.0/besser/agent → besser_agentic_framework-4.3.2/baf}/nlp/preprocessing/pipelines.py +1 -1
- {besser_agentic_framework-4.3.0/besser/agent → besser_agentic_framework-4.3.2/baf}/nlp/preprocessing/text_preprocessing.py +3 -3
- {besser_agentic_framework-4.3.0/besser/agent → besser_agentic_framework-4.3.2/baf}/nlp/rag/rag.py +9 -9
- {besser_agentic_framework-4.3.0/besser/agent → besser_agentic_framework-4.3.2/baf}/nlp/speech2text/api_speech2text.py +4 -4
- {besser_agentic_framework-4.3.0/besser/agent → besser_agentic_framework-4.3.2/baf}/nlp/speech2text/hf_speech2text.py +4 -4
- {besser_agentic_framework-4.3.0/besser/agent → besser_agentic_framework-4.3.2/baf}/nlp/speech2text/luxasr_speech2text.py +2 -2
- {besser_agentic_framework-4.3.0/besser/agent → besser_agentic_framework-4.3.2/baf}/nlp/speech2text/openai_speech2text.py +4 -4
- {besser_agentic_framework-4.3.0/besser/agent → besser_agentic_framework-4.3.2/baf}/nlp/speech2text/speech2text.py +2 -2
- {besser_agentic_framework-4.3.0/besser/agent → besser_agentic_framework-4.3.2/baf}/nlp/text2speech/hf_text2speech.py +3 -3
- {besser_agentic_framework-4.3.0/besser/agent → besser_agentic_framework-4.3.2/baf}/nlp/text2speech/openai_text2speech.py +5 -5
- {besser_agentic_framework-4.3.0/besser/agent → besser_agentic_framework-4.3.2/baf}/nlp/text2speech/piper_text2speech.py +6 -5
- {besser_agentic_framework-4.3.0/besser/agent → besser_agentic_framework-4.3.2/baf}/nlp/text2speech/text2speech.py +2 -2
- {besser_agentic_framework-4.3.0/besser/agent → besser_agentic_framework-4.3.2/baf}/platforms/a2a/__init__.py +1 -1
- {besser_agentic_framework-4.3.0/besser/agent → besser_agentic_framework-4.3.2/baf}/platforms/a2a/a2a_platform.py +12 -12
- {besser_agentic_framework-4.3.0/besser/agent → besser_agentic_framework-4.3.2/baf}/platforms/a2a/agent_registry.py +3 -3
- {besser_agentic_framework-4.3.0/besser/agent → besser_agentic_framework-4.3.2/baf}/platforms/a2a/message_router.py +5 -5
- {besser_agentic_framework-4.3.0/besser/agent → besser_agentic_framework-4.3.2/baf}/platforms/a2a/server.py +5 -5
- {besser_agentic_framework-4.3.0/besser/agent → besser_agentic_framework-4.3.2/baf}/platforms/a2a/task_protocol.py +2 -2
- {besser_agentic_framework-4.3.0/besser/agent → besser_agentic_framework-4.3.2/baf}/platforms/github/__init__.py +1 -1
- {besser_agentic_framework-4.3.0/besser/agent → besser_agentic_framework-4.3.2/baf}/platforms/github/github_actions.py +1 -1
- {besser_agentic_framework-4.3.0/besser/agent → besser_agentic_framework-4.3.2/baf}/platforms/github/github_platform.py +10 -10
- {besser_agentic_framework-4.3.0/besser/agent → besser_agentic_framework-4.3.2/baf}/platforms/gitlab/__init__.py +1 -1
- {besser_agentic_framework-4.3.0/besser/agent → besser_agentic_framework-4.3.2/baf}/platforms/gitlab/gitlab_actions.py +1 -1
- {besser_agentic_framework-4.3.0/besser/agent → besser_agentic_framework-4.3.2/baf}/platforms/gitlab/gitlab_platform.py +10 -10
- {besser_agentic_framework-4.3.0/besser/agent → besser_agentic_framework-4.3.2/baf}/platforms/payload.py +2 -2
- {besser_agentic_framework-4.3.0/besser/agent → besser_agentic_framework-4.3.2/baf}/platforms/platform.py +2 -2
- {besser_agentic_framework-4.3.0/besser/agent → besser_agentic_framework-4.3.2/baf}/platforms/telegram/__init__.py +1 -1
- {besser_agentic_framework-4.3.0/besser/agent → besser_agentic_framework-4.3.2/baf}/platforms/telegram/telegram_platform.py +10 -10
- {besser_agentic_framework-4.3.0/besser/agent → besser_agentic_framework-4.3.2/baf}/platforms/websocket/__init__.py +21 -1
- {besser_agentic_framework-4.3.0/besser/agent → besser_agentic_framework-4.3.2/baf}/platforms/websocket/streamlit_ui/__init__.py +1 -1
- {besser_agentic_framework-4.3.0/besser/agent → besser_agentic_framework-4.3.2/baf}/platforms/websocket/streamlit_ui/chat.py +6 -6
- {besser_agentic_framework-4.3.0/besser/agent → besser_agentic_framework-4.3.2/baf}/platforms/websocket/streamlit_ui/chat_interface_style.py +1 -1
- {besser_agentic_framework-4.3.0/besser/agent → besser_agentic_framework-4.3.2/baf}/platforms/websocket/streamlit_ui/initialization.py +4 -4
- {besser_agentic_framework-4.3.0/besser/agent → besser_agentic_framework-4.3.2/baf}/platforms/websocket/streamlit_ui/login.py +1 -1
- {besser_agentic_framework-4.3.0/besser/agent → besser_agentic_framework-4.3.2/baf}/platforms/websocket/streamlit_ui/message_input.py +3 -3
- {besser_agentic_framework-4.3.0/besser/agent → besser_agentic_framework-4.3.2/baf}/platforms/websocket/streamlit_ui/session_management.py +1 -1
- {besser_agentic_framework-4.3.0/besser/agent → besser_agentic_framework-4.3.2/baf}/platforms/websocket/streamlit_ui/sidebar.py +5 -5
- {besser_agentic_framework-4.3.0/besser/agent → besser_agentic_framework-4.3.2/baf}/platforms/websocket/streamlit_ui/streamlit_ui.py +7 -7
- {besser_agentic_framework-4.3.0/besser/agent → besser_agentic_framework-4.3.2/baf}/platforms/websocket/streamlit_ui/websocket_callbacks.py +7 -7
- {besser_agentic_framework-4.3.0/besser/agent → besser_agentic_framework-4.3.2/baf}/platforms/websocket/websocket_platform.py +18 -18
- {besser_agentic_framework-4.3.0/besser/agent → besser_agentic_framework-4.3.2/baf}/test/examples/a2a_multiagent.py +4 -4
- {besser_agentic_framework-4.3.0/besser/agent → besser_agentic_framework-4.3.2/baf}/test/examples/api_speech2text_agent.py +9 -9
- {besser_agentic_framework-4.3.0/besser/agent → besser_agentic_framework-4.3.2/baf}/test/examples/github_agent.py +4 -4
- {besser_agentic_framework-4.3.0/besser/agent → besser_agentic_framework-4.3.2/baf}/test/examples/gitlab_agent.py +5 -5
- {besser_agentic_framework-4.3.0/besser/agent → besser_agentic_framework-4.3.2/baf}/test/examples/greetings_agent.py +4 -4
- {besser_agentic_framework-4.3.0/besser/agent → besser_agentic_framework-4.3.2/baf}/test/examples/llm_agent.py +9 -9
- {besser_agentic_framework-4.3.0/besser/agent → besser_agentic_framework-4.3.2/baf}/test/examples/multiagent/coder_agent.py +6 -6
- {besser_agentic_framework-4.3.0/besser/agent → besser_agentic_framework-4.3.2/baf}/test/examples/multiagent/main_agent.py +5 -5
- {besser_agentic_framework-4.3.0/besser/agent → besser_agentic_framework-4.3.2/baf}/test/examples/multiagent/reviewer_agent.py +6 -6
- {besser_agentic_framework-4.3.0/besser/agent → besser_agentic_framework-4.3.2/baf}/test/examples/rag_agent.py +8 -8
- {besser_agentic_framework-4.3.0/besser/agent → besser_agentic_framework-4.3.2/baf}/test/examples/speech2speech_agent.py +12 -12
- {besser_agentic_framework-4.3.0/besser/agent → besser_agentic_framework-4.3.2/baf}/test/examples/speech2text_agent.py +7 -7
- {besser_agentic_framework-4.3.0/besser/agent → besser_agentic_framework-4.3.2/baf}/test/examples/stargazer_agent.py +5 -5
- {besser_agentic_framework-4.3.0/besser/agent → besser_agentic_framework-4.3.2/baf}/test/examples/telegram_agent.py +3 -3
- {besser_agentic_framework-4.3.0/besser/agent → besser_agentic_framework-4.3.2/baf}/test/examples/text2speech_agent.py +6 -6
- {besser_agentic_framework-4.3.0/besser/agent → besser_agentic_framework-4.3.2/baf}/test/examples/weather_agent.py +4 -4
- {besser_agentic_framework-4.3.0/besser/agent → besser_agentic_framework-4.3.2/baf}/test/examples/web_crawl_agent.py +5 -5
- {besser_agentic_framework-4.3.0/besser/agent → besser_agentic_framework-4.3.2/baf}/utils/web_crawl.py +1 -1
- {besser_agentic_framework-4.3.0 → besser_agentic_framework-4.3.2/besser_agentic_framework.egg-info}/PKG-INFO +9 -9
- besser_agentic_framework-4.3.2/besser_agentic_framework.egg-info/SOURCES.txt +173 -0
- besser_agentic_framework-4.3.2/besser_agentic_framework.egg-info/top_level.txt +1 -0
- {besser_agentic_framework-4.3.0 → besser_agentic_framework-4.3.2}/setup.cfg +1 -1
- besser_agentic_framework-4.3.0/besser/agent/utils/__init__.py +0 -0
- besser_agentic_framework-4.3.0/besser_agentic_framework.egg-info/SOURCES.txt +0 -174
- besser_agentic_framework-4.3.0/besser_agentic_framework.egg-info/top_level.txt +0 -1
- {besser_agentic_framework-4.3.0 → besser_agentic_framework-4.3.2}/LICENSE +0 -0
- {besser_agentic_framework-4.3.0 → besser_agentic_framework-4.3.2}/MANIFEST.in +0 -0
- {besser_agentic_framework-4.3.0/besser → besser_agentic_framework-4.3.2/baf/core}/__init__.py +0 -0
- {besser_agentic_framework-4.3.0/besser/agent/core → besser_agentic_framework-4.3.2/baf/core/entity}/__init__.py +0 -0
- {besser_agentic_framework-4.3.0/besser/agent → besser_agentic_framework-4.3.2/baf}/core/entity/entity_entry.py +0 -0
- {besser_agentic_framework-4.3.0/besser/agent → besser_agentic_framework-4.3.2/baf}/core/file.py +0 -0
- {besser_agentic_framework-4.3.0/besser/agent/core/entity → besser_agentic_framework-4.3.2/baf/core/intent}/__init__.py +0 -0
- {besser_agentic_framework-4.3.0/besser/agent/core/intent → besser_agentic_framework-4.3.2/baf/core/processors}/__init__.py +0 -0
- {besser_agentic_framework-4.3.0/besser/agent → besser_agentic_framework-4.3.2/baf}/core/property.py +0 -0
- {besser_agentic_framework-4.3.0/besser/agent/core/processors → besser_agentic_framework-4.3.2/baf/core/transition}/__init__.py +0 -0
- {besser_agentic_framework-4.3.0/besser/agent → besser_agentic_framework-4.3.2/baf}/core/transition/event.py +0 -0
- {besser_agentic_framework-4.3.0/besser/agent/core/transition → besser_agentic_framework-4.3.2/baf/db/monitoring_ui}/__init__.py +0 -0
- {besser_agentic_framework-4.3.0/besser/agent → besser_agentic_framework-4.3.2/baf}/db/monitoring_ui/sidebar.py +0 -0
- {besser_agentic_framework-4.3.0/besser/agent → besser_agentic_framework-4.3.2/baf}/db/monitoring_ui/utils.py +0 -0
- {besser_agentic_framework-4.3.0/besser/agent/db/monitoring_ui → besser_agentic_framework-4.3.2/baf/exceptions}/__init__.py +0 -0
- {besser_agentic_framework-4.3.0/besser/agent → besser_agentic_framework-4.3.2/baf}/exceptions/exceptions.py +0 -0
- {besser_agentic_framework-4.3.0/besser/agent → besser_agentic_framework-4.3.2/baf}/exceptions/logger.py +0 -0
- {besser_agentic_framework-4.3.0/besser/agent/exceptions → besser_agentic_framework-4.3.2/baf/library}/__init__.py +0 -0
- {besser_agentic_framework-4.3.0/besser/agent/library → besser_agentic_framework-4.3.2/baf/library/coroutine}/__init__.py +0 -0
- {besser_agentic_framework-4.3.0/besser/agent → besser_agentic_framework-4.3.2/baf}/library/coroutine/async_helpers.py +0 -0
- {besser_agentic_framework-4.3.0/besser/agent/library/coroutine → besser_agentic_framework-4.3.2/baf/library/entity}/__init__.py +0 -0
- {besser_agentic_framework-4.3.0/besser/agent/library/entity → besser_agentic_framework-4.3.2/baf/library/intent}/__init__.py +0 -0
- {besser_agentic_framework-4.3.0/besser/agent/library/intent → besser_agentic_framework-4.3.2/baf/library/state}/__init__.py +0 -0
- {besser_agentic_framework-4.3.0/besser/agent/library/state → besser_agentic_framework-4.3.2/baf/library/transition}/__init__.py +0 -0
- {besser_agentic_framework-4.3.0/besser/agent/library/transition → besser_agentic_framework-4.3.2/baf/library/transition/events}/__init__.py +0 -0
- {besser_agentic_framework-4.3.0/besser/agent/library/transition/events → besser_agentic_framework-4.3.2/baf/nlp/intent_classifier}/__init__.py +0 -0
- {besser_agentic_framework-4.3.0/besser/agent/nlp/intent_classifier → besser_agentic_framework-4.3.2/baf/nlp/llm}/__init__.py +0 -0
- {besser_agentic_framework-4.3.0/besser/agent/nlp/llm → besser_agentic_framework-4.3.2/baf/nlp/ner}/__init__.py +0 -0
- {besser_agentic_framework-4.3.0/besser/agent/nlp/ner → besser_agentic_framework-4.3.2/baf/nlp/ner/base}/__init__.py +0 -0
- {besser_agentic_framework-4.3.0/besser/agent → besser_agentic_framework-4.3.2/baf}/nlp/ner/matched_parameter.py +0 -0
- {besser_agentic_framework-4.3.0/besser/agent/nlp/ner/base → besser_agentic_framework-4.3.2/baf/nlp/preprocessing}/__init__.py +0 -0
- {besser_agentic_framework-4.3.0/besser/agent/nlp/preprocessing → besser_agentic_framework-4.3.2/baf/nlp/rag}/__init__.py +0 -0
- {besser_agentic_framework-4.3.0/besser/agent/nlp/rag → besser_agentic_framework-4.3.2/baf/nlp/speech2text}/__init__.py +0 -0
- {besser_agentic_framework-4.3.0/besser/agent/nlp/speech2text → besser_agentic_framework-4.3.2/baf/nlp/text2speech}/__init__.py +0 -0
- {besser_agentic_framework-4.3.0/besser/agent → besser_agentic_framework-4.3.2/baf}/nlp/utils.py +0 -0
- {besser_agentic_framework-4.3.0/besser/agent/nlp/text2speech → besser_agentic_framework-4.3.2/baf/platforms}/__init__.py +0 -0
- {besser_agentic_framework-4.3.0/besser/agent → besser_agentic_framework-4.3.2/baf}/platforms/a2a/agent_card.py +0 -0
- {besser_agentic_framework-4.3.0/besser/agent → besser_agentic_framework-4.3.2/baf}/platforms/a2a/client.py +0 -0
- {besser_agentic_framework-4.3.0/besser/agent → besser_agentic_framework-4.3.2/baf}/platforms/a2a/error_handler.py +0 -0
- {besser_agentic_framework-4.3.0/besser/agent → besser_agentic_framework-4.3.2/baf}/platforms/github/github_objects.py +0 -0
- {besser_agentic_framework-4.3.0/besser/agent → besser_agentic_framework-4.3.2/baf}/platforms/gitlab/gitlab_objects.py +0 -0
- {besser_agentic_framework-4.3.0/besser/agent → besser_agentic_framework-4.3.2/baf}/platforms/websocket/streamlit_ui/audio_queue.py +0 -0
- {besser_agentic_framework-4.3.0/besser/agent → besser_agentic_framework-4.3.2/baf}/platforms/websocket/streamlit_ui/profile_selector.py +0 -0
- {besser_agentic_framework-4.3.0/besser/agent → besser_agentic_framework-4.3.2/baf}/platforms/websocket/streamlit_ui/user_db.py +0 -0
- {besser_agentic_framework-4.3.0/besser/agent → besser_agentic_framework-4.3.2/baf}/platforms/websocket/streamlit_ui/vars.py +0 -0
- {besser_agentic_framework-4.3.0/besser/agent/platforms → besser_agentic_framework-4.3.2/baf/test}/__init__.py +0 -0
- {besser_agentic_framework-4.3.0/besser/agent/test → besser_agentic_framework-4.3.2/baf/test/examples}/__init__.py +0 -0
- {besser_agentic_framework-4.3.0/besser/agent/test/examples → besser_agentic_framework-4.3.2/baf/test/examples/multiagent}/__init__.py +0 -0
- {besser_agentic_framework-4.3.0/besser/agent/test/examples/multiagent → besser_agentic_framework-4.3.2/baf/utils}/__init__.py +0 -0
- {besser_agentic_framework-4.3.0 → besser_agentic_framework-4.3.2}/besser_agentic_framework.egg-info/dependency_links.txt +0 -0
- {besser_agentic_framework-4.3.0 → besser_agentic_framework-4.3.2}/besser_agentic_framework.egg-info/requires.txt +0 -0
- {besser_agentic_framework-4.3.0 → besser_agentic_framework-4.3.2}/pyproject.toml +0 -0
- {besser_agentic_framework-4.3.0 → besser_agentic_framework-4.3.2}/requirements/requirements-core.txt +0 -0
- {besser_agentic_framework-4.3.0 → besser_agentic_framework-4.3.2}/requirements/requirements-docs.txt +0 -0
- {besser_agentic_framework-4.3.0 → besser_agentic_framework-4.3.2}/requirements/requirements-extras.txt +0 -0
- {besser_agentic_framework-4.3.0 → besser_agentic_framework-4.3.2}/requirements/requirements-llms.txt +0 -0
- {besser_agentic_framework-4.3.0 → besser_agentic_framework-4.3.2}/requirements/requirements-tensorflow.txt +0 -0
- {besser_agentic_framework-4.3.0 → besser_agentic_framework-4.3.2}/requirements/requirements-torch.txt +0 -0
- {besser_agentic_framework-4.3.0 → besser_agentic_framework-4.3.2}/setup.py +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.2
|
|
4
4
|
Summary: BESSER Agentic Framework (BAF)
|
|
5
5
|
Author: Luxembourg Institute of Science and Technology
|
|
6
6
|
License: MIT
|
|
@@ -152,13 +152,13 @@ Note that if you want to set your agent's language to **Luxembourgish**, you wil
|
|
|
152
152
|
|
|
153
153
|
### Example agents
|
|
154
154
|
|
|
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/
|
|
155
|
+
- [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
|
|
156
|
+
- [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)
|
|
157
|
+
- [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)
|
|
158
|
+
- [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)
|
|
159
|
+
- [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)
|
|
160
|
+
- [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)
|
|
161
|
+
- [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)
|
|
162
|
+
- [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
163
|
|
|
164
164
|
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.0/besser/agent → besser_agentic_framework-4.3.2/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
|
|
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()))
|
|
@@ -564,7 +566,7 @@ class Agent:
|
|
|
564
566
|
same fallback body to all agent states.
|
|
565
567
|
|
|
566
568
|
See also:
|
|
567
|
-
:func:`~
|
|
569
|
+
:func:`~baf.core.state.State.set_fallback_body`
|
|
568
570
|
|
|
569
571
|
Args:
|
|
570
572
|
body (Callable[[Session], None]): the fallback body
|
|
@@ -669,7 +671,7 @@ class Agent:
|
|
|
669
671
|
use_ui: bool = True,
|
|
670
672
|
authenticate_users: bool = False,
|
|
671
673
|
) -> WebSocketPlatform:
|
|
672
|
-
"""Use the :class:`~
|
|
674
|
+
"""Use the :class:`~baf.platforms.websocket.websocket_platform.WebSocketPlatform` on this agent.
|
|
673
675
|
|
|
674
676
|
Args:
|
|
675
677
|
use_ui (bool): if true, the default UI will be run to use this platform
|
|
@@ -687,7 +689,7 @@ class Agent:
|
|
|
687
689
|
return websocket_platform
|
|
688
690
|
|
|
689
691
|
def use_telegram_platform(self) -> TelegramPlatform:
|
|
690
|
-
"""Use the :class:`~
|
|
692
|
+
"""Use the :class:`~baf.platforms.telegram.telegram_platform.TelegramPlatform` on this agent.
|
|
691
693
|
|
|
692
694
|
Returns:
|
|
693
695
|
TelegramPlatform: the telegram platform
|
|
@@ -697,7 +699,7 @@ class Agent:
|
|
|
697
699
|
return telegram_platform
|
|
698
700
|
|
|
699
701
|
def use_github_platform(self) -> GitHubPlatform:
|
|
700
|
-
"""Use the :class:`~
|
|
702
|
+
"""Use the :class:`~baf.platforms.github.github_platform.GitHubPlatform` on this agent.
|
|
701
703
|
|
|
702
704
|
Returns:
|
|
703
705
|
GitHubPlatform: the GitHub platform
|
|
@@ -707,7 +709,7 @@ class Agent:
|
|
|
707
709
|
return github_platform
|
|
708
710
|
|
|
709
711
|
def use_gitlab_platform(self) -> GitLabPlatform:
|
|
710
|
-
"""Use the :class:`~
|
|
712
|
+
"""Use the :class:`~baf.platforms.gitlab.gitlab_platform.GitLabPlatform` on this agent.
|
|
711
713
|
|
|
712
714
|
Returns:
|
|
713
715
|
GitLabPlatform: the GitLab platform
|
|
@@ -717,7 +719,7 @@ class Agent:
|
|
|
717
719
|
return gitlab_platform
|
|
718
720
|
|
|
719
721
|
def use_a2a_platform(self) -> A2APlatform:
|
|
720
|
-
"""Use the :class: `~
|
|
722
|
+
"""Use the :class: `~baf.platforms.a2a.a2a_platform.A2APlatform` on this agent.
|
|
721
723
|
|
|
722
724
|
Returns:
|
|
723
725
|
A2APlatform: the A2A platform
|
|
@@ -727,7 +729,7 @@ class Agent:
|
|
|
727
729
|
return a2a_platform
|
|
728
730
|
|
|
729
731
|
def use_db_handler(self) -> DBHandler:
|
|
730
|
-
"""Use the :class:`~
|
|
732
|
+
"""Use the :class:`~baf.db.db_handler.DBHandler` on this agent.
|
|
731
733
|
|
|
732
734
|
DB connections are established lazily, when the first query is executed.
|
|
733
735
|
|
|
@@ -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:
|
|
@@ -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):
|
{besser_agentic_framework-4.3.0/besser/agent → besser_agentic_framework-4.3.2/baf}/core/session.py
RENAMED
|
@@ -10,22 +10,22 @@ from datetime import datetime
|
|
|
10
10
|
from pandas import DataFrame
|
|
11
11
|
from websocket import WebSocketApp
|
|
12
12
|
|
|
13
|
-
from
|
|
14
|
-
from
|
|
15
|
-
from
|
|
16
|
-
from
|
|
17
|
-
from
|
|
18
|
-
from
|
|
19
|
-
from
|
|
20
|
-
from
|
|
21
|
-
from
|
|
22
|
-
from
|
|
13
|
+
from baf import CHECK_TRANSITIONS_DELAY
|
|
14
|
+
from baf.core.transition.event import Event
|
|
15
|
+
from baf.core.transition.transition import Transition
|
|
16
|
+
from baf.library.transition.conditions import IntentMatcher
|
|
17
|
+
from baf.library.transition.events.base_events import ReceiveMessageEvent, ReceiveTextEvent
|
|
18
|
+
from baf.core.message import Message, get_message_type
|
|
19
|
+
from baf.exceptions.logger import logger
|
|
20
|
+
from baf.db import DB_MONITORING
|
|
21
|
+
from baf.nlp.rag.rag import RAGMessage
|
|
22
|
+
from baf.platforms.payload import PayloadEncoder, Payload, PayloadAction
|
|
23
23
|
|
|
24
24
|
if TYPE_CHECKING:
|
|
25
|
-
from
|
|
26
|
-
from
|
|
27
|
-
from
|
|
28
|
-
from
|
|
25
|
+
from baf.core.agent import Agent
|
|
26
|
+
from baf.db.db_handler import DBHandler
|
|
27
|
+
from baf.core.state import State
|
|
28
|
+
from baf.platforms.platform import Platform
|
|
29
29
|
|
|
30
30
|
|
|
31
31
|
class Session:
|
|
@@ -318,7 +318,7 @@ class Session:
|
|
|
318
318
|
will be used
|
|
319
319
|
num_previous_messages (int): number of previous messages of the conversation to add to the prompt context.
|
|
320
320
|
If none is provided, the RAG's default value will be used. Necessary a connection to
|
|
321
|
-
:class:`~
|
|
321
|
+
:class:`~baf.db.monitoring_db.MonitoringDB`
|
|
322
322
|
|
|
323
323
|
Returns:
|
|
324
324
|
RAGMessage: the answer generated by the RAG engine
|
{besser_agentic_framework-4.3.0/besser/agent → besser_agentic_framework-4.3.2/baf}/core/state.py
RENAMED
|
@@ -3,25 +3,25 @@ import traceback
|
|
|
3
3
|
from collections import deque
|
|
4
4
|
from typing import Any, Callable, TYPE_CHECKING, Union
|
|
5
5
|
|
|
6
|
-
from
|
|
7
|
-
from
|
|
8
|
-
from
|
|
9
|
-
from
|
|
10
|
-
from
|
|
11
|
-
from
|
|
12
|
-
from
|
|
13
|
-
from
|
|
14
|
-
from
|
|
15
|
-
from
|
|
6
|
+
from baf.core.transition.event import Event
|
|
7
|
+
from baf.core.transition.transition import Transition
|
|
8
|
+
from baf.core.transition.transition_builder import TransitionBuilder
|
|
9
|
+
from baf.library.intent.intent_library import fallback_intent
|
|
10
|
+
from baf.library.transition.events.base_events import ReceiveTextEvent, ReceiveFileEvent, WildcardEvent, ReceiveJSONEvent
|
|
11
|
+
from baf.library.transition.conditions import IntentMatcher, VariableOperationMatcher
|
|
12
|
+
from baf.core.transition.condition import Condition
|
|
13
|
+
from baf.core.intent.intent import Intent
|
|
14
|
+
from baf.core.session import Session
|
|
15
|
+
from baf.exceptions.exceptions import BodySignatureError, DuplicatedIntentMatchingTransitionError, \
|
|
16
16
|
IntentNotFound
|
|
17
|
-
from
|
|
18
|
-
from
|
|
19
|
-
from
|
|
20
|
-
from
|
|
17
|
+
from baf.exceptions.logger import logger
|
|
18
|
+
from baf.library.transition.condition_functions import file_type
|
|
19
|
+
from baf.library.state.state_library import default_body, default_fallback_body
|
|
20
|
+
from baf.nlp.intent_classifier.intent_classifier_configuration import IntentClassifierConfiguration, \
|
|
21
21
|
SimpleIntentClassifierConfiguration
|
|
22
22
|
|
|
23
23
|
if TYPE_CHECKING:
|
|
24
|
-
from
|
|
24
|
+
from baf.core.agent import Agent
|
|
25
25
|
|
|
26
26
|
|
|
27
27
|
class State:
|
|
@@ -41,9 +41,9 @@ class State:
|
|
|
41
41
|
_name (str): The state name
|
|
42
42
|
_initial (bool): Whether the state is initial or not
|
|
43
43
|
_body (Callable[[Session], None]): The state body. It is a callable that takes as argument a
|
|
44
|
-
:class:`~
|
|
44
|
+
:class:`~baf.core.session.Session`. It will be run whenever the agent moves to this state.
|
|
45
45
|
_fallback_body (Callable[[Session], None]): The state fallback body. It is a callable that takes as argument a
|
|
46
|
-
:class:`~
|
|
46
|
+
:class:`~baf.core.session.Session`. It will be run whenever the agent tries to move to another state,
|
|
47
47
|
but it can't (e.g. an intent is matched but none of the current state's transitions are triggered on that
|
|
48
48
|
intent)
|
|
49
49
|
_ic_config (IntentClassifierConfiguration): the intent classifier configuration of the state
|
|
@@ -192,11 +192,11 @@ class State:
|
|
|
192
192
|
|
|
193
193
|
Args:
|
|
194
194
|
function (Union[Callable[[Session], bool], Callable[[Session, dict], bool]]): the condition function to add
|
|
195
|
-
to the transition. Allowed function arguments are (:class:`~
|
|
196
|
-
(:class:`~
|
|
195
|
+
to the transition. Allowed function arguments are (:class:`~baf.core.session.Session`) or
|
|
196
|
+
(:class:`~baf.core.session.Session`, dict) to add parameters within the dict argument. The
|
|
197
197
|
function must return a boolean value
|
|
198
198
|
params (dict, optional): the parameters for the condition function, necessary if the function has
|
|
199
|
-
(:class:`~
|
|
199
|
+
(:class:`~baf.core.session.Session`, dict) arguments
|
|
200
200
|
Returns:
|
|
201
201
|
TransitionBuilder: the transition builder
|
|
202
202
|
"""
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import traceback
|
|
2
2
|
from typing import TYPE_CHECKING
|
|
3
3
|
|
|
4
|
-
from
|
|
5
|
-
from
|
|
6
|
-
from
|
|
4
|
+
from baf.core.transition.event import Event
|
|
5
|
+
from baf.core.transition.condition import Condition
|
|
6
|
+
from baf.exceptions.logger import logger
|
|
7
7
|
|
|
8
8
|
if TYPE_CHECKING:
|
|
9
|
-
from
|
|
10
|
-
from
|
|
9
|
+
from baf.core.session import Session
|
|
10
|
+
from baf.core.state import State
|
|
11
11
|
|
|
12
12
|
|
|
13
13
|
class Transition:
|
|
@@ -2,14 +2,14 @@ import inspect
|
|
|
2
2
|
from functools import partial
|
|
3
3
|
from typing import Union, Callable, TYPE_CHECKING
|
|
4
4
|
|
|
5
|
-
from
|
|
6
|
-
from
|
|
7
|
-
from
|
|
8
|
-
from
|
|
5
|
+
from baf.core.transition.event import Event
|
|
6
|
+
from baf.core.transition.condition import Condition, Conjunction
|
|
7
|
+
from baf.core.transition.transition import Transition
|
|
8
|
+
from baf.exceptions.exceptions import StateNotFound, ConflictingAutoTransitionError
|
|
9
9
|
|
|
10
10
|
if TYPE_CHECKING:
|
|
11
|
-
from
|
|
12
|
-
from
|
|
11
|
+
from baf.core.session import Session
|
|
12
|
+
from baf.core.state import State
|
|
13
13
|
|
|
14
14
|
|
|
15
15
|
class TransitionBuilder:
|
|
@@ -46,11 +46,11 @@ class TransitionBuilder:
|
|
|
46
46
|
|
|
47
47
|
Args:
|
|
48
48
|
function (Union[Callable[[Session], bool], Callable[[Session, dict], bool]]): the condition function to add
|
|
49
|
-
to the transition. Allowed function arguments are (:class:`~
|
|
50
|
-
(:class:`~
|
|
49
|
+
to the transition. Allowed function arguments are (:class:`~baf.core.session.Session`) or
|
|
50
|
+
(:class:`~baf.core.session.Session`, dict) to add parameters within the dict argument. The
|
|
51
51
|
function must return a boolean value
|
|
52
52
|
params (dict, optional): the parameters for the condition function, necessary if the function has
|
|
53
|
-
(:class:`~
|
|
53
|
+
(:class:`~baf.core.session.Session`, dict) arguments
|
|
54
54
|
|
|
55
55
|
Returns:
|
|
56
56
|
TransitionBuilder: the transition builder with the new condition added
|
{besser_agentic_framework-4.3.0/besser/agent → besser_agentic_framework-4.3.2/baf}/db/db_handler.py
RENAMED
|
@@ -6,11 +6,11 @@ from typing import TYPE_CHECKING, Any
|
|
|
6
6
|
from sqlalchemy import create_engine, inspect, text
|
|
7
7
|
from sqlalchemy.engine import Connection, Engine, URL
|
|
8
8
|
|
|
9
|
-
from
|
|
9
|
+
from baf.exceptions.logger import logger
|
|
10
10
|
|
|
11
11
|
if TYPE_CHECKING:
|
|
12
|
-
from
|
|
13
|
-
from
|
|
12
|
+
from baf.core.agent import Agent
|
|
13
|
+
from baf.nlp.llm.llm import LLM
|
|
14
14
|
|
|
15
15
|
|
|
16
16
|
class DBHandler:
|
|
@@ -20,7 +20,11 @@ class DBHandler:
|
|
|
20
20
|
configuration and opens connections lazily when they are first needed.
|
|
21
21
|
"""
|
|
22
22
|
|
|
23
|
-
|
|
23
|
+
_DEFAULT_REQUIRED_DB_FIELDS = {'dialect', 'host', 'port', 'database', 'username', 'password'}
|
|
24
|
+
_DIALECT_REQUIRED_DB_FIELDS = {
|
|
25
|
+
'sqlite': {'dialect', 'file'},
|
|
26
|
+
'postgres': {'dialect', 'host', 'port', 'database', 'username', 'password'}
|
|
27
|
+
}
|
|
24
28
|
_SQL_COMMAND_PATTERN = re.compile(r'^\s*(?:/\*.*?\*/\s*|--.*?(?:\n|\r\n?)\s*)*([a-zA-Z]+)', re.DOTALL)
|
|
25
29
|
|
|
26
30
|
def __init__(self, agent: 'Agent'):
|
|
@@ -50,24 +54,36 @@ class DBHandler:
|
|
|
50
54
|
return db_configs
|
|
51
55
|
|
|
52
56
|
def _validate_db_config(self, db_name: str, db_config: dict[str, Any]) -> bool:
|
|
53
|
-
|
|
57
|
+
required_fields = self._required_db_fields(db_config)
|
|
58
|
+
missing = sorted(field for field in required_fields if db_config.get(field) is None)
|
|
54
59
|
if missing:
|
|
60
|
+
dialect = db_config.get('dialect')
|
|
55
61
|
logger.error(
|
|
56
|
-
"Missing required DB properties for '%s': %s. Expected under 'db.sql.%s'.",
|
|
62
|
+
"Missing required DB properties for '%s' (dialect=%s): %s. Expected under 'db.sql.%s'. Required fields: %s.",
|
|
57
63
|
db_name,
|
|
64
|
+
dialect,
|
|
58
65
|
', '.join(missing),
|
|
59
66
|
db_name,
|
|
67
|
+
', '.join(sorted(required_fields)),
|
|
60
68
|
)
|
|
61
69
|
return False
|
|
62
70
|
return True
|
|
63
71
|
|
|
72
|
+
def _required_db_fields(self, db_config: dict[str, Any]) -> set[str]:
|
|
73
|
+
dialect = db_config.get('dialect')
|
|
74
|
+
if dialect is None:
|
|
75
|
+
return {'dialect'}
|
|
76
|
+
|
|
77
|
+
dialect_name = str(dialect).split('+', 1)[0].lower()
|
|
78
|
+
return self._DIALECT_REQUIRED_DB_FIELDS.get(dialect_name, self._DEFAULT_REQUIRED_DB_FIELDS)
|
|
79
|
+
|
|
64
80
|
def _build_db_url(self, db_name: str) -> URL | str | None:
|
|
65
81
|
try:
|
|
66
82
|
db_config = self._db_configs[db_name]
|
|
67
83
|
dialect = str(db_config['dialect'])
|
|
68
84
|
|
|
69
85
|
if dialect.startswith('sqlite'):
|
|
70
|
-
return URL.create(drivername=dialect, database=str(db_config['
|
|
86
|
+
return URL.create(drivername=dialect, database=str(db_config['file']))
|
|
71
87
|
|
|
72
88
|
return URL.create(
|
|
73
89
|
drivername=dialect,
|