This repository contains a template for creating an OpenAI Assistant in TypeScript. It provides a basic structure and guidelines to help you set up and customize your own assistant using OpenAI's API.
- Basic setup for an OpenAI Assistant
- Customizable prompts and responses
- Example code for integrating with OpenAI's API
- Instructions for running the assistant
- Clone the repository:
git clone https://github.com/thiagofons/openai-assistant-template.git
- Install the required dependencies:
cd openai-assistant-template
npm install
- Set up your OpenAI API key:
-
Create a
.env
file in the root directory -
Add your API key to the
.env
file:OPENAI_API_KEY=your_api_key_here
- Run the assistant:
npm run start
Customize the prompt in the index.ts
file to suit your needs.
You can also build your own tools in the tools
folder. You just need to import it in tools
record that is being exported in allTools.ts
file.
Refer to the OpenAI API documentation for more details on how to use the API effectively.
Feel free to submit issues and pull requests. Contributions are welcome!
This project is licensed under the MIT License.
Special thanks to Jarrod Watts for his contributions and support.
For more information, check out this video.