Skip to content

Commit

Permalink
refactor: renames OkChatRequestData to OKChatRequestData
Browse files Browse the repository at this point in the history
  • Loading branch information
kevinhermawan committed Jan 1, 2024
1 parent 9e3583e commit bb2c06e
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion Sources/OllamaKit/OllamaKit.swift
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ extension OllamaKit {
///
/// - Parameter data: The `OKChatRequestData` used to initiate the streaming from the Ollama API.
/// - Returns: An `AnyPublisher` emitting `OKGenerateResponse` and `Error`, representing the live stream of responses from the Ollama API.
public func chat(data: OkChatRequestData) -> AnyPublisher<OKChatResponse, Error> {
public func chat(data: OKChatRequestData) -> AnyPublisher<OKChatResponse, Error> {
let subject = PassthroughSubject<OKChatResponse, Error>()
let request = AF.streamRequest(router.chat(data: data)).validate()

Expand Down
2 changes: 1 addition & 1 deletion Sources/OllamaKit/RequestData/OKChatRequestData.swift
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import Foundation
/// A structure representing the data required to generate responses from the Ollama API.
///
/// It includes the model name, prompt, and other optional parameters that tailor the generation process, such as format and context.
public struct OkChatRequestData: Encodable {
public struct OKChatRequestData: Encodable {
private let stream: Bool

public let model: String
Expand Down
2 changes: 1 addition & 1 deletion Sources/OllamaKit/Utils/OKRouter.swift
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ internal enum OKRouter {
case models
case modelInfo(data: OKModelInfoRequestData)
case generate(data: OKGenerateRequestData)
case chat(data: OkChatRequestData)
case chat(data: OKChatRequestData)
case copyModel(data: OKCopyModelRequestData)
case deleteModel(data: OKDeleteModelRequestData)

Expand Down

0 comments on commit bb2c06e

Please sign in to comment.