2023-03-15 16:02:20 -04:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
|
|
|
DiscourseAi::Engine.routes.draw do
|
|
|
|
scope module: :ai_helper, path: "/ai-helper", defaults: { format: :json } do
|
2023-03-17 14:14:19 -04:00
|
|
|
get "prompts" => "assistant#prompts"
|
2023-03-15 16:02:20 -04:00
|
|
|
post "suggest" => "assistant#suggest"
|
2023-09-01 20:10:58 -04:00
|
|
|
post "suggest_title" => "assistant#suggest_title"
|
|
|
|
post "suggest_category" => "assistant#suggest_category"
|
|
|
|
post "suggest_tags" => "assistant#suggest_tags"
|
2023-09-14 11:53:44 -04:00
|
|
|
post "suggest_thumbnails" => "assistant#suggest_thumbnails"
|
2023-10-23 10:41:36 -04:00
|
|
|
post "explain" => "assistant#explain"
|
2023-03-15 16:02:20 -04:00
|
|
|
end
|
2023-03-31 14:29:56 -04:00
|
|
|
|
|
|
|
scope module: :embeddings, path: "/embeddings", defaults: { format: :json } do
|
|
|
|
get "semantic-search" => "embeddings#search"
|
|
|
|
end
|
2023-04-04 10:24:09 -04:00
|
|
|
|
2023-05-05 14:28:31 -04:00
|
|
|
scope module: :ai_bot, path: "/ai-bot", defaults: { format: :json } do
|
|
|
|
post "post/:post_id/stop-streaming" => "bot#stop_streaming_response"
|
2023-05-16 13:38:21 -04:00
|
|
|
get "bot-username" => "bot#show_bot_username"
|
2023-05-05 14:28:31 -04:00
|
|
|
end
|
2023-03-15 16:02:20 -04:00
|
|
|
end
|
|
|
|
|
2023-06-16 06:32:54 -04:00
|
|
|
Discourse::Application.routes.draw { mount ::DiscourseAi::Engine, at: "discourse-ai" }
|