-
Checked other resources
Commit to Help
Example CodeI am using this code to create Langchain compatible Rail : from nemoguardrails import RailsConfig
from nemoguardrails.integrations.langchain.runnable_rails import RunnableRails
nemo_guardrails_config = RailsConfig.from_content(
colang_content=nemo_guardrails_data.get_colang_content(),
yaml_content=nemo_guardrails_data.get_yaml_content()
)
import nest_asyncio
nest_asyncio.apply()
nemo_guardrails = RunnableRails(nemo_guardrails_config) If I use it with other Langchain components and try to serialize with Langchain tools (langchain_core.load.dumps) :
DescriptionIt has this definition in json like :
Looks like it's not supported . Any another way to serialize ? Thanks System InfoSystem Information
Package Information
Optional packages not installed
Other Dependencies
|
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
@snassimr You could try creating custom serialization for RunnableRails.
|
Beta Was this translation helpful? Give feedback.
@snassimr You could try creating custom serialization for RunnableRails.
from_dict
andto_dict
are necessary for serialization and deserialization in Langchain.