diff --git a/doc/source/admin/galaxy_options.rst b/doc/source/admin/galaxy_options.rst index 52a3303f1647..cfa680d8ffa7 100644 --- a/doc/source/admin/galaxy_options.rst +++ b/doc/source/admin/galaxy_options.rst @@ -5373,6 +5373,15 @@ :Default: ``None`` :Type: str +~~~~~~~~~~~~~~~~~~ +``openai_model`` +~~~~~~~~~~~~~~~~~~ + +:Description: + Model for OpenAI (https://openai.com/) to enable the chat wizard +:Default: ``GPT-4o`` +:Type: str + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ``enable_tool_recommendations`` ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/lib/galaxy/config/sample/galaxy.yml.sample b/lib/galaxy/config/sample/galaxy.yml.sample index e0aa04c6c346..bb68212bb4e2 100644 --- a/lib/galaxy/config/sample/galaxy.yml.sample +++ b/lib/galaxy/config/sample/galaxy.yml.sample @@ -2884,6 +2884,9 @@ galaxy: # API key for OpenAI (https://openai.com/) to enable the wizard #openai_api_key: null + # Model for OpenAI (https://openai.com/) to enable the wizard + #openai_model: GPT-4o + # Allow the display of tool recommendations in workflow editor and # after tool execution. If it is enabled and set to true, please # enable 'tool_recommendation_model_path' as well diff --git a/lib/galaxy/config/schemas/config_schema.yml b/lib/galaxy/config/schemas/config_schema.yml index 50317e557dfc..acc43aaf59d4 100644 --- a/lib/galaxy/config/schemas/config_schema.yml +++ b/lib/galaxy/config/schemas/config_schema.yml @@ -3929,6 +3929,13 @@ mapping: desc: | OpenAI API key to enable the wizard. + openai_model: + type: str + default: GPT-4o + required: false + desc: | + OpenAI model to enable the wizard. + enable_tool_recommendations: type: bool default: false diff --git a/lib/galaxy/webapps/galaxy/api/chat.py b/lib/galaxy/webapps/galaxy/api/chat.py index 21f141c8ad2a..eae9f81ce573 100644 --- a/lib/galaxy/webapps/galaxy/api/chat.py +++ b/lib/galaxy/webapps/galaxy/api/chat.py @@ -67,7 +67,7 @@ def query(self, query: ChatPayload, trans: ProvidesUserContext = DependsOnTrans) log.debug(f"CHATGPTmessages: {messages}") response = openai.chat.completions.create( - model="gpt-4o", + model= config.openai_chat_model, messages=messages, ) print(response)