Liking cljdoc? Tell your friends :D

ragtacts.core


addcljmultimethod

source

askcljmultimethod

source

embedclj

source

get-textclj

(get-text source)
source

promptclj

(prompt template params)

Returns a string that prompts the user to answer a question.

Args:

  • template: Python str.fomrat string.
  • params: A map of parameters to pass to the prompt template.

Returns:

  • String: The prompt to ask the user.

Example:

(prompt "Question: { question }" {:question "Hello!"})
Returns a string that prompts the user to answer a question.

Args:
- template: Python `str.fomrat` string.
- params: A map of parameters to pass to the prompt template.

Returns:
- String: The prompt to ask the user.

Example:
```clojure
(prompt "Question: { question }" {:question "Hello!"})
```
sourceraw docstring

source

vector-storeclj

(vector-store)
(vector-store {:keys [embedding splitter db]})

Return a vector store.

Args:

  • embedding: A map with the following
    • :type: A keyword with the embedding type.
  • splitter: A splitter or a map with the following
    • :size: An integer with the size of the split.
    • :overlap: An integer with the overlap of the split.
  • db: A map with the following
    • :type: A keyword with the db type.

Example:

(vector-store)

(vector-store {:embedding (open-ai-embedding)})

(vector-store {:splitter {:size 500 :overlap 10}
               :db (in-memory-vector-store)})

(vector-store {:splitter (recursive-splitter {:size 500 :overlap 10})
               :db (in-memory-vector-store)})

(vector-store {:db (milvus {:collection "animals"})})
Return a vector store.

Args:
- embedding: A map with the following
  - `:type`: A keyword with the embedding type.
- splitter: A splitter or a map with the following
  - `:size`: An integer with the size of the split.
  - `:overlap`: An integer with the overlap of the split. 
- db: A map with the following
  - `:type`: A keyword with the db type.

Example:
```clojure
(vector-store)

(vector-store {:embedding (open-ai-embedding)})

(vector-store {:splitter {:size 500 :overlap 10}
               :db (in-memory-vector-store)})

(vector-store {:splitter (recursive-splitter {:size 500 :overlap 10})
               :db (in-memory-vector-store)})

(vector-store {:db (milvus {:collection "animals"})})
```
sourceraw docstring

with-imagesclj

source

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

× close