Commit Graph
428 Commits
Author SHA1 Message Date
Rafael dos Santos Silva 16d666fe69 FIX: Misconfigured OpenAI API for embeddings shouldn't spam logs (#440) 2024-01-24 15:57:18 -03:00
Rafael dos Santos Silva 04bc402aae FEATURE: Setting to control per post embeddings (#439)
* FEATURE: Setting to control per post embeddings
2024-01-23 22:09:27 -03:00
Discourse Translator Bot 797f5971b6 Update translations (#438) 2024-01-23 18:29:44 +01:00
Kris 900df4e8c8 UX: start progress dot animation instantly if it's the only content (#437) 2024-01-22 13:10:51 -05: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
Rafael dos Santos Silva d4e23e0df6 FIX: Don't try to generate embeddings of posts in deleted topics (#433) 2024-01-18 16:10:25 -03:00
Dax74 f65314bdab FIX: typo (#432) 2024-01-18 16:38:29 +01:00
Rafael dos Santos Silva c70f43f130 FIX: Truncate content for sentiment/toxicity classification (#431) 2024-01-17 15:17:58 -03:00
Roman Rizzi 5bdf3dc1f4 DEV: Stop using shared_examples for endpoint specs (#430) 2024-01-17 15:08:49 -03:00
Gerhard Schlager 8eb1e851fc DEV: Spec didn't work correctly with translations (#429) 2024-01-16 16:28:24 +01:00
Discourse Translator Bot 14020e7095 Update translations (#428) 2024-01-16 14:54:42 +01:00
Sam 370074ef21 FIX: always ensure #generate gets a valid input (#427)
We were not validating input for generate leading to 2 tests not
failing correctly despite functionality being broken.

This ensures that input is validated,and in turn fixes the broken
specs
2024-01-16 15:21:58 +11:00
Sam 05d8b021f1 FIX: scrub invalid prompts when truncating (#426)
When you trim a prompt we never want to have a state where there
is a "tool" reply without a corresponding tool call, it makes no
sense

Also

- GPT-4-Turbo is 128k, fix that
- Claude was not preserving username in prompt
- We were throwing away unicode usernames instead of adding to
message
2024-01-16 13:48:00 +11:00
Roman Rizzi ff4da6ace8 FIX: Clean unicode usernames when adding messages through prompt's contrstuctor (#425) 2024-01-15 12:01:40 -03:00
Ted Johansson 37e6ac169e DEV: Update test setup to work with auto groups (#424)
We're updating core to change TL based access settings to be group based. This requires some updates of tests to work correctly. (The existing test setup gives false positives.)
2024-01-15 20:18:56 +08: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
Roman RizziandSam Saffron 04eae76f68 REFACTOR: Represent generic prompts with an Object. (#416)
* REFACTOR: Represent generic prompts with an Object.

* Adds a bit more validation for clarity

* Rewrite bot title prompt and fix quirk handling

---------

Co-authored-by: Sam Saffron <[email protected]>
2024-01-12 14:36:44 -03:00
Rafael dos Santos Silva 705ef986b4 FIX: Set ivfflat.probes using topic count, not post count (#421)
Fixes a regression from 140359c which caused we to set this globally based on post count, rendering the cost of an index scan on the topics table too high and making the planner, correctly, not use the index anymore.

Hopefully https://github.com/pgvector/pgvector/issues/235 lands soon.
2024-01-12 11:20:23 -03:00
Rafael dos Santos Silva 3be76ebd7a FEATURE: Move the default embeddings model to bge-large-en (#417) 2024-01-11 14:16:25 -03: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
Martin Brennan 37b957dbbb DEV: Fix SemanticRelated module load error (#419)
Followup 2636efcd1b,
whenever ruby code was changed locally this would break
module loading, giving an "uninitialized constant
DiscourseAi::Embeddings::EntryPoint::SemanticRelated" error.
2024-01-11 13:52:50 +10: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
Rafael dos Santos Silva 8fcba12fae FEATURE: Support for SRV records for Discourse services (#414)
This allows admins to configure services with multiple backends using DNS SRV records. This PR also adds support for shared secret auth via headers for TEI and vLLM endpoints, so they are inline with the other ones.
2024-01-10 19:23:07 -03: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
Roman Rizzi abde82c1f3 FIX: Use claude-2.1 to enable system prompts (#411) 2024-01-09 14:10:20 -03:00
Discourse Translator Bot 0f4e7723d7 Update translations (#410) 2024-01-09 15:09:46 +01:00