arktypea
arktype10mo ago
SHAO

How to represent arktype's Type types?

export type ToolDefinition = typeof ToolDefinition.infer;
export const ToolDefinition = type({
  'name': 'string',
  'displayName?': 'string',
  'description?': 'string',
  // 'type': ???
});

export interface IQAgentTool extends ToolDefinition {
  type: Type;
}

const EmptyTool: IQAgentTool = () => {
  return undefined;
};

EmptyTool.type = type('string');
Was this page helpful?