MCPcopy
hub / github.com/weaviate/elysia / Error

Class Error

elysia/objects.py:927–951  ·  view source on GitHub ↗

Error objects are used to communicate errors to the decision agent/tool calls. When yielded, Error objects are automatically saved inside the TreeData object. When calling the same tool again, the saved Error object is automatically loaded into any tool calls made with the same tool nam

Source from the content-addressed store, hash-verified

925
926
927class Error(Update):
928 """
929 Error objects are used to communicate errors to the decision agent/tool calls.
930 When yielded, Error objects are automatically saved inside the TreeData object.
931 When calling the same tool again, the saved Error object is automatically loaded into any tool calls made with the same tool name.
932 All errors are shown to the decision agent to help decide whether the tool should be called again (retried), or a different tool should be called.
933 """
934
935 def __init__(self, feedback: str = "", error_message: str = ""):
936 """
937 Args:
938 feedback (str): The feedback to display to the decision agent.
939 Usually this will be the error message, but it could be formatted more specifically.
940 """
941 self.feedback = feedback
942 self.error_message = error_message
943
944 if feedback == "":
945 self.feedback = "An unknown issue occurred."
946
947 Update.__init__(
948 self,
949 "self_healing_error",
950 {"feedback": self.feedback, "error_message": self.error_message},
951 )

Callers 15

__call__Method · 0.90
__call__Method · 0.90
__call__Method · 0.90
__call__Method · 0.90
__call__Method · 0.90
esFunction · 0.85
getDataHrefMethod · 0.85
pFunction · 0.85
hFunction · 0.85
uFunction · 0.85
sFunction · 0.85

Calls

no outgoing calls

Tested by 2

__call__Method · 0.72