Build a Chatbot With Custom Data Using ChatGPT and Supabase

Поделиться
HTML-код
  • Опубликовано: 16 ноя 2024

Комментарии • 45

  • @splattelol
    @splattelol Год назад +13

    Mom clear the calendar, Cooper just uploaded a new video

    • @CooperCodes
      @CooperCodes  Год назад +1

      Hahahah thanks for the comment 😂

  • @business_central
    @business_central День назад

    this deserves so much more views! True germ! Thank you!

  • @ChaosLabs
    @ChaosLabs Год назад +1

    how does this not have more views

  • @RobChambers-ew8gj
    @RobChambers-ew8gj 7 месяцев назад

    Can you do a video that builds upon this one, adding a frontend interface for both user prompts and assistant responses, and also an "admin" window that would allow for data training without the need for code? That would rock!

  • @ericricky808
    @ericricky808 Год назад +2

    Just what I was looking for. Thank you

  • @oleksandr.brazhii
    @oleksandr.brazhii Год назад +4

    Very useful video, thanks.
    There're some questions regarding final prompting:
    Why do you add '---
    ' to each context doc end? Is '---' indicates a piece of independent info to davinci model? If yes, then why '
    '? Doesn't the model replacing it with a space before processing?
    And what are the benefits of using text-davinci-003 completion model rather than gpt-3.5-turbo which is cheaper (so more technically effective)?

  • @rowinc1704
    @rowinc1704 Год назад +2

    brilliant video by the way, there are some projects where you feel joy making it this was one of them

    • @CooperCodes
      @CooperCodes  Год назад

      Thank you, glad you found it enjoyable :) Thanks again for your comment

  • @deoarlo
    @deoarlo Год назад +3

    Another brilliant tutorial! Q: Is the custom data sent everytime the user communicates GPT? In that case, a large custom data will be very expensive to run. Unless GPT reads the custom data ones and uses it as context for all future conversations

    • @CooperCodes
      @CooperCodes  Год назад +8

      Great question! I will start by saying that this endpoint is more of a Q&A style, it forgets any context from previous messages and it simply answers the question that a user asks. I plan to create another video showing off a conversational chatbot with custom data, where messages can go back and forth.
      The entirety of your PostgreSQL documents database is not sent with every single request if that is what you're asking. Take a look at the diagram around 1:00 for help with this, as the process is the following:
      I ask a question "Who is Cooper Codes?", the backend code will find all the relevant documents to that SPECIFIC question, so it will show all the data points most relevant to that question (for example "Cooper Codes is a programmer"). If I had a database that held information for ALL youtubers, it would still only give the data points relevant to Cooper Codes to my ChatGPT prompt. This is because of some logic happening in the match_documents function (code here: pastebin.com/6PdKt8hH ) that allows us to get the documents MOST relevant to our specific question.
      In the end our prompt is literally:
      "
      Tell the chatbot how to behave
      --- include Cooper Codes information for Cooper Codes question ---
      --- question here: "Who is Cooper Codes?"
      "
      Hopefully this helps! Please let me know if I didn't answer something in particular here. I am planning on releasing more basic videos on this topic in the future!

  • @raynosebastian6275
    @raynosebastian6275 Год назад

    Time to make this as my NLP Final Project 🔥

  • @hiiten1
    @hiiten1 Год назад +1

    Awesome tutorial! Could you talk more about how we could learn to convert PDFs and other documents into string format so that we can use them in this program?

    • @artarioo
      @artarioo 10 месяцев назад

      I recommend checking out pdfjs, had a similar question and it came in pretty useful

  • @stonedizzleful
    @stonedizzleful Год назад

    Awesome video man. Really well explained. Thank you!

  • @ericmasonco
    @ericmasonco 4 месяца назад

    Is there a way to include news article links for the bot to learn and provide responses with that content?

  • @williamsalazar2624
    @williamsalazar2624 11 месяцев назад

    Thanks a lot. How to use supabase openAPI schema inside GPT4?

  • @gianfrancomarcolinirecalde6858
    @gianfrancomarcolinirecalde6858 11 месяцев назад

    I do everything it says but when I run node.js I get "SyntaxError: The requested module 'openai' does not provide an export named 'Configuration'".
    What can it be?, excellent video anyway, very well explained

  • @bubblesDF
    @bubblesDF Год назад

    Hi I have followed the instructions word for word but when I try to linj to my project I get "Failed to symlink supabase with error: package.json not found" package.json does exist and I am logged in

  • @samanthalee6749
    @samanthalee6749 8 месяцев назад

    Wanted to mention that copy-pasting the DB password (at 21:23) might not work - you have to type the password. Took me like 10 mins to find the problem and solved it thanks to a gh thread.

  • @timothyalcaide
    @timothyalcaide Год назад

    Thank you for this amazing tutorial! Question about the cost. How do I know how much it costs (open ai api call + supabase function call) ?

  • @ishukatiyar9236
    @ishukatiyar9236 10 месяцев назад

    I am getting "failed to create new function on supabase project" When I run npx supabase deploy ask-custom-base 😢 can anyone help??

  • @jexroid812
    @jexroid812 Год назад

    your tutorial was super awesome and helpful.

  • @meysamjed
    @meysamjed 7 месяцев назад

    Thank you first of all.
    I am not a programmer and I just want to know if this chatbot can be connected to Manychat and used through Instagram?

  • @rezahida8716
    @rezahida8716 Год назад

    i run node server.js and got internal server error 500 ?

  • @PranavKarthik
    @PranavKarthik Год назад

    Thanks for the great tutorial!

  • @worldbest3097
    @worldbest3097 5 месяцев назад

    damn great, is it possbilt to connect chat messagner?

  • @Deus-lo-Vuilt
    @Deus-lo-Vuilt 11 месяцев назад

    Nice thanks for video , I liked

  • @AndreaCadonna
    @AndreaCadonna Год назад

    Brilliant!

  • @Loui3Hunna
    @Loui3Hunna Год назад

    Another banger🔥

  • @paulthomas1052
    @paulthomas1052 Год назад

    Nice video - very useful.

    • @CooperCodes
      @CooperCodes  Год назад +1

      I can't believe I forgot to respond to this! Thank you for the support, glad you found it useful.

  • @automioai
    @automioai Год назад

    Im trying to set up the edge funtion btw Im unable to paste ( or manually type at least ) the acess token, the VS terminal doues not allowme, this is what the terminal says:
    PS C:\Users\xxxxx\SupaBaseDocs> npx supabase init
    Generate VS Code workspace settings? [y/N] y
    Error: open C:\.code-workspace: Access is denied.
    Try rerunning the command with --debug to troubleshoot the error.
    PS C:\Users\Carlos\SupaBaseDocs> npx supabase init --debug
    Generate VS Code workspace settings? [y/N] y
    Error: open C:\.code-workspace: Access is denied.
    Any idea how to pass that ? is one of those issues you dont know how to deal with"

    • @CooperCodes
      @CooperCodes  Год назад +1

      Having worked with edge functions recently, this workspace settings thing is new (Didn't exist in this video). Although unideal what happens when you say "N"? Could be a workaround, as I don't believe you need the VS code workspace settings for it to work.
      answers.microsoft.com/en-us/windows/forum/all/error-in-vs-code-destination-directory-and-says/e70dc626-6b12-4791-a960-8b704e57098d
      According to this it may help to run VS code as an administrator, as it may not have access to certain parts of your folder structure (which then cause the errors).

  • @michaelb1099
    @michaelb1099 Год назад

    ive watched a few times and cant get past this same error running node server.js please help me

    • @automioai
      @automioai Год назад +1

      Take a look at upper and lower cases, most of errors are for little details.

    • @jeremydabao7107
      @jeremydabao7107 Год назад

      did you manage to fix the node server.js error?

  • @bubblesDF
    @bubblesDF Год назад

    Sorry found the proplem i had npx link supabase instead of npx supabase link

  • @eintyp4389
    @eintyp4389 9 месяцев назад

    DO not try this the OpenAI API is depricated... again.

  • @bubblesDF
    @bubblesDF Год назад

    I have copied the code for index.ts , I have updated the keys and url but I get the following error Could not find the function public.match_documents(match_count, match_threshold, query_embedding Has anyone managed to get the code working ?
    Thanks

    • @bubblesDF
      @bubblesDF Год назад

      Seems the code is wronh it should be
      match_documents no longer has a match_threshold parameter
      const { data: documents, error } = await supabaseClient.rpc('match_documents', {
      query_embedding: embedding,

      match_count: 10, // Choose the number of matches

      })