From f7461af3f544926a9727ffedebd2cd319bd3f158 Mon Sep 17 00:00:00 2001 From: Nikhil <118773738+pablohashescobar@users.noreply.github.com> Date: Mon, 20 Nov 2023 16:03:31 +0530 Subject: [PATCH] dev: open ai configuration (#2807) --- apiserver/plane/app/views/config.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/apiserver/plane/app/views/config.py b/apiserver/plane/app/views/config.py index 4a6b05859..411f9c5dd 100644 --- a/apiserver/plane/app/views/config.py +++ b/apiserver/plane/app/views/config.py @@ -92,4 +92,13 @@ class ConfigurationEndpoint(BaseAPIView): ) ) + # Open AI settings + data["has_openai_configured"] = bool( + get_configuration_value( + instance_configuration, + "OPENAI_API_KEY", + os.environ.get("OPENAI_API_KEY", None), + ) + ) + return Response(data, status=status.HTTP_200_OK)