Skip to content

Commit

Permalink
chore: typo fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Vedantsahai18 committed Dec 31, 2024
1 parent 13088ea commit e03b16e
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions agents-api/agents_api/activities/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -103,12 +103,12 @@ def chunk_doc(string: str) -> list[str]:
return [" ".join([sent.text for sent in chunk]) for chunk in doc._.chunks]


def safe_extract_json(string: str) -> dict:
def safe_extract_json(string: str):
if len(string) > MAX_STRING_LENGTH:
msg = f"String exceeds maximum length of {MAX_STRING_LENGTH}"
raise ValueError(msg)
extarct_String = string[string.find("```json")+7:string.find("```", string.find("```json")+7)]
return json.loads(extarct_String)
extracted_string = string[string.find("```json")+7:string.find("```", string.find("```json")+7)]
return json.loads(extracted_string)



Expand Down

0 comments on commit e03b16e

Please sign in to comment.