-
-
Notifications
You must be signed in to change notification settings - Fork 16
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
Docs: Handle Throwing Expression in SpeziLLMOpenAI.md's LLMOpenAIDemo Example #61
Docs: Handle Throwing Expression in SpeziLLMOpenAI.md's LLMOpenAIDemo Example #61
Conversation
…penAI' into for-try-awwait-throws
…or-environment' into for-try-awwait-throws
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you @paulhdk! I have merged the different documentation branches into a single one to group them & give a single review. It think it's fine to merge them in a single PR as they all aim for the same goal 👍
I only had one hint that we could point people to ViewState
to simply error handling. We don't need to add a tip for every element but we could add it in the inside code comment, e.g. like:
// Handle errors here. E.g., you can use `ViewState` and `viewStateAlert` from Spezi Views.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for the improvements; the changes look great!
# Docs: Add ViewState Documentation ## ♻️ Current situation & Problem As pointed out in StanfordSpezi/SpeziLLM#61 (comment) , `ViewState` was lacking documentation. ## ⚙️ Release Notes * Add `ViewState` documentation. ## 📚 Documentation . ## ✅ Testing . ## 📝 Code of Conduct & Contributing Guidelines By submitting creating this pull request, you agree to follow our [Code of Conduct](https://github.com/StanfordSpezi/.github/blob/main/CODE_OF_CONDUCT.md) and [Contributing Guidelines](https://github.com/StanfordSpezi/.github/blob/main/CONTRIBUTING.md): - [x] I agree to follow the [Code of Conduct](https://github.com/StanfordSpezi/.github/blob/main/CODE_OF_CONDUCT.md) and [Contributing Guidelines](https://github.com/StanfordSpezi/.github/blob/main/CONTRIBUTING.md). --------- Co-authored-by: Paul Schmiedmayer <[email protected]>
Handle Throwing Expression in SpeziLLMOpenAI.md's LLMOpenAIDemo Example
♻️ Current situation & Problem
After copying a code example from the SpeziLLM documentation, I noticed that ...
do … catch
for handling any exceptions that may be thrown. Also, happy to take suggestions for a more elegant way to do this!@EnvironmentObject
. Fix the error by substituting@EnvironmentObject
with@Environment
, which is also in line with the code inTestApp
.⚙️ Release Notes
📚 Documentation
📝 Code of Conduct & Contributing Guidelines
By submitting creating this pull request, you agree to follow our Code of Conduct and Contributing Guidelines: