-
Notifications
You must be signed in to change notification settings - Fork 8
Feature/social media integration testing #233
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: develop
Are you sure you want to change the base?
Changes from all commits
9014f6b
5222577
54def41
d0199b6
698747d
bb4c1b3
a906b91
1cc6d53
5cb693f
d99ae92
d1f68e5
7c6d40c
84330c1
7e08a7c
d9e601b
8f7733c
23d7c61
930ed98
c0f5652
94a350f
94cf7a9
e6d9ba1
b529b66
28e26ba
fd36019
06bfb32
acfeba4
c5c2303
b0a52ec
216d5a7
5e64084
a1de5c1
ba10bce
d6623d0
220eabf
df0ec13
158f146
4d7a95d
79d0172
b9d6d6d
155237a
e83fe4c
915520c
5fe3dad
32a5f07
5b9b01b
535e160
639c14d
1315b80
ad68ede
3b6675e
c19478f
655384d
df51a35
14ff432
b08c323
6578af5
a5e6c7b
82f59b5
b312706
ccaa21c
e81891e
10be41a
674e21c
d8a84c6
d56e95f
eb1435a
6d7ac44
8a15d9f
0bf3318
411180e
a7bdea1
3307aa7
e727abe
9f02645
2da6ce7
d77f725
faca290
20183d4
93fbc22
8751d9f
fa7b70f
5c5e25e
3675084
c453539
c5142fb
ae45069
e85e905
c857a0a
aa540ec
9933d5e
3770ded
aa895b6
b1cd302
74cfc87
8f296f4
fa78f65
46873bc
ecda8f2
d97475f
bf6c998
1260d02
8262056
caa21a8
6064728
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -62,7 +62,7 @@ class _APIConfig(BaseModel): | |
| port: int = Field(default=8000, description="API port") | ||
| enabled_routes: _RoutesConfig = Field(description="API route flags", default_factory=_RoutesConfig) | ||
| custom_router_prefix: str = Field(default="/custom", description="Custom router prefix") | ||
| max_file_size: int = Field(default=2097152, description="Maximum file size in bytes (default: 2 MB)") | ||
| max_file_size: int = Field(default=20971520, description="Maximum file size in bytes (default: 20 MB)") | ||
pulinduvidmal marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
|
||
|
|
||
| class _A2AConfig(BaseModel): | ||
|
|
@@ -85,6 +85,18 @@ class _SlackConfig(BaseModel): | |
| default="", | ||
| description="The message to send as an acknowledgement when a Slack message is received", | ||
| ) | ||
| test_mode: bool = Field(default=False, description="Enable test mode for Slack integration") | ||
|
|
||
|
|
||
| class _TeamsConfig(BaseModel): | ||
| agent: str = Field(default="", description="Default agent to use for Microsoft Teams interactions") | ||
| agent_acknowledgement: str = Field( | ||
| default="", | ||
| description="The message to send as an acknowledgement when a Teams message is received", | ||
| ) | ||
| app_id: str = Field(default="", description="Microsoft App ID (Application/Client ID) from Azure AD App Registration") | ||
| app_password: str = Field(default="", description="Microsoft App Password (Client Secret) from Azure AD App Registration") | ||
| tenant_id: str = Field(default="", description="Optional Tenant ID for Single Tenant App registration") | ||
|
|
||
|
|
||
| class _WhatsAppConfig(BaseModel): | ||
|
|
@@ -98,6 +110,7 @@ class _WhatsAppConfig(BaseModel): | |
| app_secret: str = Field(default="", description="WhatsApp app secret for signature verification") | ||
| phone_number_id: str = Field(default="", description="WhatsApp Business phone number ID") | ||
| api_version: str = Field(default="v24.0", description="WhatsApp API version") | ||
| api_base_url: str = Field(default="https://graph.facebook.com", description="WhatsApp API base URL") | ||
|
|
||
|
|
||
| class _MessengerConfig(BaseModel): | ||
|
|
@@ -131,6 +144,25 @@ class _GmailConfig(BaseModel): | |
| label_filter: str = Field(default="INBOX", description="Gmail label to monitor (e.g., INBOX, UNREAD)") | ||
|
|
||
|
|
||
| class _MultimodalConfig(BaseModel): | ||
| """Configuration for multimodal attachment memory.""" | ||
|
|
||
| enabled: bool = Field( | ||
| default=False, | ||
| description="Enable multimodal memory for images and files.", | ||
| ) | ||
| max_attachments: int = Field(default=20, description="Maximum number of attachments to keep per session") | ||
| description_max_length: int = Field(default=200, description="Maximum length of attachment description text") | ||
| description_model: str = Field( | ||
| default="gpt-4o", | ||
| description="LiteLLM model used to generate brief descriptions when an attachment is first received (called by the pre-hook)", | ||
| ) | ||
| analysis_model: str = Field( | ||
| default="gpt-4o", | ||
| description="LiteLLM model used by the analyze_attachments tool when the agent requests a full analysis of an attachment", | ||
| ) | ||
|
Comment on lines
+154
to
+163
|
||
|
|
||
|
|
||
| class _TraceConfig(BaseModel): | ||
| enabled: bool = Field(default=False, description="Enable tracing") | ||
| type: str = Field(default="langfuse", pattern="^(langfuse|openllmetry)$") | ||
|
|
@@ -174,11 +206,13 @@ class AKConfig(YamlBaseSettingsModified): | |
| default_factory=_MCPConfig, | ||
| ) | ||
| slack: _SlackConfig = Field(description="Slack related configurations", default_factory=_SlackConfig) | ||
| teams: _TeamsConfig = Field(description="Microsoft Teams related configurations", default_factory=_TeamsConfig) | ||
| whatsapp: _WhatsAppConfig = Field(description="WhatsApp related configurations", default_factory=_WhatsAppConfig) | ||
| messenger: _MessengerConfig = Field(description="Facebook Messenger related configurations", default_factory=_MessengerConfig) | ||
| instagram: _InstagramConfig = Field(description="Instagram Business API related configurations", default_factory=_InstagramConfig) | ||
| telegram: _TelegramConfig = Field(description="Telegram Bot related configurations", default_factory=_TelegramConfig) | ||
| gmail: _GmailConfig = Field(description="Gmail related configurations", default_factory=_GmailConfig) | ||
| multimodal: _MultimodalConfig = Field(description="Multimodal attachment memory configurations", default_factory=_MultimodalConfig) | ||
|
|
||
| trace: _TraceConfig = Field(description="Tracing related configurations", default_factory=_TraceConfig) | ||
| test: _TestConfig = Field(description="Test related configurations", default_factory=_TestConfig) | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,21 @@ | ||
| """ | ||
| Multimodal module for Agent Kernel. | ||
|
|
||
| This module provides: | ||
| - Storage functions for saving/retrieving attachments | ||
| - PreHook for processing current images and injecting descriptions | ||
| - Tools for LLM to access image data (framework-agnostic) | ||
| """ | ||
|
|
||
| from .hooks import MultimodalPreHook, MultimodalPreHookFactory, NoOpPreHook | ||
| from .storage import ( | ||
| AttachmentData, | ||
| AttachmentStorageDriver, | ||
| CacheStorageDriver, | ||
| get_attachment_data, | ||
| save_attachment, | ||
| ) | ||
| from .tools import ( | ||
| analyze_attachments, | ||
| describe_attachment_briefly, | ||
| ) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
override_system_promptis declared to require aSession, but_setup_system_prompt()calls it withsession=None. This is inconsistent with the abstract method contract and may break implementations that assume a real session. Consider typing the parameter asSession | None(and updating implementations) or refactor init-time prompt injection to not require a session object.