Commit Graph
144 Commits
Author SHA1 Message Date
SamandJoffrey JAFFEUX 77cf9e2cff FIX: system persona non English save, missing bot pms
- FIX: only update system attributes when updating system persona
- FIX: update participant count by hand so bot messages show in inbox
 

Co-authored-by: Joffrey JAFFEUX <[email protected]>
2024-03-04 09:56:59 +11:00
Sam 59bab2bba3 FIX: stream messages when directly PMing a persona (#500)
previous to this fix we did not consider personas a bot in the
front end
2024-03-01 07:53:42 +11:00
Keegan George 6a30b06a55 DEV: Cancel popup should abort request (#497) 2024-02-28 13:32:45 -08:00
Keegan George a1b607db80 FIX: Composer service call breaking shared edits (#494) 2024-02-28 10:13:46 +11:00
Keegan George 0596ce41fe DEV: Auto save caption on mobile view (#486) 2024-02-23 10:06:39 -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
Sam becbe01f68 FIX: unable to share conversations with persona user (#479)
Persona users are still bots, but we were not properly accounting
for it and share icon was not showing up.

This depends on a core change that adds .topic to transformed posts
2024-02-20 16:16:23 +11:00
Rafael dos Santos Silva cf19ce0d72 FEATURE: Handle secure uploads in image caption (#476) 2024-02-19 18:08:19 -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
SamandMartin Brennan 3a8d95f6b2 FEATURE: mentionable personas and random picker tool, context limits (#466)
1. Personas are now optionally mentionable, meaning that you can mention them either from public topics or PMs
       - Mentioning from PMs helps "switch" persona mid conversation, meaning if you want to look up sites setting you can invoke the site setting bot, or if you want to generate an image you can invoke dall e
        - Mentioning outside of PMs allows you to inject a bot reply in a topic trivially
     - We also add the support for max_context_posts this allow you to limit the amount of context you feed in, which can help control costs

2. Add support for a "random picker" tool that can be used to pick random numbers 

3. Clean up routing ai_personas -> ai-personas

4. Add Max Context Posts so users can control how much history a persona can consume (this is important for mentionable personas) 

Co-authored-by: Martin Brennan <[email protected]>
2024-02-15 16:37:59 +11: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
Roman Rizzi 8bd8280427 FIX: Hide related topics when module is disabled (#461) 2024-02-05 11:45:24 -03:00
Sam a3c827efcc FEATURE: allow personas to supply top_p and temperature params (#459)
* FEATURE: allow personas to supply top_p and temperature params

Code assistance generally are more focused at a lower temperature
This amends it so SQL Helper runs at 0.2 temperature vs the more
common default across LLMs of 1.0.

Reduced temperature leads to more focused, concise and predictable
answers for the SQL Helper

* fix tests

* This is not perfect, but far better than what we do today

Instead of fishing for

1. Draft sequence
2. Draft body

We skip (2), this means the composer "only" needs 1 http request to
open, we also want to eliminate (1) but it is a bit of a trickier
core change, may figure out how to pull it off (defer it to first draft save)

Value of bot drafts < value of opening bot conversations really fast
2024-02-03 07:09:34 +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 4b4aedb50f DEV: Use the new controller/period component for the dashboard (#435) 2024-01-19 13:27:33 +01:00
Jarek Radosz 5802cd1a0c DEV: Fix various typos (#434) 2024-01-19 12:51:26 +01:00
Sam 825f01cfb2 FEATURE: even smoother streaming (#420)
Account properly for function calls, don't stream through <details> blocks
- Rush cooked content back to client
- Wait longer (up to 60 seconds) before giving up on streaming
- Clean up message bus channels so we don't have leftover data
- Make ai streamer much more reusable and much easier to read
- If buffer grows quickly, rush update so you are not artificially waiting
- Refine prompt interface
- Fix lost system message when prompt gets long
2024-01-15 18:51:14 +11: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
SamandMartin Brennan 8df966e9c5 FEATURE: smooth streaming of AI responses on the client (#413)
This PR introduces 3 things:

1. Fake bot that can be used on local so you can test LLMs, to enable on dev use:

SiteSetting.ai_bot_enabled_chat_bots = "fake"

2. More elegant smooth streaming of progress on LLM completion

This leans on JavaScript to buffer and trickle llm results through. It also amends it so the progress dot is much 
more consistently rendered

3. It fixes the Claude dialect 

Claude needs newlines **exactly** at the right spot, amended so it is happy 

---------

Co-authored-by: Martin Brennan <[email protected]>
2024-01-11 15:56:40 +11: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
Sam 05f7808057 FEATURE: more elegant progress (#409)
Previous to this change it was very hard to tell if completion was
stuck or not.

This introduces a "dot" that follows the completion and starts
flashing after 5 seconds.
2024-01-09 09:20:28 -03:00
Roman Rizzi 971e03bdf2 FEATURE: AI Bot Gemini support. (#402)
It also corrects the syntax around tool support, which was wrong.

Gemini doesn't want us to include messages about previous tool invocations, so I had to shuffle around some code to send the response it generated from those invocations instead. For this, I created the "multi_turn" context, which bundles all the context involved in the interaction.
2024-01-04 18:15:34 -03:00