Skip to content

Commit

Permalink
Add readme
Browse files Browse the repository at this point in the history
  • Loading branch information
rstropek committed Jul 25, 2024
1 parent a9c0d97 commit 0f3e993
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions labs/017-basics-nodejs/readme.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# OpenAI API Basics

## Introduction

This example introduces you to the fundamentals of using the OpenAI API. We will cover the following topics:

* How to setup your connection to OpenAI
* Configuring the system prompt
* Build a conversation loop
* Send messages to OpenAI and receive the agent's response

## Exercises

* Make yourself familiar with the code in this folder.
* Think about an assistant that would be relevant to your business or personal life. Adjust the [system prompt](./system-prompt.md) to match your assistant's purpose. Test the program and see how well it performs.
* Try to break out of the limits of the system prompt. What happens if you ask the assistant to do something that is not related to the system prompt?

## Advanced Exercises

* Setup an GPT 4o-mini model and compare the results with the GPT-4 model.
* Convert the console application to an Express web application.
* Use streaming to receive messages from the OpenAI API step by step.

0 comments on commit 0f3e993

Please sign in to comment.