Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ struct EmbeddingsDemoView: View {
isLoading = true
defer { isLoading = false } // ensure isLoading is set to false when the
do {
try await embeddingsProvider.createEmbeddings(parameters: .init(input: prompt, encodingFormat: nil, dimensions: nil))
try await embeddingsProvider.createEmbeddings(parameters: .init(input: prompt, model: .textEmbedding3Large, encodingFormat: nil, dimensions: nil))
} catch {
errorMessage = "\(error)"
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@ public struct EmbeddingParameter: Encodable {

public enum Model: String {
case textEmbeddingAda002 = "text-embedding-ada-002"
case textEmbedding3Large = "text-embedding-3-large"
case textEmbedding3Small = "text-embedding-3-small"
}

enum CodingKeys: String, CodingKey {
Expand Down