Skip to content

Commit

Permalink
Fix swiftlint warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
jdisho committed Jan 16, 2025
1 parent e3d5de9 commit febaddb
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 5 deletions.
8 changes: 8 additions & 0 deletions LLMonFHIR/FHIRInterpretation/InterpretationModelType.swift
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,15 @@
import struct OpenAI.Model
import enum SpeziLLMLocal.LLMLocalModel

/// A type that represents different kinds of interpretation models that can be used within the application.
/// `InterpretationModelType` provides a way to specify whether the interpretation
/// should be handled by OpenAI's or local LLM models.
public enum InterpretationModelType {
/// Represents an OpenAI-provided model.
/// - Parameter model: The specific OpenAI model to use for interpretation
case openAI(OpenAI.Model)

/// Represents a locally available LLM model.
/// - Parameter model: The specific local model to use for interpretation
case local(LLMLocalModel)
}
4 changes: 2 additions & 2 deletions LLMonFHIR/FHIRInterpretationModule.swift
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,9 @@ public class FHIRInterpretationModule: Module, DefaultInitializable {


/// - Warning: Ensure that passed LLM schema's don't contain a system prompt! This will be configured by the ``FHIRInterpretationModule``.
public init<SummaryLLM: LLMSchema, InterpretationLLM: LLMSchema>(
public init<SummaryLLM: LLMSchema, InterpretationLLM: LLMSchema>( // swiftlint:disable:this function_default_parameter_at_end

Check failure on line 46 in LLMonFHIR/FHIRInterpretationModule.swift

View workflow job for this annotation

GitHub Actions / SwiftLint / SwiftLint

Superfluous Disable Command Violation: SwiftLint rule 'function_default_parameter_at_end' did not trigger a violation in the disabled region; remove the disable command (superfluous_disable_command)
summaryLLMSchema: SummaryLLM = Defaults.llmSchema,
interpretationLLMSchema: InterpretationLLM = Defaults.llmSchema, // swiftlint:disable:this function_default_parameter_at_end
interpretationLLMSchema: InterpretationLLM = Defaults.llmSchema,

Check failure on line 48 in LLMonFHIR/FHIRInterpretationModule.swift

View workflow job for this annotation

GitHub Actions / SwiftLint / SwiftLint

Function Default Parameter at End Violation: Prefer to locate parameters with defaults toward the end of the parameter list (function_default_parameter_at_end)
multipleResourceInterpretationOpenAIModel: LLMOpenAIModelType, // swiftlint:disable:this identifier_name
resourceCountLimit: Int = 250,
allowedResourcesFunctionCallIdentifiers: Set<String>? = nil // swiftlint:disable:this discouraged_optional_collection
Expand Down
2 changes: 1 addition & 1 deletion LLMonFHIR/LLMonFHIRDelegate.swift
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ import Spezi
import SpeziFHIR
import SpeziHealthKit
import SpeziLLM
import SpeziLLMOpenAI
import SpeziLLMLocal
import SpeziLLMOpenAI
import SwiftUI


Expand Down
4 changes: 2 additions & 2 deletions LLMonFHIR/Settings/SettingsView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@
// SPDX-License-Identifier: MIT
//

import SpeziLLMLocalDownload
import SpeziLLMOpenAI
import SwiftUI
import SpeziLLMLocalDownload


struct SettingsView: View {
Expand Down Expand Up @@ -83,7 +83,7 @@ struct SettingsView: View {

private var resourcesLimitSettings: some View {
Section("Resource Limit") {
Stepper(value: $resourceLimit, in: 10...2000, step: 10) {
Stepper(value: $resourceLimit, in: 10...2000, step: 10) { // swiftlint:disable:this multiline_arguments

Check failure on line 86 in LLMonFHIR/Settings/SettingsView.swift

View workflow job for this annotation

GitHub Actions / SwiftLint / SwiftLint

Superfluous Disable Command Violation: SwiftLint rule 'multiline_arguments' did not trigger a violation in the disabled region; remove the disable command (superfluous_disable_command)
Text("Resource Limit \(resourceLimit)")
} onEditingChanged: { complete in
if complete {
Expand Down

0 comments on commit febaddb

Please sign in to comment.