Calling OpenAI using TypeScript and Node.js

Опубликовано: 29 Март 2026
на канале: Dan Wahlin
8,230
121

OpenAI provides different models that can be used to perform text completions but how do you call them? In this video I'll show a Node.js/TypeScript example of calling OpenAI and using the GPT-3.5-Turbo model, talk through a prompt, and show a few other features along the way. By the end of the video, you'll understand the key concepts needed to implement similar functionality in your own apps and have the opportunity to go through a hands-on tutorial.

This video shows using v3 of the openai package. If you're on v4+ the API changes slightly. See a migration guide here:

https://github.com/openai/openai-node...

GitHub Repo:

https://github.com/danwahlin/openai-a...

OpenAI Docs:

https://platform.openai.com/docs/

AI Tokens, Embeddings, and Transformers post:

https://codewithdan.me/ai-transformers

Hands-On OpenAI and Azure OpenAI Tutorial:

https://aka.ms/openai-acs-msgraph

Twitter:

  / danwahlin  

LinkedIn:

  / danwahlin