File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
Examples/embeddings/Sources Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -144,7 +144,7 @@ struct Embeddings {
144144 func doc( ) async throws {
145145
146146 // Create a document store that can search by meaning
147- let store = DocumentStore ( bedrock: bedrock, model: model, similaryFn : cosineSimilarity)
147+ let store = DocumentStore ( bedrock: bedrock, model: model, similarityFn : cosineSimilarity)
148148
149149 // Add some programming-related documents
150150 try await store. addDocument ( " Swift is a programming language developed by Apple " , id: " doc1 " )
@@ -188,10 +188,10 @@ class DocumentStore {
188188 private let distanceFn : DistanceFn
189189
190190 /// Initialize the document store with a Bedrock service and similarity function
191- init ( bedrock: BedrockService , model: BedrockModel , similaryFn : @escaping DistanceFn ) {
191+ init ( bedrock: BedrockService , model: BedrockModel , similarityFn : @escaping DistanceFn ) {
192192 self . bedrock = bedrock
193193 self . model = model
194- self . distanceFn = similaryFn
194+ self . distanceFn = similarityFn
195195 }
196196
197197 /// Adds a new document to the store
You can’t perform that action at this time.
0 commit comments