Commit Graph
95 Commits
Author SHA1 Message Date
Keegan George 35fbf5c836 FIX: Ask AI highlight fixes (#562) 2024-04-08 11:00:03 -07:00
Keegan George cb4d438506 UX: Highlight AI post helper selection (#520) 2024-04-04 11:35:01 -07:00
Keegan George fc6b937df7 FIX: Revert length issue (#556) 2024-04-04 10:28:17 -07:00
Sam 74c6725c75 FIX: avoid error when attempting to show ai helper to anon (#549)
Also adds an extra guard around ai helper context positioning.
2024-03-28 12:24:00 +11:00
Keegan GeorgeandRafael Silva b515b4f66d FEATURE: AI Quick Semantic Search (#501)
This PR adds AI semantic search to the search pop available on every page.

It depends on several new and optional settings, like per post embeddings and a reranker model, so this is an experimental endeavour.


---------

Co-authored-by: Rafael Silva <[email protected]>
2024-03-08 13:02:50 -03:00
Keegan George 9485f3110a UX: AI Helper positioning (#506) 2024-03-05 08:58:00 +11:00
Keegan George cee1b3d275 FIX: Backspace in composer custom prompt closes menu (#505) 2024-03-04 13:33:31 -08:00
Keegan George 6a30b06a55 DEV: Cancel popup should abort request (#497) 2024-02-28 13:32:45 -08:00
Kris 0f761234f9 UX: minor adjustments for image caption size, behavior (#484) 2024-02-22 12:31:25 -05:00
Kris d88dceb49d UX: minor image caption style adjustments (#482) 2024-02-20 17:59:59 -05:00
Rafael dos Santos Silva bfd4fafaec FIX: Caption was broken with multiple subsequent calls (#481) 2024-02-20 12:44:15 -03:00
Keegan GeorgeandRafael Silva a9b2d6a30a FEATURE: AI image caption (#470)
This PR adds a new feature where you can generate captions for images in the composer using AI.

---------

Co-authored-by: Rafael Silva <[email protected]>
2024-02-19 14:56:28 -03:00
Krzysztof Kotlarek dd6b073fc3 DEV: Make more group-based settings client: false (#474)
Affects the following settings:

ai_toxicity_groups_bypass
ai_helper_allowed_groups
ai_helper_custom_prompts_allowed_groups
post_ai_helper_allowed_groups

This turns off client: true for these group-based settings,
because there is no guarantee that the current user gets all
their group memberships serialized to the client. Better to check
server-side first.
2024-02-19 13:26:24 +11:00
Keegan George d66915ecc1 DEV: Make prompts available on CurrentUserSerializer (#472) 2024-02-16 10:57:14 -08:00
Rafael dos Santos Silva 33164a0fec FIX: Cleanup AI search results when a subsequent search happens (#469) 2024-02-14 11:08:41 +11:00
Keegan George 944fd6569c DEV: Add granular control for AI composer helper features (#458) 2024-02-01 14:58:04 -08:00
Keegan George 4c4b418cff DEV: Not necessary to show modal with errors (#444) 2024-01-26 09:54:43 -08:00
Jarek Radosz 5802cd1a0c DEV: Fix various typos (#434) 2024-01-19 12:51:26 +01:00
Jarek RadoszandKeegan George 6b8a57d957 DEV: Update linting (#423)
Co-authored-by: Keegan George <[email protected]>
2024-01-13 00:28:06 +01:00
Keegan George 1748ebcb8c DEV: Prevent HyDE search from being called multiple times (#422) 2024-01-12 11:48:07 -08:00
Keegan George 5c9b570562 FIX: Revert AI action not working in Firefox (#418)
* FIX: Revert AI action not working in Firefox

* Make it pretty 💄
2024-01-11 11:43:39 +11:00
Keegan George 9d8bbe32a9 FIX: AI Explain copy button not working (#415) 2024-01-10 10:41:48 -08:00
Keegan George 726cffc8af FIX: New illustrate post suggestions should be auto tracked (#412) 2024-01-10 09:04:10 -08:00
Keegan George 5f088b12a7 FIX: Prevent no results label from showing when untrue (#384) 2023-12-27 16:42:13 -08:00
Rafael dos Santos Silva 76f7940b55 Revert "FEATURE: User sentiment on profile summary page (#329)" (#383)
This reverts commit 71c5077228.
2023-12-28 11:01:57 +11:00
Keegan George cb325bb883 UX: Menu placement bottom for AI (#378) 2023-12-22 11:53:41 -08:00
Keegan George 8feb3ad4db FIX: Context menu should not appear if selected text is deleted (#374) 2023-12-20 10:50:17 -08:00
Keegan George ea116f91fc FIX: Undo issue (#372) 2023-12-20 10:46:22 -08:00
Keegan George 7b4710d5c9 FEATURE: Generate post illustrations (#367) 2023-12-19 11:17:34 -08:00
Keegan George ba09582d7c UX: Hide suggest edit button in fast edit when triggering from AI (#364) 2023-12-15 15:19:04 -08:00
Keegan George 19a2949914 UX: Improve focus state of post options item by making full width (#362) 2023-12-15 12:11:29 -08:00
Keegan George d674e47ca4 FEATURE: AI suggestion buttons in move-to-topic modal (#360) 2023-12-15 12:11:14 -08:00
Osama Sayegh 831559662e UX: Automatically detect text direction for AI generated text (#361) 2023-12-15 13:51:47 -03:00
Keegan George 408d9f68eb FEATURE: Proofread with post AI helper (#359) 2023-12-14 19:30:52 -08:00
Keegan George 74a7ac4a3d FEATURE: Add custom prompts to post helper options (#355)
* FEATURE: Add custom prompts to post helper options

* 💄Make pretty

* 💄Make pretty!
2023-12-14 13:47:20 -03:00
Keegan George 64587967c9 DEV: Cook streamed suggestion (#354) 2023-12-13 12:24:22 -08:00
6aaf1f002e FEATURE: Add streaming to post AI helper's explain option (#344)
Co-authored-by: Rafael dos Santos Silva <[email protected]>
Co-authored-by: Roman Rizzi <[email protected]>
2023-12-12 09:28:39 -08:00
Jordan Vidrine 92286ad0c4 UX: Add title to button (#334) 2023-12-05 14:33:10 -06:00
Rafael dos Santos SilvaandKeegan George 71c5077228 FEATURE: User sentiment on profile summary page (#329)
* FEATURE: User sentiment on profile summary page

This introduces a new user stat in a user profile summary page.

It will show either neutral/positive/negative according to the dominant
sentiment in the user last interactions.

The user-stat widget is only rendered for staff.


Co-authored-by: Keegan George <[email protected]>
2023-12-04 18:17:43 -03:00
Sam 7f36175ad3 FIX: allow selection of persona when list gets too long (#327) 2023-12-01 08:29:10 +11:00
Jarek Radosz f973fafc33 DEV: Update linting (#326) 2023-11-29 23:01:48 +01:00
Keegan George 02f7b368a1 FIX: Too many requests from single search (#318) 2023-11-27 17:51:42 -08:00
Keegan George c7665e891b A11Y: Add title attribute to sparkles icon for AI search results (#317) 2023-11-27 14:25:33 -08:00
Keegan George d493880c0a FIX: Incorrect sort order label appearing when it should not (#315) 2023-11-27 17:27:22 -03:00
SamandMartin Brennan dff9f33a97 FEATURE: DALL-E-3 persona for image generation (#311)
* FIX: no selected persona should pick first prioritized one

Previously we were looking at `.personaId` but there is only an
id attribute so it failed

* FEATURE: new DALL-E-3 persona

This persona generates images using DALL-E-3 API and is enabled
by default

Keep in mind that we are still waiting on seeds/gen_id so we can
not retain style consistently between turns.

This will change as soon as a new Open AI API provides the missing
parameters

Co-authored-by: Martin Brennan <[email protected]>
2023-11-24 18:08:08 +11:00
Keegan George df8804afcd DEV: Only allow semantic search on "Relevance" sort mode (#306) 2023-11-23 11:30:17 -08:00
Keegan George 432590f8d9 DEV: Run AI search before submit if query params present (#303) 2023-11-21 16:51:08 -08:00
Keegan George c55014839f FIX: more results not appearing on scroll (#302) 2023-11-21 09:46:37 -08:00
SamandMartin Brennan 98c89953d3 FEATURE: remember previously selected persona (#299)
People tend to keep to 1 persona when working with the bot,
this adds local browser memory for the last persona you interacted
with so you do not need to select it over and over again.

This is per browser, not per user memory.

Also... clean up tests so they do not need to require stubs which
were breaking the build

---------

Co-authored-by: Martin Brennan <[email protected]>
2023-11-21 17:02:27 +10:00
5b5edb22c6 FEATURE: UI to update ai personas on admin page (#290)
Introduces a UI to manage customizable personas (admin only feature)

Part of the change was some extensive internal refactoring:

- AIBot now has a persona set in the constructor, once set it never changes
- Command now takes in bot as a constructor param, so it has the correct persona and is not generating AIBot objects on the fly
- Added a .prettierignore file, due to the way ALE is configured in nvim it is a pre-req for prettier to work
- Adds a bunch of validations on the AIPersona model, system personas (artist/creative etc...) are all seeded. We now ensure
- name uniqueness, and only allow certain properties to be touched for system personas.
- (JS note) the client side design takes advantage of nested routes, the parent route for personas gets all the personas via this.store.findAll("ai-persona") then child routes simply reach into this model to find a particular persona.
- (JS note) data is sideloaded into the ai-persona model the meta property supplied from the controller, resultSetMeta
- This removes ai_bot_enabled_personas and ai_bot_enabled_chat_commands, both should be controlled from the UI on a per persona basis
- Fixes a long standing bug in token accounting ... we were doing to_json.length instead of to_json.to_s.length
- Amended it so {commands} are always inserted at the end unconditionally, no need to add it to the template of the system message as it just confuses things
- Adds a concept of required_commands to stock personas, these are commands that must be configured for this stock persona to show up.
- Refactored tests so we stop requiring inference_stubs, it was very confusing to need it, added to plugin.rb for now which at least is clearer
- Migrates the persona selector to gjs

---------

Co-authored-by: Joffrey JAFFEUX <[email protected]>
Co-authored-by: Martin Brennan <[email protected]>
2023-11-21 16:56:43 +11:00