langchain-ai / rag-from-scratch

2.73k stars 814 forks source link

AttributeError: 'Client' object has no attribute 'pull_repo' #11

Open m-sharpe7 opened 8 months ago

m-sharpe7 commented 8 months ago

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!