mirror of
https://github.com/discourse/discourse-ai.git
synced 2025-04-20 22:24:59 +00:00
20 lines
422 B
Ruby
20 lines
422 B
Ruby
|
# frozen_string_literal: true
|
||
|
|
||
|
module DiscourseAi
|
||
|
module AiBot
|
||
|
class BotController < ::ApplicationController
|
||
|
requires_plugin ::DiscourseAi::PLUGIN_NAME
|
||
|
requires_login
|
||
|
|
||
|
def stop_streaming_response
|
||
|
post = Post.find(params[:post_id])
|
||
|
guardian.ensure_can_see!(post)
|
||
|
|
||
|
Discourse.redis.del("gpt_cancel:#{post.id}")
|
||
|
|
||
|
render json: {}, status: 200
|
||
|
end
|
||
|
end
|
||
|
end
|
||
|
end
|