Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 2 additions & 4 deletions lettucedetect/integrations/langchain/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,7 @@ vectorstore = Chroma.from_documents(docs, embeddings)
# Create streaming RAG chain
llm = ChatOpenAI(model="gpt-4o-mini", streaming=True)
chain = RetrievalQA.from_chain_type(
llm=llm,
chain_type="stuff",
retriever=vectorstore.as_retriever(search_kwargs={"k": 3})
llm=llm, chain_type="stuff", retriever=vectorstore.as_retriever(search_kwargs={"k": 3})
)

# Get context and stream with detection
Expand Down Expand Up @@ -59,7 +57,7 @@ callback = LettuceStreamingCallback(
context=context,
question=question,
check_every=10,
method="transformer" # or "rag_fact_checker"
method="transformer", # or "rag_fact_checker"
)

# Use with any LangChain chain
Expand Down
Loading