Skip to content

Framework to make an API Query using Javascript on a Static Site using ChatGPT and Github Pages

Notifications You must be signed in to change notification settings

sp12102001/api-query-framework

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Framework for Making API Queries using JavaScript on a Static Site with ChatGPT and GitHub Pages

Welcome to the Framework for Making API Queries using JavaScript on a Static Site repository! This framework enables you to create and deploy a static site that interacts with the ChatGPT API, hosted on GitHub Pages.

Table of Contents

Introduction

This framework provides a simple and efficient way to create a static website that makes API queries using JavaScript. It integrates ChatGPT to provide AI-powered responses and is hosted on GitHub Pages for easy deployment.

Features

  • Simple and clean interface for making API queries
  • Integration with ChatGPT for AI-powered responses
  • Easy deployment on GitHub Pages
  • Lightweight and fast

Prerequisites

Before you begin, ensure you have met the following requirements:

  • You have a GitHub account.
  • You have git installed on your machine.
  • You have basic knowledge of HTML, CSS, and JavaScript.
  • You have an API key for the ChatGPT API.

Installation

  1. Fork the Repository

    Fork this repository to your GitHub account by clicking the "Fork" button at the top right of this page.

  2. Clone the Repository

    Clone the forked repository to your local machine using the following command:

    git clone https://github.com/<your-username>/api-query-framework.git

` 3. Navigate to the Project Directory

cd api-query-framework
  1. Set Up API Key

Create a file named config.js in the js directory and add your ChatGPT API key:

// config.js const API_KEY = 'your-chatgpt-api-key';

Usage

  • Open index.html
  • Open the index.html file in your favorite web browser to see the static site.
  • Make API Queries
  • Use the provided interface to input your queries and get responses from ChatGPT.

Deployment

Push Changes to GitHub

  • After making any changes, push them to your GitHub repository:
git add
git commit -m "Initial commit"
git push origin main

Enable Github Pages

  • Go to your repository on GitHub.
  • Click on Settings.
  • Scroll down to the GitHub Pages section.
  • Under Source, select main branch and click Save. Your site will be live at https://.github.io/api-query-framework/.

Contributing

Contributions are welcome! Please follow these steps:

  • Fork the Project
  • Create your Feature Branch (git checkout -b feature/YourFeature)
  • Commit your Changes (git commit -m 'Add some feature')
  • Push to the Branch (git push origin feature/YourFeature)
  • Open a Pull Request

License

This project is licensed under the MIT License. See the LICENSE file for details.

Thank you for using the Framework for Making API Queries using JavaScript on a Static Site. If you have any questions or suggestions, please feel free to open an issue or submit a pull request.

About

Framework to make an API Query using Javascript on a Static Site using ChatGPT and Github Pages

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published