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!
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)?
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
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!
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?
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
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
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.
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"
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).
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
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,
Mom clear the calendar, Cooper just uploaded a new video
Hahahah thanks for the comment 😂
this deserves so much more views! True germ! Thank you!
how does this not have more views
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!
Just what I was looking for. Thank you
No prob, I got you 👍
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)?
brilliant video by the way, there are some projects where you feel joy making it this was one of them
Thank you, glad you found it enjoyable :) Thanks again for your comment
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
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!
Time to make this as my NLP Final Project 🔥
Hahaha best of luck Rayno!
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?
I recommend checking out pdfjs, had a similar question and it came in pretty useful
Awesome video man. Really well explained. Thank you!
Is there a way to include news article links for the bot to learn and provide responses with that content?
Thanks a lot. How to use supabase openAPI schema inside GPT4?
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
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
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.
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) ?
I am getting "failed to create new function on supabase project" When I run npx supabase deploy ask-custom-base 😢 can anyone help??
your tutorial was super awesome and helpful.
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?
i run node server.js and got internal server error 500 ?
Thanks for the great tutorial!
damn great, is it possbilt to connect chat messagner?
Nice thanks for video , I liked
Brilliant!
Another banger🔥
Yessir! Thanks for watching :)
Nice video - very useful.
I can't believe I forgot to respond to this! Thank you for the support, glad you found it useful.
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"
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).
ive watched a few times and cant get past this same error running node server.js please help me
Take a look at upper and lower cases, most of errors are for little details.
did you manage to fix the node server.js error?
Sorry found the proplem i had npx link supabase instead of npx supabase link
DO not try this the OpenAI API is depricated... again.
What should we do then
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
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
})