Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move OutputParserException to own file #904

Open
bendangelo opened this issue Jan 6, 2025 · 2 comments
Open

Move OutputParserException to own file #904

bendangelo opened this issue Jan 6, 2025 · 2 comments

Comments

@bendangelo
Copy link

Describe the bug
The exception is inside base.rb and rails will not be able to auto load it due the file name. Moving it to it's own file will allow the exception to be added to application_job.

Look here:

class OutputParserException < StandardError

To Reproduce
In a rails app:

class ApplicationJob < ActiveJob::Base
...
  retry_on Langchain::OutputParsers::OutputParserException, wait: 10.seconds, attempts: 3
...

end

Expected behavior
Loads the exception.

Terminal commands & output
Opening the rails console and typing: Langchain::OutputParsers::OutputParserException will fail.

Screenshots

Desktop (please complete the following information):

  • OS: Linux
  • Ruby version 3.4
  • Langchain.rb version 0.19
@andreibondarev
Copy link
Collaborator

@bendangelo Would you be open to producing a PR for this?

@bendangelo
Copy link
Author

Now isn't a great time for me but in the future I can.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants