(prompt template params)
Returns a string that prompts the user to answer a question.
Args:
str.fomrat
string.Returns:
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!"}) ```
(vector-store)
(vector-store {:keys [embedding splitter db]})
Return a vector store.
Args:
:type
: A keyword with the embedding type.:size
: An integer with the size of the split.:overlap
: An integer with the overlap of the split.: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"})}) ```
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close