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.
-
Clone the repository:
git clone https://github.com/SoftwareSushi/example-open-ia-api -
Navigate to the project directory:
cd example-open-ia-api -
Install the dependencies using pnpm:
pnpm install
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?"}'