Skip to content

Commit

Permalink
πŸ”„ Update dependencies and defaults
Browse files Browse the repository at this point in the history
  • Loading branch information
shroominic committed Feb 17, 2024
1 parent bbc77e7 commit 3d5beb3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions examples/rag_with_deps.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@

from funcchain.syntax import chain, runnable
from funcchain.syntax.params import Depends
from langchain_community.embeddings import OpenAIEmbeddings
from langchain_community.vectorstores.faiss import FAISS
from langchain_openai.embeddings import OpenAIEmbeddings

retriever = FAISS.from_texts(
[
Expand All @@ -21,7 +21,7 @@
@runnable
def poem_with_retrieval(
topic: str,
context: Annotated[str, Depends(itemgetter("topic") | retriever)] = "N/A",
context: Annotated[str, Depends(itemgetter("topic") | retriever)],
) -> str:
"""
Generate a poem about the topic with the given context.
Expand Down

0 comments on commit 3d5beb3

Please sign in to comment.