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

DOC: Exceptions that can be raised by the invocation of LLM models are not described #28575

Open
2 tasks done
Mark531 opened this issue Dec 6, 2024 · 0 comments
Open
2 tasks done
Labels
🤖:docs Changes to documentation and examples, like .md, .rst, .ipynb files. Changes to the docs/ folder

Comments

@Mark531
Copy link

Mark531 commented Dec 6, 2024

URL

https://python.langchain.com/api_reference/core/language_models/langchain_core.language_models.llms.BaseLLM.html

Checklist

  • I added a very descriptive title to this issue.
  • I included a link to the documentation page I am referring to (if applicable).

Issue with current documentation:

The invoke() or ainvoke() methods of BaseLLMs may raise exceptions, yet the latter are not described in a "Raises" section. Some specific implementations like OpenAI's models should have their own exceptions documented too (like RateLimitError I guess).

The problem is that it's currently difficult to write a code that properly handles all possible exceptions without knowing them.

Idea or request for content:

On top on the "Return type" section, a "Raises" section should be added for invoke() and ainvoke() and maybe other methods.

@dosubot dosubot bot added the 🤖:docs Changes to documentation and examples, like .md, .rst, .ipynb files. Changes to the docs/ folder label Dec 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🤖:docs Changes to documentation and examples, like .md, .rst, .ipynb files. Changes to the docs/ folder
Projects
None yet
Development

No branches or pull requests

1 participant