You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi Guys, @dosu-bot,
I'd like to pass parameters to a LangServe chain that I have set up.
I'd like to be able to pass
temperature and top_k to the model,
prompts template,
namespace to customize my retriever,
and anything that could be pertaining to tests that I am doing now.
Here is a simple chain available in the examples rag-pinecone that I'd like to be able to configure a little bit more.
Questions:
How to simply access the values passed to the chain and just print them for example?
How to call the runnable with RemoteRunnable and how to do it with requests in python?
vectorstore=PineconeVectorStore.from_existing_index(
PINECONE_INDEX_NAME, OpenAIEmbeddings()
)
retriever=vectorstore.as_retriever()
# RAG prompttemplate="""Answer the question based only on the following context:{context}Question: {question}"""prompt=ChatPromptTemplate.from_template(template)
# RAGmodel=ChatOpenAI()
chain= (
RunnableParallel({"context": retriever, "question": RunnablePassthrough()})
|prompt|model|StrOutputParser()
)
# Add typing for inputclassQuestion(RootModel):
root: str# chain = chain.with_types(input_type=Question)chain=chain.with_types(input_type=Question)
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Hi Guys, @dosu-bot,
I'd like to pass parameters to a
LangServe
chain that I have set up.I'd like to be able to pass
and anything that could be pertaining to tests that I am doing now.
Here is a simple chain available in the examples
rag-pinecone
that I'd like to be able to configure a little bit more.Questions:
How to simply access the values passed to the chain and just print them for example?
How to call the runnable with
RemoteRunnable
and how to do it withrequests
in python?Thanks
Beta Was this translation helpful? Give feedback.
All reactions