CodeChit
CodeChit
  • 23
  • 33 853
Get a JSON response from OpenAI API in Node.js
Hello viewers,
Dive deeper into the world of Node.js and OpenAI API as we explore how to fetch responses in JSON format seamlessly! In this second video of our exciting playlist, we'll guide you through the steps, tools, and tips you need to master this essential skill. Perfect for developers looking to enhance their project with AI capabilities! 🚀
Timestamps:
00:00 Introduction
02:39 importance and Usecase of JSON Format Response
07:34 Implementation and Explanation
11:17 OpenAI Response - JSON string
To learn more about programming related stuffs, you can visit: codechit.com
Tags: #OpenAI, #Node.js, #JSON, #APIIntegration, #LLM
Переглядів: 682

Відео

OpenAI APIs with Node.js: Chat Completion Guide
Переглядів 6208 місяців тому
Hello viewers, Dive into the world of AI with our latest video on how to use OpenAI APIs in Node.js! This first installment of our playlist offers a comprehensive guide on consuming the Chat Completion API. Whether you're a beginner or an experienced developer, this tutorial will equip you with the knowledge to integrate cutting-edge AI features into your applications. Don't miss out on unlocki...
Create an AI Chatbot for Documents(PDF, TXT) using FlowiseAI(OpenAI)
Переглядів 3,5 тис.Рік тому
🚀 Welcome to our tutorial on creating an AI Chatbot for Documents using FlowiseAI with OpenAI! 🤖 In today's digital era, the importance of efficiently navigating, retrieving, and understanding information from documents is undeniable. Recognizing this, we've integrated the power of OpenAI's GPT capabilities with the conversational magic of Flowise AI. 📄 What will you learn? Setting up a Convers...
Flowise AI: Build Custom Tools for LLMs (Tutorial)
Переглядів 4,8 тис.Рік тому
Welcome to our deep dive into Flowise, the no-code tool that allows you to build LLM apps with ease. In this tutorial, we are focusing on the Custom Tool feature, enabling you to connect external data sources with your LLM model. Whether you're new to Flowise or looking to extend your capabilities, this video will guide you through a hands-on demonstration using the News API. Watch our previous...
Flowise AI: No Code UI tool to build LLM Apps (Tutorial)
Переглядів 2,7 тис.Рік тому
Welcome to this comprehensive guide on Flowise AI, a no-code tool based on Langchain JS that lets you build LLM Endpoints without having to write a single line of code! In this video, we will walk you through the entire process of installing and using Flowise. We will also demonstrate how to connect your LLM to SerpAPI and obtain the latest information even if your model has not been trained on...
JavaScript Array Methods: Filter, Map and Reduce
Переглядів 25Рік тому
Welcome to another insightful video from CodeChit. In today's episode, we take a deep dive into JavaScript array inbuilt methods, namely filter, map, and reduce. These core JavaScript methods can greatly simplify your code and help you write cleaner, more efficient code. Throughout this tutorial, we delve into practical examples that showcase the immense power and flexibility of these methods. ...
Understand ACID Properties in Database - Theory Explained with Examples
Переглядів 102Рік тому
📚 In today's video, we dive deep into the world of databases, demystifying the ACID properties - Atomicity, Consistency, Isolation, and Durability. These fundamental aspects of databases lay the foundation for all the complex database operations we see around us. 🚀 ⏲️ Timestamps: 00:00 - Introduction: Welcome and an overview of the topic - the ACID properties of databases. 00:59 - Atomicity: Un...
Understand LangChain in Node.js (Tools and Agents)
Переглядів 2,3 тис.Рік тому
Hi Devs, Dive into the world of LangChain and learn how to build powerful ai applications in Node.js! This tutorial will guide you through the essentials of LangChain, focusing on developing tools and agents using this versatile framework. We'll start with the introduction and then will see how to build simple chain in langchain and the will jump into the topics like tools and agents. For a mor...
Microservices for Beginners: A Comprehensive Introduction
Переглядів 39Рік тому
Hi folks, Join me as we will dive into the world of modern application architecture in this comprehensive guide to Microservices for Beginners! We'll break down complex concepts into easy-to-understand explanations, perfect for anyone new to microservices or seeking a refresher. Timestamps: 00:00 - Understanding Monolithic Architecture: We kick off our journey with an exploration of traditional...
Master Prompt Engineering for ChatGPT: Zero Shot, Few Shots & More
Переглядів 296Рік тому
Unlock the power of ChatGPT in this comprehensive tutorial on Prompt Engineering! In this video, we dive deep into Zero Shot, Few Shots, and Instructional Prompting techniques, enabling you to harness the full potential of ChatGPT for your projects. Whether you're a beginner or an AI enthusiast, this guide will help you understand the core concepts and practical applications of prompt engineeri...
Create AI Arts with Midjourney for Beginners
Переглядів 80Рік тому
Hi watchers, In this beginner-friendly tutorial, we will explore the exciting world of AI art creation using Midjourney. Midjourney is a powerful and user-friendly tool that can help artists and enthusiasts to create stunning digital art with ease. Through this video, you will learn step-by-step how to use Midjourney to create your very own AI-generated art pieces. We will cover everything from...
Build a Chatbot with OpenAI GPT API
Переглядів 582Рік тому
Build a Chatbot with OpenAI GPT API
Create a Chrome Extension with OpenAI GPT Integration | CodeChit Tutorial
Переглядів 10 тис.Рік тому
Create a Chrome Extension with OpenAI GPT Integration | CodeChit Tutorial
(Outdated) Learn How to Use Chat GPT API In Javascript - Get Started Now 🔥
Переглядів 4,6 тис.Рік тому
(Outdated) Learn How to Use Chat GPT API In Javascript - Get Started Now 🔥
Learn Binary Search Trees in JavaScript: Adding Nodes - Pt 1
Переглядів 25Рік тому
Learn Binary Search Trees in JavaScript: Adding Nodes - Pt 1
Learn JavaScript Array Methods: forEach, map, filter, and more
Переглядів 99Рік тому
Learn JavaScript Array Methods: forEach, map, filter, and more
Learn Linked Lists in JavaScript: A Quick Guide with Code | Data Structure
Переглядів 59Рік тому
Learn Linked Lists in JavaScript: A Quick Guide with Code | Data Structure
GPT3 in Action: Building a Discord Bot With Node.js
Переглядів 296Рік тому
GPT3 in Action: Building a Discord Bot With Node.js
Using OpenAI's Text Completion API in Node.js: A Tutorial
Переглядів 595Рік тому
Using OpenAI's Text Completion API in Node.js: A Tutorial

КОМЕНТАРІ

  • @tonyg_nerd
    @tonyg_nerd Місяць тому

    I appreciate the vid, especially with JS. Anyone who creates a vid really needs to do their own walk-through once, before doing a vid, to avoid live issues. And when such an event occurs, edit.

  • @jinuvarghese9193
    @jinuvarghese9193 4 місяці тому

    hi man, does sqltoolkit work with open ai agent?

  • @chang112x
    @chang112x 4 місяці тому

    Thanks for the API key. 18:59

  • @tk.gunshot.10
    @tk.gunshot.10 6 місяців тому

    Please can you also do a video on how to use the openai api with langchain js using the updated method?

  • @tk.gunshot.10
    @tk.gunshot.10 6 місяців тому

    Thank you for this. It was very helpful. Keep up the good work.

  • @sergiofitch4378
    @sergiofitch4378 7 місяців тому

    This is a great explanation of the basics of using openAI's API. In the context of a chrome extension, how would you scale it for multiple users? You shouldn't expose the API to the client-side code, which, in chrome extensions is difficult since it is downloaded and installed on the client's browser.

  • @NIKHILGUPTA-if7uh
    @NIKHILGUPTA-if7uh 8 місяців тому

    brother , i cant get that prompt which you are getting on right side of the window whenever you are searching something

  • @OstrichCode
    @OstrichCode 8 місяців тому

    Thanks a lot. Can you do a video on integrating the Flowise Chain API as a custom tool, especially the one with multiple inputs?

  • @codechit_en
    @codechit_en 9 місяців тому

    There is a sort of an error at the time of defining `temperature` field... It was spelling mistake. So, please correct that

  • @jagusiff
    @jagusiff 9 місяців тому

    how can you tell whether the Conversational Retrieval QA Chain is using Knowledge from the Document vs. ChatGPT general knowledge when answering your prompt?

    • @codechit_en
      @codechit_en 9 місяців тому

      There is a check, I forgot the name of it... But when you enable it then it will return you the piece of text from the document that it's referring to answer your question

  • @LaxmanKumar-g8t8o
    @LaxmanKumar-g8t8o 10 місяців тому

    Thank you so much.

  • @its_yash0988
    @its_yash0988 10 місяців тому

    I'm getting 401 (Too Many Requests) . how to correct ??

  • @MrNiceseb
    @MrNiceseb 10 місяців тому

    Would vector embedding also be applicable if doing a NL2SQL where data is from SQL Server database? if so how to modify this flow

    • @codechit_en
      @codechit_en 10 місяців тому

      Hi, this video was uploaded a few months ago, since then there might be some new update which I am not aware of, I would recommend you to check it's official documentation :)

  • @sachinibawanthi1765
    @sachinibawanthi1765 10 місяців тому

    I'm getting 429 (Too Many Requests). But i didn't use my api key

    • @codechit_en
      @codechit_en 10 місяців тому

      Create a new OpenAI key and make sure you haven't touched the limit

  • @PubgSpeed-wl8yo
    @PubgSpeed-wl8yo 10 місяців тому

    The instructions are no longer up to date, the title cannot be underlined, Size cannot be added with it, and the number of tokens brought written without it does not work. Revise this instruction

    • @codechit_en
      @codechit_en 10 місяців тому

      Thanks for feedback, I do understand that things have changed a lot since last I made this video, So, some of the parts might not be working, will update once I will get time 🙏

  • @biasedlyunbiased
    @biasedlyunbiased 11 місяців тому

    Hello, I followed this but my bot seems clueless about the data. It's like it is not recognizing it. Any idea why?

  • @draxx8823
    @draxx8823 11 місяців тому

    can you provide the github link for this repo

  • @KesavaRao-i8t
    @KesavaRao-i8t Рік тому

    thanks for clear explanation

  • @pedromine308
    @pedromine308 Рік тому

    Thanks for the video, how do you update the data ?

  • @pedromine308
    @pedromine308 Рік тому

    can you use a dynamic variable for the pagesize ? I mean in the chat message change the number of the results ? thanks for the video and support :)

  • @PatrickCreations
    @PatrickCreations Рік тому

    Does it still work up to today?

    • @codechit_en
      @codechit_en Рік тому

      I doubt it, as they've updated an api

  • @AI-in-Action952
    @AI-in-Action952 Рік тому

    how can we limit the Gpt model from answering unrelated to questions, i want to limit it only to my data

    • @codechit_en
      @codechit_en Рік тому

      I think you can specify that in prompt strictly to do what and not or giving some examplar

    • @AI-in-Action952
      @AI-in-Action952 Рік тому

      @@codechit_en Thanks a lot, but it's answering the general questions. shall i connect with in call for few mins

  • @tchisama
    @tchisama Рік тому

    thanks for the help <3

  • @adimishra6950
    @adimishra6950 Рік тому

    hii! atually the text completions are not showing up on the openAI websites do you know why is that?

    • @codechit_en
      @codechit_en Рік тому

      Because they have replaced it with another model called gpt 3 instruct

  • @hernandocastroarana6206
    @hernandocastroarana6206 Рік тому

    Thanks for the video. Do you know what components I can use in Flowise to make it throw citations at the end? Something similar to pihind or perplexity. I would like it to extract the information from websites or documents, but I want it to tell me where it extracted the information (citations) from. I would really appreciate the help

    • @codechit_en
      @codechit_en Рік тому

      I think if you are using a vector database and embeddings then there is an option in conversational agents that gives you an option to `return source documents`

  • @malekaix
    @malekaix Рік тому

    Hey again - hope all's well. Had a quick question if thats alright. So the API I'm calling via the custom tool is a Job Search api. Basically when I call that API, it returns LOTS of job info -- e.g. complete job descriptions for 10+ jobs. This returned data easily exceeds the OpenAI token limit, which causes my flow to error when I make the call. Is there a tool I could use to parse the returned Job Search data I give it to GPT? E.g. in a perfect world, I could parse the returned data and only provide GPT with the parsed company names and job titles. Thanks a ton man. Appreciate it!

    • @codechit_en
      @codechit_en Рік тому

      Here you need little bit of programming knowledge, once you get the json of job search data, there would be lot of unnecessary token... To cater this issue you can create a string variable, and then loop through your result or json data... And at each iteration just extract company name and etc and append that inside variable... And finally return that text result

    • @malekaix
      @malekaix Рік тому

      Oh that makes sense! I think I can ask GPT to update my code accordingly to make that happen. Thanks for this - really appreciate it@@codechit_en

    • @DilipKumar-uw3ly
      @DilipKumar-uw3ly Рік тому

      @@malekaix - Will be great help, if you can share the solution once achieved. Thanks in advance.

  • @samayrathod7668
    @samayrathod7668 Рік тому

    @samayrathod7668 0 seconds ago its showing error 429 again and again after i change my device and login with new user api key and run it then also it is showing 429 error Failed to load resource: the server responded with a status of 429 () content_scripts.js:62 Error: Error: Request failed with status: 429 at fetchCompletion (content_scripts.js:45:11)

  • @munyororo
    @munyororo Рік тому

    Excellent work 🎉🙏🙌

  • @malekaix
    @malekaix Рік тому

    thanks a lot for this!

  • @AIbel3arabi
    @AIbel3arabi Рік тому

    Can you do a video on how to integrate calendly using custom tools?

  • @educationforeveryone214
    @educationforeveryone214 Рік тому

    Thanks you so much , Bro

  • @vava-b6w
    @vava-b6w Рік тому

    Can we cite source URL after the response snippet?

    • @codechit_en
      @codechit_en Рік тому

      I don't know if i get this correct, But if you are asking whether we can attatch url in response then yes we can because its jus a string, and whatever will be returned as response (string) will be passed as a context in openai to use

    • @vava-b6w
      @vava-b6w Рік тому

      Thanks for the reply. I think it should not be difficult to hyperlink a title tag with URL string? would it be possible JS or HTML tag? What's your take on it?

    • @codechit_en
      @codechit_en Рік тому

      Of course you can do that, if it's a string, because the only thing that tools care about is that you return strung

  • @RandomGuy4964
    @RandomGuy4964 Рік тому

    awesome tutorial, exactly what I was looking for and the code actually works !

    • @samayrathod7668
      @samayrathod7668 Рік тому

      its showing error 429 again and again after i change my device and login with new user api key and run it then also it is showing 429 error Failed to load resource: the server responded with a status of 429 () content_scripts.js:62 Error: Error: Request failed with status: 429 at fetchCompletion (content_scripts.js:45:11)

    • @lajeevkunalkripal4015
      @lajeevkunalkripal4015 Рік тому

      @@samayrathod7668 same error is showing for me too

    • @ih4286
      @ih4286 10 місяців тому

      @@samayrathod7668 I was getting that error yesterday it means '429 - Rate limit reached for requests Cause: You are sending requests too quickly.'

  • @temporary-user
    @temporary-user Рік тому

    its not working

    • @codechit_en
      @codechit_en Рік тому

      What's the problem, tell me the timestamp?

    • @YTSylantys
      @YTSylantys 5 місяців тому

      if your getting an error about "429 too many requests" that means you need to add credit to openai api

  • @ajaybabupatel1665
    @ajaybabupatel1665 Рік тому

    can you provide github link of this project

  • @klrah6291
    @klrah6291 Рік тому

    brother can I put this in my resume.is it that level project. Will interviewer be impressed by this

    • @codechit_en
      @codechit_en Рік тому

      I think you can, but i would recommend you to build something more complex and awesome than this... As it was just a tutorial to help people understand basic concepts:)

  • @vattory4277
    @vattory4277 Рік тому

    thanks a lot

  • @codechit_en
    @codechit_en Рік тому

    Snippet: quicknote.io/df431bb0-180e-11ee-89bb-0b5645e8e966

  • @sciencebabyy
    @sciencebabyy Рік тому

    Yuu are the best

  • @gopinathkrm58
    @gopinathkrm58 Рік тому

    how to restrict the response to a particular fields, if any question not related to specified topic then it should respond with 'not related' as response. Any idea on that ? Example I need only tech related responses, if user asks any non ques not related to tech, then it should always respond with 'not related'

    • @codechit_en
      @codechit_en Рік тому

      There are two ways in which you can achieve something like this, although not sure as haven't tried anything like this before. First one is that you can have list of keywords related to technology like Tech, software, computer,etc... If given query doesn't contain any of these you can assume its not related to tech. 2. Pass user query to openai and ask if it related to technology if yes then return true or else return false But not actually sure though as haven't tried any of these :)

    • @gopinathkrm58
      @gopinathkrm58 Рік тому

      @@codechit_en yes I tried that way, but sometimes it is not working, I mean it's answering some unwanted queries. I think I need to dig more into it. Thanks

    • @codechit_en
      @codechit_en Рік тому

      Okay, and let me know if you find something interesting, as I am learning as well :)

    • @gopinathkrm58
      @gopinathkrm58 Рік тому

      @@codechit_en okay

  • @tahmideditzps
    @tahmideditzps Рік тому

    nice vid

  • @codechit_en
    @codechit_en Рік тому

    One mistake that I made in this video was at 12:31 and something like that. where i directly put else part(In that case it will also run that code if val and node's val is equal). But in bst there shouldn't be any duplicate keys :)

  • @anigma3086
    @anigma3086 Рік тому

    o bhai

  • @anigma3086
    @anigma3086 Рік тому

    Bhagwa daari babua