Giter Site home page Giter Site logo

raheesahmed / openai-assistant-api-with-ui Goto Github PK

View Code? Open in Web Editor NEW
17.0 1.0 11.0 278 KB

This project is an Express.js server integrated with OpenAI's API. It includes features such as file uploading, creating and managing an OpenAI assistant, and handling chat interactions using the assistant.

JavaScript 54.74% TypeScript 40.01% CSS 5.25%
assistantapi chatgpt4 openai openai-assistant-api openai-assistant-api-chatbot openai-assistants openai-chatgpt

openai-assistant-api-with-ui's Introduction

OpenAI Assistant API Integration

This project is an Express.js server integrated with OpenAI's API. It includes features such as file uploading, creating and managing an OpenAI assistant, and handling chat interactions using the assistant.

alt text

alt text

Introduction

The server is designed to interact with OpenAI's API, providing an interface for chat functionalities and file management. It uses multer for handling file uploads, body-parser and cors for middleware support, and dotenv for environment variable management.

Installation

To get started with this project, follow these steps:

  1. Clone the repository:

    git clone https://github.com/RaheesAhmed/OpenAI-Assistant-API-with-UI.git
    

cd frontend

npm install

cd backend:

npm install
  1. Install dependencies:

    npm install
    

Create a .env file in the root directory and add your OpenAI API key: OPENAI_API_KEY=your_api_key_here

  1. Starting the Server Run the server using the following command:

    npm start
    

    This will start the server on the default port 3000 or on a port specified in the .env file.

API Endpoints

POST /chat

Description: Sends a chat question to the OpenAI assistant and returns its response. Payload: { "question": "Your question here" } POST /upload

Description: Uploads a file to be used with the OpenAI assistant. Form-data: file: [Your File Here]

Contributing

Contributions to this project are welcome. Please ensure to follow the existing code style and add unit tests for any new or changed functionality

openai-assistant-api-with-ui's People

Contributors

raheesahmed avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

openai-assistant-api-with-ui's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.