Skip to content

Middleware between Notion documentation and GitHub Copilot's AI assistant

Notifications You must be signed in to change notification settings

LIDR-academy/AI4Devs-backend-resolved-ManoMano

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 

Repository files navigation

GitHub Copilot Extension - Documentation Provider

This service operates as middleware between Notion documentation and GitHub Copilot's AI assistant, enabling the following functions:

  • Fetching documentation from Notion.
  • Identifying the requesting GitHub user.
  • Crafting a tailored system prompt.
  • Communicating with the GitHub Copilot API to generate responses.
  • Streaming AI-generated responses back to the client.

This configuration provides users with personalized assistance, harnessing both internal documentation and sophisticated AI capabilities.

Built on Express for efficient HTTP handling, it utilizes the Octokit library to seamlessly interact with the GitHub API and is set up for deployment on Vercel.

Dependencies

  • @octokit/core: A lightweight GitHub API client for Node.js, used for interacting with GitHub's API to authenticate users and retrieve user information.

  • Readable: A built-in Node.js stream interface for reading data, used in this service for efficiently streaming AI-generated responses back to the client.

  • express: A fast, unopinionated, minimalist web framework for Node.js, used for creating the server and handling HTTP requests and responses.

  • axios: A promise-based HTTP client for making requests to external APIs, used for communicating with the Notion API and GitHub Copilot API.

  • dotenv: A zero-dependency module that loads environment variables from a .env file into process.env, used for managing configuration settings securely.

Installation

  1. Clone the repository:

    git clone <repository-url>
  2. Navigate to the project directory:

    cd notion-documentation-provider
  3. Install the dependencies:

    npm install

Configuration

Create a .env file in the root directory and add the following environment variables:

PORT=3000

Usage

Start the server:

npm start

The server will be running on the port specified in the .env file (default is 3000).

Deployment

This application is configured to be deployed on Vercel. The configuration is specified in the vercel.json file.

Creating a GitHub App

Follow the step-by-step provided by Github:

Using the GitHub Copilot Extension

License

This project is licensed under the ISC License. Feel free to customize this README further based on your specific needs.

About

Middleware between Notion documentation and GitHub Copilot's AI assistant

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published