(self, name: str, args: dict[str, Any] | None = None)
| 505 | # Generic dispatcher + tool specs for LLMs |
| 506 | # ------------------------ |
| 507 | def dispatch(self, name: str, args: dict[str, Any] | None = None) -> Any: |
| 508 | args = args or {} |
| 509 | fn = getattr(self, name, None) |
| 510 | if not callable(fn): |
| 511 | raise IfcSessionError(f"Unknown tool: {name}") |
| 512 | return _jsonify(fn(**args)) |
| 513 | |
| 514 | def openai_tools(self) -> list[dict[str, Any]]: |
| 515 | """Tool schemas in the OpenAI 'Responses API' format (type=function).""" |
no test coverage detected