Skip to content

Commit b3addf5

Browse files
committed
swift-format
1 parent b3acd8d commit b3addf5

File tree

1 file changed

+11
-11
lines changed

1 file changed

+11
-11
lines changed

Libraries/MLXLMCommon/Streamlined.swift

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -179,8 +179,8 @@ public class ChatSession {
179179
self.generator = .init(
180180
model: .context(model), instructions: instructions, processing: processing,
181181
generateParameters: generateParameters)
182-
}
183-
182+
}
183+
184184
/// Produces a response to a prompt.
185185
///
186186
/// - Parameters:
@@ -189,8 +189,8 @@ public class ChatSession {
189189
/// - videos: list of video (for use with VLMs)
190190
/// - Returns: response from the model
191191
public func respond(
192-
to prompt: String,
193-
images: [UserInput.Image],
192+
to prompt: String,
193+
images: [UserInput.Image],
194194
videos: [UserInput.Video]
195195
) async throws -> String {
196196
generator.messages = [
@@ -211,8 +211,8 @@ public class ChatSession {
211211
/// - videos: optional video (for use with VLMs)
212212
/// - Returns: response from the model
213213
public func respond(
214-
to prompt: String,
215-
image: UserInput.Image? = nil,
214+
to prompt: String,
215+
image: UserInput.Image? = nil,
216216
video: UserInput.Video? = nil
217217
) async throws -> String {
218218
try await respond(
@@ -230,8 +230,8 @@ public class ChatSession {
230230
/// - videos: list of video (for use with VLMs)
231231
/// - Returns: a stream of tokens (as Strings) from the model
232232
public func streamResponse(
233-
to prompt: String,
234-
images: [UserInput.Image],
233+
to prompt: String,
234+
images: [UserInput.Image],
235235
videos: [UserInput.Video]
236236
) -> AsyncThrowingStream<String, Error> {
237237
generator.messages = [
@@ -252,12 +252,12 @@ public class ChatSession {
252252
/// - video: optional video (for use with VLMs)
253253
/// - Returns: a stream of tokens (as Strings) from the model
254254
public func streamResponse(
255-
to prompt: String,
256-
image: UserInput.Image? = nil,
255+
to prompt: String,
256+
image: UserInput.Image? = nil,
257257
video: UserInput.Video? = nil
258258
) -> AsyncThrowingStream<String, Error> {
259259
streamResponse(
260-
to: prompt,
260+
to: prompt,
261261
images: image.flatMap { [$0] } ?? [],
262262
videos: video.flatMap { [$0] } ?? []
263263
)

0 commit comments

Comments
 (0)