Skip to contents

generate_document_embeddings Generates vector embeddings for a document through ollama

Usage

generate_document_embeddings(
  ollama_connection,
  document_path,
  splitter = "sentence",
  model = "bge-large"
)

Arguments

ollama_connection

a connection object that has the information on how to connect to the ollama server

document_path

the document path to create embeddings from

splitter

the type of splitter that is going to be used. Defaults to "sentence". "paragraph" can also be used.

model

The model used to generates the embeddings. Defaults to "bge-large". You can select any other model available for generating embeddings.

Details

Converts the ollama response for model info to a tibble

Examples

#conn<-get_ollama_connection()
#embeddings<- get_ollama_embeddings(ollama_connection=conn, prompt="Roma is a beautiful city.")