This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import { createOpenAI } from '@ai-sdk/openai'; | |
| import { Agent, Mastra } from '@mastra/core'; | |
| import * as Sentry from '@sentry/node'; | |
| import { z } from 'zod'; | |
| Sentry.init({ | |
| dsn: 'xxx', // Replace with your actual Sentry DSN | |
| tracesSampleRate: 1.0, // Capture 100% of transactions for performance monitoring | |
| }); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import { ClassTransformer, ClassTransformOptions } from 'class-transformer'; | |
| import { ClassType } from 'class-transformer/ClassTransformer'; | |
| import { TransformationType, TransformOperationExecutor } from 'class-transformer/TransformOperationExecutor'; | |
| import { getFromContainer, MetadataStorage, ValidationTypes } from 'class-validator'; | |
| const strip = (container: MetadataStorage, type: new () => any, input: any) => { | |
| const metadata = container.getTargetValidationMetadatas(type, undefined); | |
| const groupedMetadata = container.groupByPropertyName(metadata); | |
| const metadataPropertyKeys = Object.keys(groupedMetadata); | |
| const inputPropertyKeys = Object.keys(input); |