Skip to content

Commit

Permalink
Merge pull request #967 from superagent-ai/bugfix/revert-returning-js…
Browse files Browse the repository at this point in the history
…on-object-over-string

Reverting breaking change for json mode.
  • Loading branch information
elisalimli committed Apr 18, 2024
2 parents 6db3666 + 9a90e5f commit 4d70a27
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 4 deletions.
2 changes: 0 additions & 2 deletions libs/superagent/app/api/agents.py
Original file line number Diff line number Diff line change
Expand Up @@ -620,8 +620,6 @@ async def send_message(
logger.error(f"Error parsing output: {e}")
output["output"] = {}

output = json.dumps(output)

return {"success": True, "data": output}


Expand Down
2 changes: 0 additions & 2 deletions libs/superagent/app/workflows/base.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import json
import logging
from typing import Any, List

Expand Down Expand Up @@ -71,7 +70,6 @@ async def arun(self, input: Any):
except Exception as e:
logger.error(f"Error parsing output: {e}")
agent_response["output"] = {}
agent_response["output"] = json.dumps(agent_response["output"])

previous_output = agent_response.get("output")
steps_output.append(agent_response)
Expand Down

0 comments on commit 4d70a27

Please sign in to comment.