StanfordSpezi / SpeziLLM

A module enabling the integration of Large Language Models (LLMs) with the Spezi Ecosystem
https://swiftpackageindex.com/StanfordSpezi/SpeziLLM/documentation
MIT License
127 stars 12 forks source link

SpeziLLM Remote OpenAI integration #41

Closed philippzagar closed 9 months ago

philippzagar commented 9 months ago

SpeziLLM Remote OpenAI integration

:recycle: Current situation & Problem

Currently, the module provides basic OpenAI integration, however, not in the SpeziLLM ecosystem.

:gear: Release Notes

:books: Documentation

Added in-line docs + DocC articles + README

:white_check_mark: Testing

Wrote basic UI test cases, manual testing

:pencil: Code of Conduct & Contributing Guidelines

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

codecov[bot] commented 9 months ago

Codecov Report

Attention: 433 lines in your changes are missing coverage. Please review.

Comparison is base (3dd6610) 24.66% compared to head (3fce5d4) 20.57%.

Additional details and impacted files [![Impacted file tree graph](https://app.codecov.io/gh/StanfordSpezi/SpeziLLM/pull/41/graphs/tree.svg?width=650&height=150&src=pr&token=pptLyqtoNR&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=StanfordSpezi)](https://app.codecov.io/gh/StanfordSpezi/SpeziLLM/pull/41?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=StanfordSpezi) ```diff @@ Coverage Diff @@ ## main #41 +/- ## ========================================== - Coverage 24.66% 20.57% -4.08% ========================================== Files 27 36 +9 Lines 1225 1561 +336 ========================================== + Hits 302 321 +19 - Misses 923 1240 +317 ``` | [Files](https://app.codecov.io/gh/StanfordSpezi/SpeziLLM/pull/41?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=StanfordSpezi) | Coverage Δ | | |---|---|---| | [Sources/SpeziLLM/LLMState.swift](https://app.codecov.io/gh/StanfordSpezi/SpeziLLM/pull/41?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=StanfordSpezi#diff-U291cmNlcy9TcGV6aUxMTS9MTE1TdGF0ZS5zd2lmdA==) | `52.64% <100.00%> (+52.64%)` | :arrow_up: | | [Sources/SpeziLLM/Mock/LLMMock.swift](https://app.codecov.io/gh/StanfordSpezi/SpeziLLM/pull/41?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=StanfordSpezi#diff-U291cmNlcy9TcGV6aUxMTS9Nb2NrL0xMTU1vY2suc3dpZnQ=) | `100.00% <100.00%> (ø)` | | | [...ces/SpeziLLM/Tasks/LLMRunnerSetupTaskBuilder.swift](https://app.codecov.io/gh/StanfordSpezi/SpeziLLM/pull/41?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=StanfordSpezi#diff-U291cmNlcy9TcGV6aUxMTS9UYXNrcy9MTE1SdW5uZXJTZXR1cFRhc2tCdWlsZGVyLnN3aWZ0) | `100.00% <100.00%> (+65.39%)` | :arrow_up: | | [...ocal/Configuration/LLMLocalContextParameters.swift](https://app.codecov.io/gh/StanfordSpezi/SpeziLLM/pull/41?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=StanfordSpezi#diff-U291cmNlcy9TcGV6aUxMTUxvY2FsL0NvbmZpZ3VyYXRpb24vTExNTG9jYWxDb250ZXh0UGFyYW1ldGVycy5zd2lmdA==) | `0.00% <ø> (ø)` | | | [...eziLLMLocal/Configuration/LLMLocalParameters.swift](https://app.codecov.io/gh/StanfordSpezi/SpeziLLM/pull/41?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=StanfordSpezi#diff-U291cmNlcy9TcGV6aUxMTUxvY2FsL0NvbmZpZ3VyYXRpb24vTExNTG9jYWxQYXJhbWV0ZXJzLnN3aWZ0) | `0.00% <ø> (ø)` | | | [...cal/Configuration/LLMLocalSamplingParameters.swift](https://app.codecov.io/gh/StanfordSpezi/SpeziLLM/pull/41?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=StanfordSpezi#diff-U291cmNlcy9TcGV6aUxMTUxvY2FsL0NvbmZpZ3VyYXRpb24vTExNTG9jYWxTYW1wbGluZ1BhcmFtZXRlcnMuc3dpZnQ=) | `0.00% <ø> (ø)` | | | [...penAI/Configuration/LLMOpenAIModelParameters.swift](https://app.codecov.io/gh/StanfordSpezi/SpeziLLM/pull/41?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=StanfordSpezi#diff-U291cmNlcy9TcGV6aUxMTU9wZW5BSS9Db25maWd1cmF0aW9uL0xMTU9wZW5BSU1vZGVsUGFyYW1ldGVycy5zd2lmdA==) | `100.00% <100.00%> (ø)` | | | [Sources/SpeziLLMOpenAI/LLMOpenAITokenSaver.swift](https://app.codecov.io/gh/StanfordSpezi/SpeziLLM/pull/41?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=StanfordSpezi#diff-U291cmNlcy9TcGV6aUxMTU9wZW5BSS9MTE1PcGVuQUlUb2tlblNhdmVyLnN3aWZ0) | `100.00% <100.00%> (ø)` | | | [...I/Onboarding/LLMOpenAIAPITokenOnboardingStep.swift](https://app.codecov.io/gh/StanfordSpezi/SpeziLLM/pull/41?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=StanfordSpezi#diff-U291cmNlcy9TcGV6aUxMTU9wZW5BSS9PbmJvYXJkaW5nL0xMTU9wZW5BSUFQSVRva2VuT25ib2FyZGluZ1N0ZXAuc3dpZnQ=) | `100.00% <100.00%> (ø)` | | | [...enAI/Onboarding/LLMOpenAIModelOnboardingStep.swift](https://app.codecov.io/gh/StanfordSpezi/SpeziLLM/pull/41?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=StanfordSpezi#diff-U291cmNlcy9TcGV6aUxMTU9wZW5BSS9PbmJvYXJkaW5nL0xMTU9wZW5BSU1vZGVsT25ib2FyZGluZ1N0ZXAuc3dpZnQ=) | `100.00% <100.00%> (ø)` | | | ... and [16 more](https://app.codecov.io/gh/StanfordSpezi/SpeziLLM/pull/41?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=StanfordSpezi) | | ... and [3 files with indirect coverage changes](https://app.codecov.io/gh/StanfordSpezi/SpeziLLM/pull/41/indirect-changes?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=StanfordSpezi) ------ [Continue to review full report in Codecov by Sentry](https://app.codecov.io/gh/StanfordSpezi/SpeziLLM/pull/41?src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=StanfordSpezi). > **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=StanfordSpezi) > `Δ = absolute (impact)`, `ø = not affected`, `? = missing data` > Powered by [Codecov](https://app.codecov.io/gh/StanfordSpezi/SpeziLLM/pull/41?src=pr&el=footer&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=StanfordSpezi). Last update [3dd6610...3fce5d4](https://app.codecov.io/gh/StanfordSpezi/SpeziLLM/pull/41?src=pr&el=lastupdated&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=StanfordSpezi). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=StanfordSpezi).
philippzagar commented 9 months ago

@PSchmiedmayer As soon as https://github.com/StanfordSpezi/SpeziChat/pull/5 is merged and tagged, feel free to trigger another pipeline run (as the specified SpeziChat dependency isn't tagged yet to 0.1.2) and then merge the PR! 🚀

PSchmiedmayer commented 9 months ago

@philippzagar Sounds great; I just tagged the 0.1.2 release in Spezi Chat 🚀

philippzagar commented 9 months ago

@PSchmiedmayer Just triggered another pipeline run, thanks for tagging SpeziChat!