Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add checks to verify message is not empty before querying OpenAI #7

Conversation

verovaleros
Copy link
Member

@verovaleros verovaleros commented Feb 23, 2024

Description

Fixes #5

It adds simple checks to ensure we are not querying OpenAI with empty messages. Messages can be empty, but the prompt is still sent; therefore, the cost of the query remains. If the messages are empty, then do not query at all.

Type of change

  • New feature (non-breaking change which adds functionality)

How Has This Been Tested?

  • Run py tests manually and all passed
  • Run automatic tests through GitHub CI

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings

@verovaleros verovaleros added the enhancement New feature or request label Feb 23, 2024
@verovaleros verovaleros added this to the v1.0.0 milestone Feb 23, 2024
@verovaleros verovaleros self-assigned this Feb 23, 2024
@verovaleros verovaleros enabled auto-merge (squash) February 23, 2024 18:08
@verovaleros verovaleros merged commit e0a9199 into main Feb 23, 2024
4 checks passed
@verovaleros verovaleros deleted the feat_add-check-to-verify-message-is-not-empty-before-querying-openai branch February 23, 2024 18:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[FEAT] Add check to verify message is not empty before querying OpenAI
1 participant