guidance-ai / guidance

A guidance language for controlling large language models.
MIT License
18.8k stars 1.04k forks source link

[Refactor] Tidy up Grammarless and OpenAI #896

Closed riedgar-ms closed 3 months ago

riedgar-ms commented 3 months ago

Doing some general tidying up for Grammarless and OpenAI:

riedgar-ms commented 3 months ago

This is mainly because #894 is showing some weird errors in the Azure OpenAI tests, and I'm trying to narrow down the actual issue.

codecov-commenter commented 3 months ago

Codecov Report

Attention: Patch coverage is 51.72414% with 14 lines in your changes missing coverage. Please review.

Project coverage is 60.35%. Comparing base (0e0417e) to head (738ea8a).

Files Patch % Lines
guidance/models/_grammarless.py 44.00% 14 Missing :warning:

:exclamation: Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #896 +/- ## ========================================== + Coverage 56.99% 60.35% +3.36% ========================================== Files 64 64 Lines 4655 4651 -4 ========================================== + Hits 2653 2807 +154 + Misses 2002 1844 -158 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

Harsha-Nori commented 3 months ago

Do we want to be reviewing these Richard? I didn't have a chance to look before it got merged

riedgar-ms commented 3 months ago

Do we want to be reviewing these Richard? I didn't have a chance to look before it got merged

In general, yes. However, this particular PR was just type annotations, sorting of imports, and trimming of code which couldn't be working.