generated from StanfordBDHG/SwiftPackageTemplate
-
-
Notifications
You must be signed in to change notification settings - Fork 19
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Structural improvements to SpeziLLM (#45)
# Structural improvements to SpeziLLM ## ♻️ Current situation & Problem As of now, when adjusting LLMonFHIR and SpeziFHIR, we noticed some structural limitations of the SpeziLLM library. ## ⚙️ Release Notes - Structural improvements to SpeziLLM, providing a different abstraction methodology for working with LLMs. ## 📚 Documentation Proper documentation is written for all components. ## ✅ Testing Proper manual testing as well as UI tests ## 📝 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).
- Loading branch information
1 parent
94c1f3b
commit 6892c5d
Showing
92 changed files
with
2,855 additions
and
1,556 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
// | ||
// This source file is part of the Stanford Spezi open-source project | ||
// | ||
// SPDX-FileCopyrightText: 2022 Stanford University and the project authors (see CONTRIBUTORS.md) | ||
// | ||
// SPDX-License-Identifier: MIT | ||
// | ||
|
||
import SpeziChat | ||
|
||
|
||
extension Chat { | ||
/// Creates a new `Chat` array with an arbitrary number of system messages. | ||
/// | ||
/// - Parameters: | ||
/// - systemMessages: `String`s that should be used as system messages. | ||
public init(systemMessages: [String]) { | ||
self = systemMessages.map { systemMessage in | ||
.init(role: .system, content: systemMessage) | ||
} | ||
} | ||
|
||
|
||
/// Resets the `Chat` array, deleting all persisted content. | ||
@MainActor | ||
public mutating func reset() { | ||
self = [] | ||
} | ||
} |
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.