Skip to content

pineviewlabs/openai-nightwatch-service

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

openai-nightwatch-service

A simple HTTP API service which uses the OpenAI API to analyse automated test failures. Part of the Using the OpenAI platform to analyse automated test failures tutorial.

Installation

Clone the repository and install dependencies:

git clone https://github.com/pineviewlabs/openai-nightwatch-service.git
cd openai-nightwatch-service
npm install

Configuration

The service requires an OpenAI API key to be configured. You can obtain an API key from the OpenAI API.

The API key can be configured using the OPENAI_API_KEY environment variable. You can also use .env files.

OPENAI_API_KEY=your-api-key

Running the service

The service can be started using the npm start command:

npm start

The service will be available at http://localhost:4001.

API

The service exposes a single endpoint at /analyze-error which accepts a POST request with a JSON body containing the error message to analyse.

See also the [nightwatch-openai-plugin](

License

MIT

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published