This vignette shows how to query Weaviate using the
Weaviate method in RAGFlowChainR.
2) Configure Weaviate target
# Optional if your Weaviate deployment requires token auth
Sys.setenv(WEAVIATE_API_KEY = "your-weaviate-api-key")
# Format: "https://weaviate-host|ClassName"
weaviate_target <- "https://your-weaviate-host|Document"3) Create the RAG chain
my_llm <- function(prompt) {
"Mock answer from LLM."
}
rag_chain <- create_rag_chain(
llm = my_llm,
vector_database_directory = weaviate_target,
method = "Weaviate",
embedding_function = embed_openai(model = "text-embedding-3-small"),
embedding_dim = 1536,
use_web_search = FALSE
)