Skip to content

Commit

Permalink
Revert "Add Sendable conformance to enums and update actor"
Browse files Browse the repository at this point in the history
  • Loading branch information
marcusziade committed Oct 25, 2024
1 parent bcc2cd1 commit 794268f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions Sources/Swollama/GenerateRequest.swift
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ public struct GenerateRequest: Codable, Sendable {
}

/// Response format options
public enum ResponseFormat: String, Codable, Sendable {
public enum ResponseFormat: String, Codable {
case json
}

Expand Down Expand Up @@ -108,7 +108,7 @@ public struct ChatMessage: Codable, Sendable {
}

/// Available message roles
public enum MessageRole: String, Codable, Sendable {
public enum MessageRole: String, Codable {
case system
case user
case assistant
Expand Down
4 changes: 2 additions & 2 deletions Sources/Swollama/OllamaClient.swift
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import Foundation

/// A client for interacting with the Ollama API
public actor OllamaClient: @preconcurrency OllamaProtocol {
public actor OllamaClient: OllamaProtocol {
public let baseURL: URL
public let configuration: OllamaConfiguration

Expand Down Expand Up @@ -44,7 +44,7 @@ public actor OllamaClient: @preconcurrency OllamaProtocol {
request.httpMethod = method
request.httpBody = body

if body != nil {
if let body = body {
request.setValue("application/json", forHTTPHeaderField: "Content-Type")
}

Expand Down

0 comments on commit 794268f

Please sign in to comment.