Skip to content

A demonstration of how GPT-3.5/4 can be used as a reasoning engine to perform tasks using the powerful Function Calls feature

Notifications You must be signed in to change notification settings

what-the-func/openai-functions-demo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

OpenAI Functions Demo

A demonstration of how GPT-3.5/4 can be used as a reasoning engine to perform tasks using the powerful Function Calls feature

Usage

The demo uses a dummy email marketing system that can create lists, add contacts to lists and send emails to specific lists. Ask the system to perform a task or set of tasks.

Example Request

Create a new email list called Cold Leads then add the following emails to that list
[email protected], [email protected]
Finally send an email to that list with the subject 'Hello' and body 'Blah blah blah...'

Example Response

I created a new email list called "Cold Leads". Then, I added [email protected] and [email protected] to this list.
Finally, I sent an email to the "Cold Leads" list with the subject 'Hello' and body 'Blah blah blah...'.

Example Terminal Output

Created list Cold Leads
Added [email protected] to Cold Leads
Added [email protected] to Cold Leads
Sent email to Cold Leads with subject Hello and body Blah blah blah...

Dependencies

The application depends on several Python libraries, including:

  • openai
  • langchain
  • python-dotenv
  • streamlit

Please see the requirements.txt file for the exact versions of these dependencies.

Installation

To install the application, first clone this repository:

git clone https://github.com/what-the-func/openai-functions-demo

Then, navigate to the project directory and install the dependencies:

cd openai-functions-demo
pip install -r requirements.txt

Copy the .env.example file to .env and fill in the required environment variables:

cp .env.example .env

Finally, run the application:

streamlit run app.py

License

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

About

A demonstration of how GPT-3.5/4 can be used as a reasoning engine to perform tasks using the powerful Function Calls feature

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages