🚀 DAY 2 OF LAUNCH WEEK: Unify Your Security Stack with Socket Basics.Learn more →
Socket
Book a DemoInstallSign in
Socket

@nomyx-ai/ai-node-debugger

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@nomyx-ai/ai-node-debugger

AI-powered exception handler for Node.js applications

latest
Source
npmnpm
Version
0.0.3
Version published
Maintainers
1
Created
Source

ai-node-debugger

AI Node Debugger: An intelligent, AI-powered exception handler for Node.js that provides real-time, context-aware error analysis and debugging suggestions, enhancing developer productivity and code quality.

Features

  • AI-powered error analysis
  • Support for multiple AI providers (OpenAI and Azure OpenAI)
  • Rate limiting to prevent excessive API calls
  • Customizable output formats
  • Easy integration with existing Node.js applications

Installation

npm install @nomyx-ai/ai-node-debugger

Usage

Basic usage:

const { configure } = require('@nomyx-ai/ai-node-debugger');

configure({
  aiProvider: 'openai',
  apiKey: 'your-api-key-here'
});

// Your application code here

Advanced configuration:

const { configure } = require('@nomyx-ai/ai-node-debugger');

configure({
  aiProvider: 'azure',
  apiKey: 'your-azure-api-key-here',
  maxTokens: 2000,
  temperature: 0.7,
  outputFormat: 'json',
  rateLimitPerMinute: 5,
  callback: (result) => {
    // Custom handling of AI analysis result
    console.log(JSON.stringify(result, null, 2));
  }
});

// Your application code here

Configuration Options

OptionTypeDefaultDescription
aiProviderstring'openai'AI provider to use ('openai' or 'azure')
apiKeystring''API key for the chosen AI provider
maxTokensnumber1500Maximum number of tokens to generate
temperaturenumber0.7Sampling temperature for AI responses
outputFormatstring'console'Output format ('console', 'json', or 'callback')
rateLimitPerMinutenumber10Maximum number of API calls per minute
callbackfunctionundefinedCustom callback function for handling AI analysis results

Error Analysis Output

The AI-powered error analysis provides the following information:

  • Error type
  • Initial thoughts on the error
  • Step-by-step analysis
  • Conclusion, including:
    • Explanation
    • Potential causes
    • Suggested fixes
    • Relevant code snippet
    • Debugging steps

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

License

This project is licensed under the MIT License.

Keywords

nodejs

FAQs

Package last updated on 15 Jul 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts