Replies: 2 comments
-
Update the client side code to def text_chat(message, history): Still getting below error message pydantic.v1.error_wrappers.ValidationError: 1 validation error for Generation |
Beta Was this translation helpful? Give feedback.
0 replies
-
This issue is resolved. output is a dictionary and not string so i had to extract the string from the dictionary |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I am invoking RemoteRunnable to remote langserve instance that hosts a chain_with_guardrail and facing error. When I call the invoke method on chain without guardrail then it works fine.
Server Side
chain = (
{"context": reranking_retriever, "question": RunnablePassthrough()}
| prompt_template
| llm
| StrOutputParser()
)
chain_with_guardrails = guardrails | chain
add_routes(
app,
chain_with_guardrails,
path="/conversational_ai_with_rag_text_chat"
)
Client Side
llm = RemoteRunnable("http://127.0.0.1:90000") | StrOutputParser()
llm.invoke("Tell me something about Langchain")
this invoke method is erroring out if the langserve chain is having "chain_with_guardrails" but not erroring with just chain
Error
pydantic.v1.error_wrappers.ValidationError: 1 validation error for Generation
text
str type expected (type=type_error.str)
Beta Was this translation helpful? Give feedback.
All reactions