Add the documents in the database.
Args:
:type
: A keyword with the database type.Example:
(add (vector-store) ["Hello!" "World!"])
Add the documents in the database. Args: - db: A map with the following - `:type`: A keyword with the database type. - docs: A list of documents. Example: ```clojure (add (vector-store) ["Hello!" "World!"]) ```
(embed {:keys [embedding]} texts)
Return the embedding of a texts.
Args:
:type
: A keyword with the embedding type.Returns:
Return the embedding of a texts. Args: - embedding: A map with the following - `:type`: A keyword with the embedding type. - texts: A list of strings. Returns: - A list of float embeddings.
Simularity search in the database.
Args:
:raw?
: A boolean with the raw result.:weights
: A list of floats with the weights.:c
: An integer with the c value.Returns:
Exapmle:
(search db "Hello!")
(search db "Hello!" {:raw? true})
(search [db1 db2] "Hello!" {:weights [0.5 0.5] :c 60})
Simularity search in the database. Args: - db-or-dbs: A db or a list of dbs that multiple dbs can be searched. - query: A string with the query. - params: A map with the following - `:raw?`: A boolean with the raw result. - `:weights`: A list of floats with the weights. - `:c`: An integer with the c value. Returns: - A list of texts Exapmle: ```clojure (search db "Hello!") (search db "Hello!" {:raw? true}) (search [db1 db2] "Hello!" {:weights [0.5 0.5] :c 60}) ```
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close