func fetchModels()

in HuggingChat-Mac/Settings/GeneralSettings.swift [235:248]


    func fetchModels() {
        DataService.shared.getModels()
            .receive(on: DispatchQueue.main)
            .sink { completion in
                switch completion {
                case .finished:
                    print("Did finish fetching models")
                case .failure(let error):
                    print("Did fail fetching models:\n\(error)")
                }
            } receiveValue: { models in
                externalModels = models.filter({ !$0.unlisted })
            }.store(in: &cancellables)
    }