discourse-ai/assets/javascripts/discourse
Sam 61e4c56e1a
FEATURE: Add vision support to AI personas (Claude 3) (#546)
This commit adds the ability to enable vision for AI personas, allowing them to understand images that are posted in the conversation.

For personas with vision enabled, any images the user has posted will be resized to be within the configured max_pixels limit, base64 encoded and included in the prompt sent to the AI provider.

The persona editor allows enabling/disabling vision and has a dropdown to select the max supported image size (low, medium, high). Vision is disabled by default.

This initial vision support has been tested and implemented with Anthropic's claude-3 models which accept images in a special format as part of the prompt.

Other integrations will need to be updated to support images.

Several specs were added to test the new functionality at the persona, prompt building and API layers.

 - Gemini is omitted, pending API support for Gemini 1.5. Current Gemini bot is not performing well, adding images is unlikely to make it perform any better.

 - Open AI is omitted, vision support on GPT-4 it limited in that the API has no tool support when images are enabled so we would need to full back to a different prompting technique, something that would add lots of complexity


---------

Co-authored-by: Martin Brennan <martin@discourse.org>
2024-03-27 14:30:11 +11:00
..
admin FEATURE: Add vision support to AI personas (Claude 3) (#546) 2024-03-27 14:30:11 +11:00
components FEATURE: Add vision support to AI personas (Claude 3) (#546) 2024-03-27 14:30:11 +11:00
connectors FEATURE: AI Quick Semantic Search (#501) 2024-03-08 13:02:50 -03:00
controllers DEV: Use the new controller/period component for the dashboard (#435) 2024-01-19 13:27:33 +01:00
lib FEATURE: Share conversations with AI via a URL (#521) 2024-03-12 16:51:41 +11:00
routes DEV: Move admin routes + templates to admin/assets/javascripts/ path (#545) 2024-03-25 09:58:53 +10:00
services FEATURE: AI Quick Semantic Search (#501) 2024-03-08 13:02:50 -03:00
templates DEV: Move admin routes + templates to admin/assets/javascripts/ path (#545) 2024-03-25 09:58:53 +10:00
admin-discourse-ai-plugin-route-map.js FEATURE: Improve admin plugin UI and use new plugins show route (#512) 2024-03-21 14:29:56 +10:00
admin-discourse-ai-route-map.js FEATURE: Expose sentiment classifications via the admin dashboard. (#284) 2023-11-08 10:50:37 -03:00
discourse-ai-shared-conversation-show-route-map.js FEATURE: Share conversations with AI via a URL (#521) 2024-03-12 16:51:41 +11:00