utils.d.ts 609 B

12345678910111213141516
  1. import { ToolCall } from "../messages/tool.js";
  2. export declare function _isToolCall(toolCall?: unknown): toolCall is ToolCall;
  3. export declare function _configHasToolCallId(config?: unknown): config is {
  4. toolCall: {
  5. id?: string;
  6. };
  7. };
  8. /**
  9. * Custom error class used to handle exceptions related to tool input parsing.
  10. * It extends the built-in `Error` class and adds an optional `output`
  11. * property that can hold the output that caused the exception.
  12. */
  13. export declare class ToolInputParsingException extends Error {
  14. output?: string;
  15. constructor(message: string, output?: string);
  16. }