- Module Structure: Each module must follow the established directory structure.
- Function Implementations:
- Action Functions: Perform transactions and utilize the
sendTransactions
function fromFunctionOptions
. - Getter Functions: Retrieve data without performing transactions.
- Action Functions: Perform transactions and utilize the
- Tools Implementation: Provide a
tools.ts
file defining functions and their parameters for LLM integration, following the OpenAI function calling specification. - HTTP requests: Use the Axios
- Error Handling: Functions must handle errors gracefully, using the
toResult
transformer for standardized responses. - Input Validation: All functions must perform thorough input validation and provide informative error messages.
- Documentation: Each module must include a
README.md
with a brief description and sample user questions.
- Programming Language: TypeScript with the NestJS framework.
- Code Standards: Follow the provided coding guidelines and design patterns.
- Performance:
- Functions should be optimized for performance.
- Getter functions should not return more than 500 tokens of data to prevent overloading the AI context.
- Large data retrievals should be split into multiple smaller functions.
- Naming Conventions:
- Function names should match the file names (one function per file).
- Use clear and descriptive names for variables and functions.
- Comments and Documentation:
- Use JSDoc comments for public classes and methods.
- Include comments to explain complex logic or important sections.
- Formatting
- Use settings from
.prettierrc
- Single quotes
- 4 spaces indentation
- Maximum line length 180 characters
- Use settings from