We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 7a37f6c commit dec8584Copy full SHA for dec8584
1 file changed
Tool/Sources/LangChain/VectorStore/VectorStore.swift
@@ -1,14 +1,14 @@
1
import Foundation
2
3
-protocol VectorStore {
+public protocol VectorStore {
4
func add(_ documents: [EmbeddedDocument]) async throws
5
func set(_ documents: [EmbeddedDocument]) async throws
6
func clear() async throws
7
func searchWithDistance(embeddings: [Float], count: Int) async throws
8
-> [(document: Document, distance: Float)]
9
}
10
11
-extension VectorStore {
+public extension VectorStore {
12
func search(embeddings: [Float], count: Int) async throws -> [Document] {
13
try await searchWithDistance(embeddings: embeddings, count: count).map { $0.document }
14
0 commit comments