Skip to content

dhawansolanki/OpenAI-Assistant

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 

Repository files navigation

OpenAI - Assistant

The Assistants API allows you to build AI assistants within your own applications. An Assistant has instructions and can leverage models, tools, and knowledge to respond to user queries. The Assistants API is designed to help developers build powerful AI assistants capable of performing a variety of tasks. You can learn more about the OpenAI Assistant API here.

Find me on Socials at @dhawansolanki.

Note

This Entrire Script has been taken reference from the Official Documentation from OpenAI Assistant.

How it Works

This program includes basic and key steps to create and run an Assistant that uses Code Interpreter. Here, we're creating an Assistant, with the Code Interpreter tool enabled.

Getting Started

Prerequisites

  • Python 3.x
  • OpenAI API key

Installation

  1. Clone the repository:
git clone https://github.com/dhawansolanki/OpenAI-Assistant.git
cd OpenAI-Assistant
  1. Create an Environment:
python -m venv /path/to/new/virtual/environment
  1. Activate Environment

For Mac:

source /path/to/new/virtual/environment/bin/activate

For Windows:

python -m venv c:\path\to\myenv
  1. Install the required dependencies:
pip install -r requirements.txt

Setting up Environment Variables

Before running the script, you must set your OpenAI API key as an environment variable. This can be done in the command line or by setting it in a .env file.

Command line method:

export OPENAI_API_KEY='your_api_key_here'

Usage

Run the script with the following command:

python main.py

You can customize the script or build upon the code to create a more interactive experience.

Contributing

Contributions are welcome! For major changes, please open an issue first to discuss what you would like to change. Being fully candid, I'm not great at staying up to date on my own repos.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages