Creating rails object from LLMRails class has a lot of latency #1163
abhipandey09
started this conversation in
General
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hi all,
I am.having a library directory containing 10 guardrails folder each having its own actions.py and flow.co file, and a single config.yml file which contains the input, output flow that needs to be executed.
I am trying to load the library using
config = RailsConfig.from_path(library_dir_path)
And then using it as
rails = LLMRails(config, verbose=True)
The rails object creation itself it taking a lot of time like 10sec , which is not feasible to do on every call.
Things i have tried
Use redis to cache the rails object for next call, but it fails while serialization and deserialization even using pickle.
How can i minimize this latency, Request someome to help and suggest any idea.
Thanks
Beta Was this translation helpful? Give feedback.
All reactions