mirror of
https://github.com/mii443/AzooKeyKanaKanjiConverter.git
synced 2025-12-03 02:58:27 +00:00
feat: introduce package traits of Swift 6.1 (#172)
* feat: introduce package traits of Swift 6.1 * fix: CI * fix: android toolchain install script * fix: ci for windows * chore: add debug dump of sdk list * fix: update devcontainer swift image * fix? * chore: remove LLAMA_MOCK=1 since it is no longer required * chore: add debug print of configuration * fix: typo * chore: use signed xcframework of azooKey/llama.cpp * chore: use updated xcframework * chore: use updated xcframework * chore: use updated xcframework * chore: use updated xcframework * chore: use updated xcframework * docs: add usage of Zenzai trait
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
import Foundation
|
||||
#if canImport(SwiftyMarisa)
|
||||
#if canImport(SwiftyMarisa) && Zenzai
|
||||
import SwiftyMarisa
|
||||
|
||||
/// Base64 でエンコードされた Key-Value をデコードする関数
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import Foundation
|
||||
#if canImport(SwiftyMarisa)
|
||||
#if canImport(SwiftyMarisa) && Zenzai
|
||||
import SwiftyMarisa
|
||||
|
||||
final class SwiftTrainer {
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
#if canImport(llama)
|
||||
#if Zenzai
|
||||
// Zenzaiが有効でない場合、llama-mock.swiftの実装が利用可能になる
|
||||
import llama
|
||||
#else
|
||||
import llama_mock
|
||||
#endif
|
||||
|
||||
import SwiftUtils
|
||||
import HeapModule
|
||||
import Algorithms
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
#if !Zenzai
|
||||
// Zenzaiが有効でない場合、このMock実装を有効化する
|
||||
private func unimplemented<T>() -> T {
|
||||
fatalError("unimplemented")
|
||||
}
|
||||
@@ -59,4 +61,5 @@ package func llama_vocab_bos(_ vocab: llama_vocab) -> llama_token { unimplemente
|
||||
package func llama_token_to_piece(_ vocab: llama_vocab, _ token: llama_token, _ buf: UnsafeMutablePointer<Int8>, _ length: Int32, _ lstrip: Int32, _ special: Bool) -> Int32 { unimplemented() }
|
||||
|
||||
package func llama_decode(_ ctx: llama_context, _ batch: llama_batch) -> Int { unimplemented() }
|
||||
package func llama_get_logits(_ ctx: llama_context) -> UnsafeMutablePointer<Float>? { unimplemented() }
|
||||
package func llama_get_logits(_ ctx: llama_context) -> UnsafeMutablePointer<Float>? { unimplemented() }
|
||||
#endif
|
||||
Reference in New Issue
Block a user