Root cause: uploadJobResultFiles was passing msgTs (placeholder reply timestamp)
as thread_ts for file uploads. Slack's API rejects this - it requires the
parent thread timestamp, not a reply's timestamp.
Changes:
1. Use 'ts' (thread root timestamp) instead of 'msgTs' in replyToUpdateMessage
2. Fix type handling in attachmentsFromMetadataOnly to handle []interface{}
3. Download and upload generated images (e.g., DALL-E) as files instead of
just adding link attachments, to preserve temporary URLs
4. Remove dead code: generateAttachmentsFromJobResponse was never called
This matches Telegram connector behavior where files are properly uploaded
rather than just referenced by URL.
Co-authored-by: localai-bot <localai-bot@noreply.github.com>
* feat: add scheduler task template and template-based skills prompt
- Add WithSchedulerTaskTemplate option for recurring tasks run by scheduler
- Expose scheduler_task_template in core/state/config.go for user configuration
- Add WithSkillPromptTemplate option for custom skill prompt templates
- Use {{.Skills}} slice in templates to iterate over Skill.Name, Skill.Description
- Default template mimics current XML behavior with <available_skills> format
- Rename customIntro to customTemplate in services/skills for consistency
* cleanups
Signed-off-by: Ettore Di Giacinto <mudler@localai.io>
* Update core/state/config.go
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
---------
Signed-off-by: Ettore Di Giacinto <mudler@localai.io>
Co-authored-by: Ettore Di Giacinto <mudler@localai.io>
Co-authored-by: Ettore Di Giacinto <mudler@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* Add Webhook action handling
Integrates a new "webhook" action, enabling configurable HTTP requests with customizable methods, content types, and payloads through runtime parameters.
* Enhance Webhook action documentation and runtime handling
Improves comments and function-level documentation for the Webhook action, clarifying its configuration, runtime parameter handling, and operational behavior. Adds detailed explanations for methods, payload templates, and HTTP request construction.
This is useful mainly to pass-by from the web interface a generic string
that can be later re-used in the custom actions or dynamic prompt during
Init().
The Signature of the custom actions and prompts around Init has changed,
and now is Init(string), this is on the custom action duty to decide if
the string is e.g. a JSON, or a comma separated list, etc.
Signed-off-by: mudler <mudler@localai.io>
* feat: preload custom actions from dir
Signed-off-by: Ettore Di Giacinto <mudler@localai.io>
* fix(custom dir): allow to override name and description, strip package from code
Signed-off-by: mudler <mudler@localai.io>
---------
Signed-off-by: Ettore Di Giacinto <mudler@localai.io>
Signed-off-by: mudler <mudler@localai.io>
* feat(actions): allow actions to return images
Signed-off-by: Ettore Di Giacinto <mudler@localai.io>
* feat(prompts): allow to have images in dynamic prompts
Signed-off-by: Ettore Di Giacinto <mudler@localai.io>
* chore: change signature of dynamic prompts to allow to return base64 images
Signed-off-by: Ettore Di Giacinto <mudler@localai.io>
* chore: fixups
Signed-off-by: Ettore Di Giacinto <mudler@localai.io>
---------
Signed-off-by: Ettore Di Giacinto <mudler@localai.io>
* feat(reminders): add self-ability to set reminders
Signed-off-by: Ettore Di Giacinto <mudler@localai.io>
* feat(reminders): surface reminders result to the user as new conversations
Signed-off-by: Ettore Di Giacinto <mudler@localai.io>
* Fixups
* Subscribe all connectors to agents new messages
Signed-off-by: Ettore Di Giacinto <mudler@localai.io>
* Set reminders in the list
* fix(telegram): do not always auth
Signed-off-by: Ettore Di Giacinto <mudler@localai.io>
* Small fixups
* Improve UX
Signed-off-by: Ettore Di Giacinto <mudler@localai.io>
---------
Signed-off-by: Ettore Di Giacinto <mudler@localai.io>