0.0.3 • Published 11 months ago

@nomyx-ai/ai-node-debugger v0.0.3

Weekly downloads
-
License
MIT
Repository
github
Last release
11 months ago

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.

0.0.3

11 months ago

0.0.2

11 months ago

0.0.1

11 months ago