Skip to content

Good looking web application programmed in node.js that analyzes user inputted contracts with ChatGPT.

License

Notifications You must be signed in to change notification settings

morganbarber/Contract-Analyzer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Contract-Analyzer

Contract-Analyzer is a web application that allows users to analyze and summarize contracts, highlighting any points that could potentially help or be dangerous to the user, as well as providing suggestions to improve the contract. This application uses OpenAI's GPT-3.5-turbo model to process and analyze the contracts.

Setup

  1. Install Node.js if you don't have it installed.

  2. Clone this repository and navigate to the project's root directory.

  3. Run npm install to install the required dependencies.

  4. Create a .env file in the project's root directory and add your OpenAI API Key:

    OPENAI_API_KEY=your_api_key_here
    
  5. Start the server by running node index.js.

  6. Open your browser and navigate to http://localhost:3000.

Usage

  1. Paste the contract text into the textarea on the web page.
  2. Click the "Submit" button to analyze the contract.
  3. The summarized contract, highlighting any points that could potentially help or be dangerous to the user, as well as providing suggestions to improve the contract, will be displayed below the textarea.

Scripts

The project contains the following scripts:

  • index.js: The main server script that sets up the Express app, listens for the GET and POST requests, and serves the HTML file.
  • api/analyze.js: The script responsible for analyzing the contract using the OpenAI API.
  • html/app.html: The HTML file containing the structure and style for the web page.

Editing

To edit the project or add new features, you can modify the existing scripts (index.js, api/analyze.js, and html/app.html) or add new scripts as needed. Remember to restart the server after making any changes to the scripts.

If you want to change the model used for analysis, you can edit the api/analyze.js file and replace the model property in the openai.createChatCompletion function.

Credits

App developed by Morgan Barber

ReadME generated by GPT-4

About

Good looking web application programmed in node.js that analyzes user inputted contracts with ChatGPT.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published