Skip to content

Commit

Permalink
Merge pull request #90 from merefield/basic_bot_vision_model_selectio…
Browse files Browse the repository at this point in the history
…n_fix

FIX: basic mode was calling gpt 4 turbo even if vision was off
  • Loading branch information
merefield committed Apr 29, 2024
2 parents 84e5bfc + b3b09a7 commit f97f047
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion config/locales/server.en.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ en:
chatbot_open_ai_model_custom_api_type: "Fill in 'azure' if you use Azure OpenAI, otherwise will use Open AI"
chatbot_open_ai_model: "(UNLESS CUSTOM) The model to be accessed. More on supported models at <a target='_blank' rel='noopener' href='https://platform.openai.com/docs/models/overview'>OpenAI: Model overview</a>"
chatbot_support_vision: "(EXPERIMENTAL) Bot 'Vision': support sharing of images with bot so you can ask it to describe them. Images must be uploaded to forum and not hotlinked and in RAG mode bot can only see images in current Post it's responding to. Requires compatible model to be selected. 'false' switches vision off, 'directly' will share images potentially on every call, 'via_function' will only share images when requested by a function which might turn out to be cheaper if main model is older generation"
chatbot_open_ai_vision_model: "(EXPERIMENTAL) Open AI Vision model used when 'via_function' option is selected"
chatbot_open_ai_vision_model: "(EXPERIMENTAL) Open AI Vision model used when 'via_function' or 'directly' options are selected. Used for all interaction if 'directly' is set, overriding all other model settings - caution: this will be expensive!"
chatbot_reply_job_time_delay: 'Number of seconds before reply job is run. This helps prevent rate limits being hit and discourages spamming.'
chatbot_include_whispers_in_post_history: "Include content of whispers in Post history bot sees (careful!)"
chatbot_max_look_behind: "Maximum number of Posts or Chat Messages bot will consider as prompt for completion, the more the more impressive may be its response, but the more costly the interaction will be."
Expand Down
2 changes: 1 addition & 1 deletion lib/discourse_chatbot/bots/open_ai_bot_base.rb
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ def initialize(opts)
end

@model_name =
opts[:chatbot_bot_type] != "RAG" && SiteSetting.chatbot_support_vision ? SiteSetting.chatbot_open_ai_vision_model :
SiteSetting.chatbot_support_vision == "directly" ? SiteSetting.chatbot_open_ai_vision_model :
case opts[:trust_level]
when TRUST_LEVELS[0], TRUST_LEVELS[1], TRUST_LEVELS[2]
SiteSetting.send("chatbot_open_ai_model_custom_" + opts[:trust_level] + "_trust") ?
Expand Down
2 changes: 1 addition & 1 deletion plugin.rb
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# frozen_string_literal: true
# name: discourse-chatbot
# about: a plugin that allows you to have a conversation with a configurable chatbot in Discourse Chat, Topics and Private Messages
# version: 0.9.17
# version: 0.9.18
# authors: merefield
# url: https://github.com/merefield/discourse-chatbot

Expand Down

0 comments on commit f97f047

Please sign in to comment.