Skip to content

Simple chatbot application that uses GPT-4 to interact with users and a weather API

License

Notifications You must be signed in to change notification settings

RafalMCichon/openai-function-calling-weather-api

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

OpenAI Function Calling Chatbot with Weather API

This is a simple chatbot application that uses gpt-3.5-turbo-0613 to interact with users and a weather API to provide real-time weather data.

Prerequisites

Before running this code, make sure you have the following prerequisites:

Features

  • Real-time messaging with Socket.IO
  • Conversation history management
  • Real-time weather data fetch

Installation

Before you begin, make sure you have Node.js installed on your system.

  1. Clone this repository:
git clone https://github.com/your-repo-url
  1. Install the necessary dependencies:
cd your-project-folder
npm install
  1. Create a .env file in your root directory and add your OpenAI API Key and Weather API Key:
OPENAI_API_KEY=your_openai_api_key
WEATHER_API_KEY=your_weather_api_key
  1. Start the application:
npm start

Then, navigate to http://localhost:3000/ in your browser to use the chatbot.

Usage

Send a message to the chatbot using the input field at the bottom of the page. You can ask the bot about the weather in any location.

Contributions

Contributions, issues, and feature requests are welcome!

License

This project is licensed under the terms of the MIT license.

About

Simple chatbot application that uses GPT-4 to interact with users and a weather API

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published