A repository which leverages OpenAI's latest Assistant APIs to create conversational threads. Built on Next.js and uses OpenAI's Assistant API
- OpenAI API Key - You can obtain the API key by signing up at OpenAI
 - OpenAI Assistant ID - You can obtain the Assistant ID by creating a new Assistant at OpenAI Assistants
 
Note: You need to signup with a Credit Card to use Assistants API from OpenAI
- 
Install dependencies from the
/webfolder -npm install - 
Rename
.env.sampleto.envand set appropriate variables.- OPENAI_API_KEY - Your OpenAI API Key
 - OPENAI_ASSISTANT_ID - Your OpenAI Assistant ID
 - SITE_URL - Your site URL (for example, http://localhost:3000)
 
 - 
Start the project -
npm run dev 
| Name | Description | 
|---|---|
| Next.js | React framework | 
| OpenAI's Assistant API | API service to create conversational threads with OpenAI's custom Assistants that serve a niche purpose of your choice | 
| Azure App Service | App Hosting PaaS | 
📦src
 ┣ 📂lib
 ┃ ┣ 📜read-data-stream.ts
 ┃ ┗ 📜stream-parts.ts
 ┣ 📂pages
 ┃ ┣ 📂api
 ┃ ┃ ┣ 📂assistant
 ┃ ┃ ┃ ┗ 📜index.ts
 ┃ ┃ ┗ 📜hello.ts
 ┃ ┣ 📜_app.tsx
 ┃ ┣ 📜_document.tsx
 ┃ ┗ 📜index.tsx
 ┣ 📂styles
 ┃ ┣ 📜Home.module.css
 ┃ ┗ 📜globals.css
 ┗ 📂utils
 ┃ ┗ 📜OpenAI.tsOfficial estimate from Azure Pricing Calculator - Azure Pricing Calculator
| Service Category | Service Type | Description | Estimated Monthly Cost | Estimated Upfront Cost | 
|---|---|---|---|---|
| Compute | Azure App Service | Basic Tier; 1 B1 (1 Core(s), 1.75 GB RAM, 10 GB Storage) x 730 Hours; Linux OS; 0 SNI SSL Connections; 0 IP SSL Connections; 0 Custom Domains; 0 Standard SLL Certificates; 0 Wildcard SSL Certificates | $12.41 | $0 | 
| Developer Tools | Azure DevOps | Basic Plan; 5 User(s) | $0 | $0 | 
| Total | $12.41 | $0 | 
NOTE: This estimate does not include the costs that might be incurred in using OpenAI's services.
Disclaimer: The above cost is an estimate and may vary based on the actual usage. Caravel Labs or Microsoft is not responsible for additional costs incurred.
