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

Docs: Handle Throwing Expression in SpeziLLMOpenAI.md's LLMOpenAIDemo Example #61

Merged
merged 9 commits into from
Aug 19, 2024

Conversation

paulhdk
Copy link
Contributor

@paulhdk paulhdk commented Aug 16, 2024

Handle Throwing Expression in SpeziLLMOpenAI.md's LLMOpenAIDemo Example

♻️ Current situation & Problem

After copying a code example from the SpeziLLM documentation, I noticed that ...

  • a throwing expression wasn’t being handled. To make life eseier for future readers, add a simple do … catch for handling any exceptions that may be thrown. Also, happy to take suggestions for a more elegant way to do this!
  • some imports were missing. To make life eseier for future readers, add the missing imports. I hope I didn’t miss any.
  • I was getting an error around the use of @EnvironmentObject. Fix the error by substituting @EnvironmentObject with @Environment, which is also in line with the code in TestApp.

⚙️ Release Notes

  • Update documentation

📚 Documentation

  • Update Documentation

📝 Code of Conduct & Contributing Guidelines

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

Copy link
Member

@PSchmiedmayer PSchmiedmayer left a 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.

README.md Outdated Show resolved Hide resolved
Copy link
Member

@PSchmiedmayer PSchmiedmayer left a 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!

@PSchmiedmayer PSchmiedmayer merged commit e53bc15 into StanfordSpezi:main Aug 19, 2024
15 of 16 checks passed
@paulhdk paulhdk deleted the for-try-awwait-throws branch August 19, 2024 20:00
PSchmiedmayer added a commit to StanfordSpezi/SpeziViews that referenced this pull request Aug 21, 2024
# 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]>
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
Archived in project
Development

Successfully merging this pull request may close these issues.

2 participants