DOC: Exceptions that can be raised by the invocation of LLM models are not described #28575
Open
2 tasks done
Labels
🤖:docs
Changes to documentation and examples, like .md, .rst, .ipynb files. Changes to the docs/ folder
URL
https://python.langchain.com/api_reference/core/language_models/langchain_core.language_models.llms.BaseLLM.html
Checklist
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.
The text was updated successfully, but these errors were encountered: