Skip to content

Commit

Permalink
removed some llm_response preprocessing
Browse files Browse the repository at this point in the history
  • Loading branch information
emcf committed Sep 4, 2024
1 parent 336dd4f commit 6f99c4c
Showing 1 changed file with 0 additions and 5 deletions.
5 changes: 0 additions & 5 deletions thepipe/extract.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,6 @@ def clean_response_text(llm_response: str) -> str:
llm_response = match.group(1)
llm_response = clean_response_text(llm_response)

# try to remove code block formatting if still present
if llm_response.startswith("```json") and llm_response.endswith("```"):
llm_response = llm_response[len("```json"):-len("```")]
llm_response = clean_response_text(llm_response)

# parse json by matching curly braces
try:
parsed_json = json.loads(llm_response)
Expand Down

0 comments on commit 6f99c4c

Please sign in to comment.