forked from themanojdesai/python-a2a
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathexceptions.py
More file actions
32 lines (24 loc) · 1.03 KB
/
Copy pathexceptions.py
File metadata and controls
32 lines (24 loc) · 1.03 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
"""
Exceptions for LangChain integration.
This module provides custom exceptions for the LangChain integration.
"""
class LangChainIntegrationError(Exception):
"""Base exception for LangChain integration errors."""
pass
class LangChainNotInstalledError(LangChainIntegrationError):
"""Raised when LangChain is not installed."""
def __init__(self, message=None):
self.message = message or "LangChain is not installed. Install it with 'pip install langchain langchain_core'"
super().__init__(self.message)
class LangChainToolConversionError(LangChainIntegrationError):
"""Raised when a LangChain tool cannot be converted."""
pass
class MCPToolConversionError(LangChainIntegrationError):
"""Raised when an MCP tool cannot be converted."""
pass
class LangChainAgentConversionError(LangChainIntegrationError):
"""Raised when a LangChain agent cannot be converted."""
pass
class A2AAgentConversionError(LangChainIntegrationError):
"""Raised when an A2A agent cannot be converted."""
pass