fix the exec fallback parameter issue
This commit is contained in:
@@ -66,7 +66,7 @@ class RetryNode(Node):
|
|||||||
To **gracefully handle** the exception (after all retries) rather than raising it, override:
|
To **gracefully handle** the exception (after all retries) rather than raising it, override:
|
||||||
|
|
||||||
```python
|
```python
|
||||||
def exec_fallback(self, shared, prep_res, exc):
|
def exec_fallback(self, prep_res, exc):
|
||||||
raise exc
|
raise exc
|
||||||
```
|
```
|
||||||
|
|
||||||
@@ -86,7 +86,7 @@ class SummarizeFile(Node):
|
|||||||
summary = call_llm(prompt) # might fail
|
summary = call_llm(prompt) # might fail
|
||||||
return summary
|
return summary
|
||||||
|
|
||||||
def exec_fallback(self, shared, prep_res, exc):
|
def exec_fallback(self, prep_res, exc):
|
||||||
# Provide a simple fallback instead of crashing
|
# Provide a simple fallback instead of crashing
|
||||||
return "There was an error processing your request."
|
return "There was an error processing your request."
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user