Skip to content

Commit

Permalink
Merge branch 'dev/litellm-integration' of github.com:makeplane/plane …
Browse files Browse the repository at this point in the history
…into dev/litellm-integration
  • Loading branch information
akash-plane committed Dec 11, 2024
2 parents 22a99e8 + bcd37bc commit 6226613
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions apiserver/plane/app/views/external/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ def post(self, request, slug, project_id):
)

text, error = get_gpt_response(task, request.data.get("prompt", False), OPENAI_API_KEY, GPT_ENGINE)
if error:
if not text and error:
return Response(
{"error": "An internal error has occurred."},
status=status.HTTP_500_INTERNAL_SERVER_ERROR,
Expand Down Expand Up @@ -114,7 +114,7 @@ def post(self, request, slug):
)

text, error = get_gpt_response(task, request.data.get("prompt", False), OPENAI_API_KEY, GPT_ENGINE)
if error:
if not text and error:
return Response(
{"error": "An internal error has occurred."},
status=status.HTTP_500_INTERNAL_SERVER_ERROR,
Expand Down

0 comments on commit 6226613

Please sign in to comment.