mirror of
https://github.com/we-promise/sure.git
synced 2026-04-20 04:24:06 +00:00
Add OpenAI token configuration to self-hosting settings (#122)
* feat: add OpenAI settings partial
This commit is contained in:
@@ -88,7 +88,7 @@ class User < ApplicationRecord
|
||||
end
|
||||
|
||||
def ai_available?
|
||||
!Rails.application.config.app_mode.self_hosted? || ENV["OPENAI_ACCESS_TOKEN"].present?
|
||||
!Rails.application.config.app_mode.self_hosted? || ENV["OPENAI_ACCESS_TOKEN"].present? || Setting.openai_access_token.present?
|
||||
end
|
||||
|
||||
def ai_enabled?
|
||||
|
||||
Reference in New Issue
Block a user