add exception to core

This commit is contained in:
Chester Curme
2026-02-09 11:25:38 -05:00
parent f0a808d969
commit dfb42a5b84

View File

@@ -65,6 +65,14 @@ class OutputParserException(ValueError, LangChainException): # noqa: N818
self.send_to_llm = send_to_llm
class ContextOverflowError(LangChainException):
"""Exception raised when input exceeds the model's context limit.
This exception is raised by chat models when the input tokens exceed
the maximum context window supported by the model.
"""
class ErrorCode(Enum):
"""Error codes."""