This project demonstrates the use of OpenAI's GPT-3.5-turbo model to create a simple chat interface where the assistant can make function calls. This functionality is showcased by asking GPT-3.5-turbo for the current weather in a given location, which results in a function call to a mock weather API.
You can interact with the model by typing in a message and sending it. The assistant will respond accordingly. Try asking "What's the weather like in some city?"
Please note that the weather API used in this demo is a mock and always returns the same weather data.
- Download or clone this repository.
- Open
index.html
in your browser.
Please be cautious with your OpenAI API key! Do not share it or publish it online.
For more information on function calling in OpenAI's API, refer to this OpenAI blog post.
This project was created by @horosin_.
Author's blog https://horosin.com.