Skip to content

SoftwareSushi/example-open-ia-api

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Example Open IA Api

This project is a simple Node.js application built with Express. It provides an API endpoint to handle questions and fetch responses from the OpenAI API.

Table of Contents

Installation

  1. Clone the repository:

    git clone https://github.com/SoftwareSushi/example-open-ia-api
    
  2. Navigate to the project directory:

    cd example-open-ia-api
    
  3. Install the dependencies using pnpm:

    pnpm install
    

Usage

To start the application, run the following command:

pnpm start

The application will be running on http://localhost:3000. You can send a POST request to the /ask endpoint with your question.

Example:

curl -X POST http://localhost:3000/ask \
     -H "Content-Type: application/json" \
     -d '{"question": "What is the capital of France?"}'

About

This is an example about how to setup an OpenIA ApiKey and use in an Express API

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published