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

Add Tool Interaction Views #18

Merged
merged 6 commits into from
Dec 12, 2024
Merged

Conversation

LeonNissen
Copy link
Contributor

@LeonNissen LeonNissen commented Dec 6, 2024

Add Tool Interaction Views

⚙️ Release Notes

With this release we add two new roles .assistantToolCall and .assistantToolResponse which will be visible in the chat.
This will provides the user with additional context about the underlying techniques/functions used during the chat.

📝 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 for the improvements; it does a non-breaking fix for what we want to do. In the long run, we should add a more extensible structure for custom views in the chat.

I would also defer to @philippzagar for some additional input.

Sources/SpeziChat/Models/ChatEntity.swift Show resolved Hide resolved
@PSchmiedmayer PSchmiedmayer added the enhancement New feature or request label Dec 9, 2024
Copy link

codecov bot commented Dec 9, 2024

Codecov Report

Attention: Patch coverage is 86.04651% with 12 lines in your changes missing coverage. Please review.

Project coverage is 80.69%. Comparing base (940ffbe) to head (8d7101a).
Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
Sources/SpeziChat/ToolInteractionView.swift 78.58% 12 Missing ⚠️
Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main      #18      +/-   ##
==========================================
+ Coverage   80.15%   80.69%   +0.54%     
==========================================
  Files          14       15       +1     
  Lines         675      756      +81     
==========================================
+ Hits          541      610      +69     
- Misses        134      146      +12     
Files with missing lines Coverage Δ
Sources/SpeziChat/ChatView+SpeechButton.swift 100.00% <ø> (ø)
Sources/SpeziChat/ChatView+SpeechOutput.swift 80.44% <ø> (ø)
Sources/SpeziChat/MessageInputView.swift 80.92% <ø> (ø)
Sources/SpeziChat/MessageView.swift 97.73% <100.00%> (+1.18%) ⬆️
Sources/SpeziChat/MessagesView.swift 89.19% <ø> (ø)
...ources/SpeziChat/Models/ChatEntity+Alignment.swift 100.00% <100.00%> (ø)
Sources/SpeziChat/Models/ChatEntity.swift 92.86% <100.00%> (+0.55%) ⬆️
Sources/SpeziChat/ToolInteractionView.swift 78.58% <78.58%> (ø)

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 940ffbe...8d7101a. Read the comment docs.

Copy link
Member

@philippzagar philippzagar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the PR @LeonNissen! 🚀
As @PSchmiedmayer already mentioned: We should definitely create a GitHub issue that lays out the future extension of Roles into a more generalized setup.
Also, please add a small UI test to keep up the coverage tests that are failing

Sources/SpeziChat/ChatView+SpeechButton.swift Show resolved Hide resolved
Sources/SpeziChat/MessageView.swift Outdated Show resolved Hide resolved
Sources/SpeziChat/Models/ChatEntity+Alignment.swift Outdated Show resolved Hide resolved
Sources/SpeziChat/Resources/Localizable.xcstrings Outdated Show resolved Hide resolved
Sources/SpeziChat/ToolInteractionView.swift Show resolved Hide resolved
@LeonNissen LeonNissen enabled auto-merge (squash) December 11, 2024 19:21
Copy link
Member

@philippzagar philippzagar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @LeonNissen for this PR and adding the tests, looks graet! 🚀

@philippzagar
Copy link
Member

philippzagar commented Dec 11, 2024

@LeonNissen Just noticed that the commits on this branch are not properly signed (seems like a mismatch of the mail addresses), therefore preventing a merge.
Two options: Either you retroactively sign the commits and force push to the respective branch, or @PSchmiedmayer quickly merges the PR by bypassing the merge checks.

@PSchmiedmayer PSchmiedmayer merged commit 2fa1a93 into main Dec 12, 2024
18 checks passed
@PSchmiedmayer PSchmiedmayer deleted the feature/add-tool-interaction branch December 12, 2024 00:32
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.

3 participants