Skip to content

Commit

Permalink
feat: adds image to Chat API (#3)
Browse files Browse the repository at this point in the history
* feat(chat): implemented ollama chat API

* feat(chat): implemented ollama chat API

* feat(chat): implemented ollama chat API

* fix: removed prints

* feat(chat): api with image content
  • Loading branch information
gluonfield authored Jan 1, 2024
1 parent 0491df6 commit 9e3583e
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion Sources/OllamaKit/RequestData/OKChatRequestData.swift
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,12 @@ public struct OkChatRequestData: Encodable {
public struct ChatMessage: Encodable {
public var role: String
public var content: String
public let images: [String]

public init(role: String, content: String) {
public init(role: String, content: String, images: [String] = []) {
self.role = role
self.content = content
self.images = images
}
}

Expand Down

0 comments on commit 9e3583e

Please sign in to comment.