StanfordBDHG / HealthGPT

Query your Apple Health data with natural language 💬 🩺
MIT License
1.65k stars 150 forks source link

Use SpeziML package for OpenAI interface #31

Closed dguo8412 closed 10 months ago

dguo8412 commented 1 year ago

Use SpeziML package for OpenAI interface

:recycle: Current situation & Problem

The application currently uses the https://github.com/MacPaw/OpenAI library to interface with OpenAI API. We have created our own library at https://github.com/StanfordSpezi/SpeziML.

:bulb: Proposed solution

Migrate all of our files to the SpeziML framework. Resolves #28

:gear: Release Notes

Testing

Need guidance on creating tests.

Reviewer Nudging

Code of Conduct & Contributing Guidelines

By submitting creating this pull request, you agree to follow our Code of Conduct and Contributing Guidelines:

PSchmiedmayer commented 1 year ago

@dguo8412 @rhea-mal Thank you for the PR and the improvements! 🚀

Please share any issues or challenges that you currently have with the PR so we can discuss them tomorrow.

It would also be great if you can ensure that

  1. the PR builds in its current state (https://github.com/StanfordBDHG/HealthGPT/actions/runs/5386244953/jobs/9776083630?pr=31)
  2. ... and all SwiftLint errors are resolved: https://github.com/StanfordBDHG/HealthGPT/actions/runs/5386244953/jobs/9776083740?pr=31

... to keep the PR in a clean state.

codecov[bot] commented 11 months ago

Codecov Report

Merging #31 (cbe53bc) into main (7f3920a) will increase coverage by 21.39%. The diff coverage is 62.00%.

:exclamation: Current head cbe53bc differs from pull request most recent head 5b9319c. Consider uploading reports for the commit 5b9319c to get more accurate results

Impacted file tree graph

@@             Coverage Diff             @@
##             main      #31       +/-   ##
===========================================
+ Coverage   63.11%   84.49%   +21.39%     
===========================================
  Files          29       21        -8     
  Lines        1011      722      -289     
===========================================
- Hits          638      610       -28     
+ Misses        373      112      -261     
Files Changed Coverage Δ
HealthGPT/HealthGPT/SettingsView.swift 0.00% <0.00%> (ø)
HealthGPT/HealthGPT/HealthDataInterpreter.swift 42.60% <42.60%> (ø)
HealthGPT/HealthGPT/HealthGPTView.swift 79.07% <78.58%> (+4.07%) :arrow_up:
HealthGPT/HealthGPTAppDelegate.swift 100.00% <100.00%> (ø)
HealthGPT/Onboarding/Disclaimer.swift 91.18% <100.00%> (ø)
HealthGPT/Onboarding/OnboardingFlow.swift 89.29% <100.00%> (+1.79%) :arrow_up:
HealthGPTUITests/HealthGPTUITests.swift 93.51% <100.00%> (ø)

... and 4 files with indirect coverage changes


Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 7f3920a...5b9319c. Read the comment docs.

PSchmiedmayer commented 11 months ago

@dguo8412 Thank you for making some progress in the PR! Let me know Ince you are at a good state where the checks are passing and you want me to review the PR 🚀

dguo8412 commented 11 months ago

@dguo8412 Thank you for making some progress in the PR! Let me know Ince you are at a good state where the checks are passing and you want me to review the PR 🚀

Will do! The checks were all passing until I rebased and did some commit fixups. I will try to debug later and upload a finished version.

dguo8412 commented 11 months ago

Hey Paul, everything should be good. Can you do a final review before I squash and merge?

PSchmiedmayer commented 11 months ago

@dguo8412 You can use the auto-merge function to automatically merge the PR once all the checks have passed once you addressed all the suggestions and resolved the conversations so you don't have to wait until all the builds are done and passed and then manually merge the PR: https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/incorporating-changes-from-a-pull-request/automatically-merging-a-pull-request