Liking cljdoc? Tell your friends :D
Clojure only.

ragtacts.vector-store.base


addcljmultimethod

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:

(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!"])
```
sourceraw docstring

embedclj

(embed {:keys [embedding]} texts)

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.
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.
sourceraw docstring

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:

(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})
```
sourceraw docstring

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close