v2: add EmbeddingServerApp, fix Sendable issues (WIP)
This commit is contained in:
@@ -1,9 +1,17 @@
|
||||
import Foundation
|
||||
|
||||
// Entry point — avoids @main conflict with top-level code
|
||||
// Entry point — routes to appropriate server based on model name
|
||||
Task {
|
||||
do {
|
||||
try await SimpleServerApp.main()
|
||||
let args = CommandLine.arguments
|
||||
let modelName = args.count > 1 ? args[1] : "E4B-MarkBase"
|
||||
let isEmbedding = modelName.contains("embedding") || modelName.contains("embeddinggemma")
|
||||
|
||||
if isEmbedding {
|
||||
try await EmbeddingServerApp.main()
|
||||
} else {
|
||||
try await SimpleServerApp.main()
|
||||
}
|
||||
} catch {
|
||||
print("Server error: \(error)")
|
||||
exit(1)
|
||||
|
||||
Reference in New Issue
Block a user