Skip to content

Commit 0516bc9

Browse files
authored
fix: output serialization for replacementEditTool (#587)
# Motivation <!-- Why is this change necessary? --> # Content <!-- Please include a summary of the change --> # Testing <!-- How was the change tested? --> # Please check the following before marking your PR as ready for review - [ ] I have added tests for my changes - [ ] I have updated the documentation or added new documentation as needed --------- Co-authored-by: rushilpatel0 <[email protected]>
1 parent c3be5c8 commit 0516bc9

File tree

1 file changed

+1
-3
lines changed
  • src/codegen/extensions/langchain

1 file changed

+1
-3
lines changed

src/codegen/extensions/langchain/tools.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
"""Langchain tools for workspace operations."""
22

3-
import json
43
from typing import Callable, ClassVar, Literal, Optional
54

65
from langchain_core.tools.base import BaseTool
@@ -462,7 +461,6 @@ def __init__(self, codebase: Codebase) -> None:
462461
def _run(self, pr_id: int) -> str:
463462
result = view_pr(self.codebase, pr_id)
464463
return result.render()
465-
return json.dumps(result, indent=2)
466464

467465

468466
class GithubCreatePRCommentInput(BaseModel):
@@ -791,4 +789,4 @@ def _run(
791789
end=end,
792790
count=count,
793791
)
794-
return json.dumps(result, indent=2)
792+
return result.render()

0 commit comments

Comments
 (0)