feat(m1): Ollama client, catalog, streaming chat and CLI (T1.1-T1.6)
Add endpoint policy and redirect-safe ephemeral HTTP client, error mapping, catalog cache and version checks, streaming chat with phase timeouts/cancellation, provisional Hy-MT3 prompt/language/request factory, warm-up policy, and sprachmittler-cli models/show/translate. Recapture the 7B fixtures; defer the 1.8B VERIFY items; document ADR-016. Also fix the signature checker's pipefail SIGPIPE issue.
This commit is contained in:
1 parent
7ca5c710ec
commit
26b493e7e5
93 files changed
+3732
-218
No files matched your search
@@ -0,0 +1,32 @@
|
||||
import Foundation
|
||||
|
||||
/// The HTTP methods the Ollama API uses in v1.
|
||||
public enum OllamaHTTPMethod: String, Sendable {
|
||||
case get = "GET"
|
||||
case post = "POST"
|
||||
}
|
||||
|
||||
/// A transport-independent Ollama request.
|
||||
public struct OllamaHTTPRequest: Sendable, Equatable {
|
||||
/// The HTTP method.
|
||||
public let method: OllamaHTTPMethod
|
||||
/// The path below the configured base URL, e.g. `/api/version`.
|
||||
public let path: String
|
||||
/// An optional JSON body.
|
||||
public let body: Data?
|
||||
/// The body content type; defaults to `application/json` when a body is present.
|
||||
public let contentType: String?
|
||||
|
||||
/// Creates a request.
|
||||
public init(
|
||||
method: OllamaHTTPMethod = .get,
|
||||
path: String,
|
||||
body: Data? = nil,
|
||||
contentType: String? = nil
|
||||
) {
|
||||
self.method = method
|
||||
self.path = path
|
||||
self.body = body
|
||||
self.contentType = contentType
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user