From 97c50b2957c20b411e417fabdf323b7d1af8d8a6 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)