discourse-ai/lib
Roman Rizzi f9d7d7f5f0
DEV: AI bot migration to the Llm pattern. (#343)
* DEV: AI bot migration to the Llm pattern.

We added tool and conversation context support to the Llm service in discourse-ai#366, meaning we met all the conditions to migrate this module.

This PR migrates to the new pattern, meaning adding a new bot now requires minimal effort as long as the service supports it. On top of this, we introduce the concept of a "Playground" to separate the PM-specific bits from the completion, allowing us to use the bot in other contexts like chat in the future. Commands are called tools, and we simplified all the placeholder logic to perform updates in a single place, making the flow more one-wayish.

* Followup fixes based on testing

* Cleanup unused inference code

* FIX: text-based tools could be in the middle of a sentence

* GPT-4-turbo support

* Use new LLM API
2024-01-04 10:44:07 -03:00
..
ai_bot DEV: AI bot migration to the Llm pattern. (#343) 2024-01-04 10:44:07 -03:00
ai_helper FIX: AI helper not working correctly with mixtral (#399) 2024-01-04 09:53:47 -03:00
automation FIX: AI helper not working correctly with mixtral (#399) 2024-01-04 09:53:47 -03:00
completions DEV: AI bot migration to the Llm pattern. (#343) 2024-01-04 10:44:07 -03:00
database DEV: port directory structure to Zeitwerk (#319) 2023-11-29 15:17:46 +11:00
embeddings FIX: AI helper not working correctly with mixtral (#399) 2024-01-04 09:53:47 -03:00
inference DEV: AI bot migration to the Llm pattern. (#343) 2024-01-04 10:44:07 -03:00
nsfw DEV: port directory structure to Zeitwerk (#319) 2023-11-29 15:17:46 +11:00
sentiment Revert "FEATURE: User sentiment on profile summary page (#329)" (#383) 2023-12-28 11:01:57 +11:00
summarization FIX: AI helper not working correctly with mixtral (#399) 2024-01-04 09:53:47 -03:00
tasks/modules FEATURE: Per post embeddings (#387) 2023-12-29 12:28:45 -03:00
tokenizer Mixtral (#376) 2023-12-26 14:49:55 -03:00
toxicity DEV: port directory structure to Zeitwerk (#319) 2023-11-29 15:17:46 +11:00
utils FEATURE: DNS SRV support for TEI (#363) 2023-12-18 13:21:21 -03:00
automation.rb FEATURE: LLM based peroidical summary report (#357) 2023-12-19 12:04:15 +11:00
chat_message_classificator.rb DEV: port directory structure to Zeitwerk (#319) 2023-11-29 15:17:46 +11:00
classificator.rb DEV: port directory structure to Zeitwerk (#319) 2023-11-29 15:17:46 +11:00
engine.rb DEV: port directory structure to Zeitwerk (#319) 2023-11-29 15:17:46 +11:00
post_classificator.rb DEV: port directory structure to Zeitwerk (#319) 2023-11-29 15:17:46 +11:00