Logo
Explore Help
Sign In
discourse/discourse-ai
1
0
Fork 0
You've already forked discourse-ai
mirror of https://github.com/discourse/discourse-ai.git synced 2025-07-09 15:43:28 +00:00
Code Issues Packages Projects Releases Wiki Activity
discourse-ai/db/migrate/20240503042558_add_chat_message_custom_prompt.rb

13 lines
349 B
Ruby
Raw Normal View History

FEATURE: support Chat with AI Persona via a DM (#488) Add support for chat with AI personas - Allow enabling chat for AI personas that have an associated user - Add new setting `allow_chat` to AI persona to enable/disable chat - When a message is created in a DM channel with an allowed AI persona user, schedule a reply job - AI replies to chat messages using the persona's `max_context_posts` setting to determine context - Store tool calls and custom prompts used to generate a chat reply on the `ChatMessageCustomPrompt` table - Add tests for AI chat replies with tools and context At the moment unlike posts we do not carry tool calls in the context. No @mention support yet for ai personas in channels, this is future work
2024-05-06 09:49:02 +10:00
# frozen_string_literal: true
class AddChatMessageCustomPrompt < ActiveRecord::Migration[7.0]
def change
create_table :chat_message_custom_prompts do |t|
t.bigint :message_id, null: false
t.json :custom_prompt, null: false
t.timestamps
end
add_index :chat_message_custom_prompts, :message_id, unique: true
end
end
Reference in New Issue Copy Permalink
Powered by Gitea Version: 1.23.8 Page: 48ms Template: 2ms
English
Bahasa Indonesia Deutsch English Español Français Gaeilge Italiano Latviešu Magyar nyelv Nederlands Polski Português de Portugal Português do Brasil Suomi Svenska Türkçe Čeština Ελληνικά Български Русский Українська فارسی മലയാളം 日本語 简体中文 繁體中文(台灣) 繁體中文(香港) 한국어
Licenses API