Skip to content

Commit

Permalink
changed return type in customReactOutputParser
Browse files Browse the repository at this point in the history
	modified:   libs/langchain/langchain/agents/react/agent.py
  • Loading branch information
Ahonanhin committed Dec 3, 2024
1 parent 323a1fc commit da7c2e8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion libs/langchain/langchain/agents/react/agent.py
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ def create_react_agent(
class CustomReActOutputParser(ReActSingleInputOutputParser):
def parse(self, text: str) -> str:
if "iteration limit exceeded" in text.lower():
return {"error": "Agent terminated due to iteration limit."}
raise ValueError("Agent terminated due to iteration limit."}

Check failure on line 138 in libs/langchain/langchain/agents/react/agent.py

View workflow job for this annotation

GitHub Actions / cd libs/langchain / make lint #3.9

Ruff

langchain/agents/react/agent.py:138:76: SyntaxError: Expected ',', found '}'

Check failure on line 138 in libs/langchain/langchain/agents/react/agent.py

View workflow job for this annotation

GitHub Actions / cd libs/langchain / make lint #3.13

Ruff

langchain/agents/react/agent.py:138:76: SyntaxError: Expected ',', found '}'

Check failure on line 139 in libs/langchain/langchain/agents/react/agent.py

View workflow job for this annotation

GitHub Actions / cd libs/langchain / make lint #3.9

Ruff

langchain/agents/react/agent.py:138:77: SyntaxError: Expected ',', found newline

Check failure on line 139 in libs/langchain/langchain/agents/react/agent.py

View workflow job for this annotation

GitHub Actions / cd libs/langchain / make lint #3.13

Ruff

langchain/agents/react/agent.py:138:77: SyntaxError: Expected ',', found newline
reasoning_history = getattr(self, "_reasoning_history", [])

Check failure on line 140 in libs/langchain/langchain/agents/react/agent.py

View workflow job for this annotation

GitHub Actions / cd libs/langchain / make lint #3.9

Ruff

langchain/agents/react/agent.py:140:13: SyntaxError: Expected ')', found dedent

Check failure on line 140 in libs/langchain/langchain/agents/react/agent.py

View workflow job for this annotation

GitHub Actions / cd libs/langchain / make lint #3.13

Ruff

langchain/agents/react/agent.py:140:13: SyntaxError: Expected ')', found dedent
if text in reasoning_history:
Expand Down

0 comments on commit da7c2e8

Please sign in to comment.