Skip to content

Commit

Permalink
add initial implementation of fn call converter
Browse files Browse the repository at this point in the history
  • Loading branch information
xingyaoww committed Nov 2, 2024
1 parent 60c7b11 commit 239ebc4
Show file tree
Hide file tree
Showing 3 changed files with 946 additions and 0 deletions.
18 changes: 18 additions & 0 deletions openhands/core/exceptions.py
Original file line number Diff line number Diff line change
Expand Up @@ -94,3 +94,21 @@ class CloudFlareBlockageError(Exception):
"""Exception raised when a request is blocked by CloudFlare."""

pass


class FunctionCallConversionError(Exception):
"""Exception raised when FunctionCallingConverter failed to convert a non-function call message to a function call message.
This typically happens when there's a malformed message (e.g., missing <function=...> tags). But not due to LLM output.
"""

pass


class FunctionCallValidationError(Exception):
"""Exception raised when FunctionCallingConverter failed to validate a function call message.
This typically happens when the LLM outputs unrecognized function call / parameter names / values.
"""

pass
Loading

0 comments on commit 239ebc4

Please sign in to comment.