Open m-sharpe7 opened 8 months ago
I am having this issue for the hub.pull method
prompt = hub.pull("rlm/rag-prompt")
llm = ChatOpenAI(model_name="gpt-3.5-turbo", temperature=0)
def format_docs(docs): return "\n\n".join(doc.page_content for doc in docs)
rag_chain = ( {"context": retriever | format_docs, "question": RunnablePassthrough()} | prompt | llm | StrOutputParser() )
rag_chain.invoke("What is Task Decomposition?")
Does anyone have any suggestions? Thank you!
I am having this issue for the hub.pull method
RETRIEVAL and GENERATION
Prompt
prompt = hub.pull("rlm/rag-prompt")
LLM
llm = ChatOpenAI(model_name="gpt-3.5-turbo", temperature=0)
Post-processing
def format_docs(docs): return "\n\n".join(doc.page_content for doc in docs)
Chain
rag_chain = ( {"context": retriever | format_docs, "question": RunnablePassthrough()} | prompt | llm | StrOutputParser() )
Question
rag_chain.invoke("What is Task Decomposition?")
Does anyone have any suggestions? Thank you!