mirror of
https://github.com/discourse/discourse-ai.git
synced 2025-02-07 12:08:13 +00:00
* FEATURE: Less friction for starting a conversation with an AI bot. This PR adds a new header icon as a shortcut to start a conversation with one of our AI Bots. After clicking and selecting one from the dropdown menu, we'll open the composer with some fields already filled (recipients and title). If you leave the title as is, we'll queue a job after five minutes to update it using a bot suggestion. * Update assets/javascripts/initializers/ai-bot-replies.js Co-authored-by: Rafael dos Santos Silva <xfalcox@gmail.com> * Update assets/javascripts/initializers/ai-bot-replies.js Co-authored-by: Rafael dos Santos Silva <xfalcox@gmail.com> --------- Co-authored-by: Rafael dos Santos Silva <xfalcox@gmail.com>
24 lines
799 B
Ruby
24 lines
799 B
Ruby
# frozen_string_literal: true
|
|
|
|
DiscourseAi::Engine.routes.draw do
|
|
scope module: :ai_helper, path: "/ai-helper", defaults: { format: :json } do
|
|
get "prompts" => "assistant#prompts"
|
|
post "suggest" => "assistant#suggest"
|
|
end
|
|
|
|
scope module: :embeddings, path: "/embeddings", defaults: { format: :json } do
|
|
get "semantic-search" => "embeddings#search"
|
|
end
|
|
|
|
scope module: :summarization, path: "/summarization", defaults: { format: :json } do
|
|
post "summary" => "summary#show"
|
|
end
|
|
|
|
scope module: :ai_bot, path: "/ai-bot", defaults: { format: :json } do
|
|
post "post/:post_id/stop-streaming" => "bot#stop_streaming_response"
|
|
get "bot-username" => "bot#show_bot_username"
|
|
end
|
|
end
|
|
|
|
Discourse::Application.routes.append { mount ::DiscourseAi::Engine, at: "discourse-ai" }
|