Skip to content

Commit

Permalink
feat: print out LLM message history and tools when there's an Invalid…
Browse files Browse the repository at this point in the history
…OutputError
  • Loading branch information
shreyashankar committed Oct 3, 2024
1 parent 97e4ec5 commit ac48683
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions docetl/operations/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -451,7 +451,7 @@ class InvalidOutputError(Exception):
output (str): The invalid output that caused the exception.
expected_schema (Dict[str, Any]): The expected schema for the output.
messages (List[Dict[str, str]]): The messages sent to the LLM.
tools (Optional[List[Dict[str, str]]]): The tools passed to the LLM.
tools (Optional[List[Dict[str, str]]]): The tool calls generated by the LLM.
"""

def __init__(
Expand All @@ -475,7 +475,7 @@ def __str__(self):
f"Invalid output: {self.output}\n"
f"Expected schema: {self.expected_schema}\n"
f"Messages sent to LLM: {self.messages}\n"
f"Tools passed to LLM: {self.tools}"
f"Tool calls generated by LLM: {self.tools}"
)


Expand Down

0 comments on commit ac48683

Please sign in to comment.