Skip to main content

validate_schema_roundtrip

Method
This is a method of the BaseTool class in the base module.
Validate that schema can round-trip through OpenAI-style serialization. This ensures the tool schema is compatible with LLM providers that expect OpenAI function calling format and that parameters can be properly parsed.

Signature

Returns

bool
True if round-trip validation passes

Exceptions

If round-trip fails

Uses

  • get_schema
  • json.dumps
  • json.loads
  • ToolValidationError

Used By

Source

View on GitHub

praisonaiagents/tools/base.py at line 401