- Notifications
You must be signed in to change notification settings - Fork0
AI powered log analyzer for Z-Wave JS
License
zwave-js/log-analyzer
Folders and files
| Name | Name | Last commit message | Last commit date | |
|---|---|---|---|---|
Repository files navigation
AI powered log analyzer for Z-Wave JS. Helps you analyze Z-Wave JS logs by providing insights and suggestions, and answering your questions.
Visit the site athttps://zwave-js.github.io/log-analyzer/ to get started with the web interface.
You can also use the log analyzer from the command line:
# Set your Gemini API keyexport GEMINI_API_KEY="your-api-key-here"# Analyze a log filenpx @zwave-js/log-analyzer /path/to/logfile.txt# Ask a specific question about the lognpx @zwave-js/log-analyzer /path/to/logfile.txt --question"Why is node 5 not responding?"
Note
AI-powered log analysis require very large context windows up to 1 million tokens. To be able to provide this service, we need you to bring your own Gemini API key. You can get one for free athttps://aistudio.google.com/app/apikey
You can use this package as a library in your own Node.js applications.
npm install -g @zwave-js/log-analyzer
TheZWaveLogAnalyzer class provides a simple, high-level API:
import{ZWaveLogAnalyzer}from"@zwave-js/log-analyzer";// Initialize the analyzer with your API keyconstanalyzer=newZWaveLogAnalyzer(process.env.GEMINI_API_KEY!);// Analyze a log file and stream the resultsforawait(constchunkofanalyzer.analyzeLogFile("./logfile.txt","Analyze this log file",)){process.stdout.write(chunk);}// Ask follow-up questionsforawait(constchunkofanalyzer.continueAnalysis("Can you explain the error in more detail?",)){process.stdout.write(chunk);}
- Fixed an issue where the package could not be imported due to a wrong field in
package.json
- Initial release
About
AI powered log analyzer for Z-Wave JS
Resources
License
Uh oh!
There was an error while loading.Please reload this page.
Stars
Watchers
Forks
Uh oh!
There was an error while loading.Please reload this page.