Hey man, great video! Any chance you can update it since berri ai has changed? Or even better, if you can do one to show how to connect a slack bot to a custom assistant through chat gpt's assistants api?
Very good step-by-step explainer video! Would you consider creating a step-by-step explainer on training a on-premises/private AI system like any of the self-hosted - *fully open source* - Llama variants with an entities private data? Example; RedPajama's fully open-source large language models, has released a 1.2 trillion token dataset following the LLaMA recipe. It 5TB of data. Would one use that first, then add-in ones private datasets? The outcome is to operate an on-site, private ChatGPT-like system with all the functionality of ChatGPT, but without the privacy and cost concerns.
Very few technologies have ever "replaced" an entire human activity in one fell swoop. What usually happens is that the new tech drastically reduces the number of humans needed to perform the same tasks and that makes the job market smaller for that activity, which is exactly what we're seeing with the GPT models. If a project that used to require five devs now requires one, those four that were laid off were indeed replaced by AI even if one is still needed to prompt the model.
Hi Liam, thanks for another fantastic video! One question, when would you use BerriAI rather than Langchain or LlamaIndex, is it more than just economics? I'm a sustainability engineer based in New Zealand, and I think that a bot like this could be a valuable tool for companies to have on hand when a new 500-page sustainability report comes out. Since different engineers have varying perspectives, a one-size-fits-all summary is not feasible, but a bot could be a great solution to this challenge.
Great Video. Should Have millions of views! A quick question. Berri AI free has a limit of 10,000 queries/month. But we do operate this via replit right? So do the queries still count? Or if I upgrade to replit pro, do I have unlimited queries since the code is mainly on replit? I am pretty new at this, so it may be a stupid question. Thank you in advance.
this is good, but it gives me answers about the context out of this document(s) as well. How do I restrict it to ignore msgs that are outside the document it is trained upon?
Hello Liam! Great video! I love your channel! Can you guide me on how to create a BerriAI instance that spans multiple files and URLs, not just one PDF file? Could you provide the Python code for that by making a request to BerriAI's API endpoint?
You mentioned that you can create a bot locally and train it with a custom knowledge base using LAMA. Do you have a video that shows how to do this, or could you create one? Thank you.
Hi Liam, this is great! Following your guide the bot works fine when I talk with it directly. But when I add it to a channel it joins, but doesn't respond to any message to the bot itself inside that channel. What am I missing?
This is only setup for im or “instant messages” to the bot directly. You can add more to the code so that it listens for @ commands. That is a bit more complex so didn’t include in this vid
Would love to see more about training your own model. I want to add a few hundred documents for example. It seems like this works ok but maybe is a limited trial? whats the deal w the berry packages they offer? the free one doesn't mention model tuning, only index tuning and the paid tier just immediately to $1k/mo. Which package did this use and what are the limitations? Would have loved a little explanation around the differences. Trying to get that holy grail custom model so I dont have to hog up valuable memory with system prompts.
Fantastic! I'm just wondering if and or when it will be possible to process multiple pdf files? The url search to scrape websites option seems incredibly limited or only takes information from one page on the website and not all subdirectories, when will this be fixed?
Thank you very much for your sharing. I have successfully deployed the chatbot on Slack. However, my problem is that it is not coherent, meaning that I cannot directly give commands to the chatbot to ask it to explain more. It always asks me to provide more information instead of continuing the previous conversation (chat history). How can I solve this problem?
Hi mate, this doesn’t have chat history so each query needs to have all info in it. It does not perform like ChatGPT because of this factor, chat history is a more complex build
@@LiamOttley Fantastic! The more I get into this AI the more I have come to realize you are one of the top guys training... Keep up the good work! Also, I submitted my entry to the Co-Founders program... some how I can't find the document I created for the content for it. Any chance to get a copy of my submission? Thanks
hi Liam, thank you very much for a great tutorial, my bot is working fine for a couple of hours, then it goes to sleep. Need to restart it all the time? Any thoughts on that?
Excelent tutorial and very usefull tool. Thank you Liam! How could i make it collaborative? I mean, how could it be in a chat with other collaborators interacting with the pdf bot at the same time?
Hi! can i ask you about a problem its showing me? it says "Your URL didn't respond with the value of the challenge parameter." .. tried everyring just like on the video. Thx in advance!
Hi Liam, I have a question on the marketplace of chatGPT plugins. I'm confused on how developers can make money off plugins, because from what I heard chatGPT plugins will be free. I thought it would be similar to wordpress where you have to pay monthly for plugins? Thanks
@LiamOttley. Thank you so much for this. Can i also limit the responses received when chatting my document? I have some more questions, i will be glad if you could help. if you like, i can send you an email
Leave your questions below! 😎
📚 My Free Skool Community: bit.ly/3uRIRB3
🤝 Work With Me: www.morningside.ai/
📈 My AI Agency Accelerator: bit.ly/3wxLubP
I love watching this channel grow. thanks for all you do Liam.
Appreciate the support as always mate
Good job on keeping the beginning developers up to speed
Great work Liam! Nice integration!
Thanks mate 🙏🏼🙏🏼
Hey man, great video! Any chance you can update it since berri ai has changed? Or even better, if you can do one to show how to connect a slack bot to a custom assistant through chat gpt's assistants api?
Very good step-by-step explainer video! Would you consider creating a step-by-step explainer on training a on-premises/private AI system like any of the self-hosted - *fully open source* - Llama variants with an entities private data? Example; RedPajama's fully open-source large language models, has released a 1.2 trillion token dataset following the LLaMA recipe. It 5TB of data. Would one use that first, then add-in ones private datasets? The outcome is to operate an on-site, private ChatGPT-like system with all the functionality of ChatGPT, but without the privacy and cost concerns.
I second this
Been working on this exact thing today, video coming soon. Very important topic!
I would love this but outward facing for website visitors. Does anyone know if this is available?
Thanks GOAT
🫡🫡
Every video gives to me a bright future life so thank you for your great effort
You know how everyone says AI will replace programmers?
I say, good luck! Just imagine someone from "Management" trying to do what Liam just did.
Yep 😂 let them try
Very few technologies have ever "replaced" an entire human activity in one fell swoop. What usually happens is that the new tech drastically reduces the number of humans needed to perform the same tasks and that makes the job market smaller for that activity, which is exactly what we're seeing with the GPT models. If a project that used to require five devs now requires one, those four that were laid off were indeed replaced by AI even if one is still needed to prompt the model.
Nice! Thank you for sharing your process. I'd love to upload a pdf of a book and ask questions to it
Hi Liam, thanks for another fantastic video! One question, when would you use BerriAI rather than Langchain or LlamaIndex, is it more than just economics?
I'm a sustainability engineer based in New Zealand, and I think that a bot like this could be a valuable tool for companies to have on hand when a new 500-page sustainability report comes out. Since different engineers have varying perspectives, a one-size-fits-all summary is not feasible, but a bot could be a great solution to this challenge.
Hi mate, you can use any of them they do basically the same thing. You can spin up a llamaindex index in your replit and just use that all the same
Great Video. Should Have millions of views! A quick question. Berri AI free has a limit of 10,000 queries/month. But we do operate this via replit right? So do the queries still count? Or if I upgrade to replit pro, do I have unlimited queries since the code is mainly on replit? I am pretty new at this, so it may be a stupid question. Thank you in advance.
this is good, but it gives me answers about the context out of this document(s) as well. How do I restrict it to ignore msgs that are outside the document it is trained upon?
be great to query slack itself
Thanks bro, nice video
Thank you Liam
Hello Liam! Great video! I love your channel! Can you guide me on how to create a BerriAI instance that spans multiple files and URLs, not just one PDF file? Could you provide the Python code for that by making a request to BerriAI's API endpoint?
You mentioned that you can create a bot locally and train it with a custom knowledge base using LAMA. Do you have a video that shows how to do this, or could you create one? Thank you.
See my most recent vid!
Hi Liam, this is great! Following your guide the bot works fine when I talk with it directly. But when I add it to a channel it joins, but doesn't respond to any message to the bot itself inside that channel. What am I missing?
This is only setup for im or “instant messages” to the bot directly. You can add more to the code so that it listens for @ commands. That is a bit more complex so didn’t include in this vid
Can this be adapted to use Telegram instead of slack?
Might make a quick video for this if you want!
@@LiamOttley would definitely love that
@@LiamOttleyPLEASE!!
Would love to see more about training your own model. I want to add a few hundred documents for example. It seems like this works ok but maybe is a limited trial? whats the deal w the berry packages they offer? the free one doesn't mention model tuning, only index tuning and the paid tier just immediately to $1k/mo. Which package did this use and what are the limitations? Would have loved a little explanation around the differences. Trying to get that holy grail custom model so I dont have to hog up valuable memory with system prompts.
Berry AI has moved to litellm..how to use it
Is there are recurring charge available for the client for using this kind of chatbot?
Fantastic! I'm just wondering if and or when it will be possible to process multiple pdf files? The url search to scrape websites option seems incredibly limited or only takes information from one page on the website and not all subdirectories, when will this be fixed?
Please do this with a Reddit loader! This would be truly essential! 🙏
Thank you very much for your sharing. I have successfully deployed the chatbot on Slack. However, my problem is that it is not coherent, meaning that I cannot directly give commands to the chatbot to ask it to explain more. It always asks me to provide more information instead of continuing the previous conversation (chat history). How can I solve this problem?
Hi mate, this doesn’t have chat history so each query needs to have all info in it. It does not perform like ChatGPT because of this factor, chat history is a more complex build
So this is fantastic! Can we do the something but for an website messenger bot? Would love to collab on this!
Video coming soon....
@@LiamOttley Fantastic! The more I get into this AI the more I have come to realize you are one of the top guys training... Keep up the good work!
Also, I submitted my entry to the Co-Founders program... some how I can't find the document I created for the content for it. Any chance to get a copy of my submission? Thanks
Is this integration free to use or do you need to purchase an api key? Sorry if you covered that
leatle doubth, are a way to add memory to a Bot?, example ask 1 question related to the before without add a specification
hi Liam, thank you very much for a great tutorial, my bot is working fine for a couple of hours, then it goes to sleep. Need to restart it all the time? Any thoughts on that?
I didn't change the URL as shown in the video around 16 min, maybe that's why?
@@andreasostman7351 I ran into the same issue. I did change the URL but it still goes to sleep after a few hours.
Can this be done through Bubble or HubSpot?
Can you feed it a library of pdf? And urls?
Great video👌 do you think this could work with WhatsApp?
Excelent tutorial and very usefull tool. Thank you Liam! How could i make it collaborative? I mean, how could it be in a chat with other collaborators interacting with the pdf bot at the same time?
I ended up with this code but bot does not answer questions in colaborative channels:
import os
import logging
from flask import Flask, request
from slack_bolt import App
from slack_bolt.oauth.oauth_settings import OAuthSettings
from slack_sdk.oauth.installation_store import FileInstallationStore
from slack_sdk.oauth.state_store import FileOAuthStateStore
from slack_bolt.adapter.flask import SlackRequestHandler
from slack_sdk import WebClient
from waitress import serve
import requests
# Define constants
INSTALLATIONS_DIR = './data/installations/'
STATES_DIR = './data/states/'
CLIENT_ID = os.environ["CLIENT_ID"]
CLIENT_SECRET = os.environ["CLIENT_SECRET"]
SIGNING_SECRET = os.environ["SIGNING_SECRET"]
SLACK_TOKEN = os.environ["SLACK_TOKEN"]
FIXED_API_ENDPOINT = os.environ["API_ENDPOINT"]
CHANNEL_ID = "C058ERUHDTN" # Reemplaza con el ID correcto del canal
# Set up directories
def setup_directory(dir_path):
if not os.path.exists(dir_path):
os.makedirs(dir_path)
os.chmod(dir_path, 0o755)
setup_directory(INSTALLATIONS_DIR)
setup_directory(STATES_DIR)
# Set up logging
logging.basicConfig(level=logging.DEBUG)
# OAuth settings and app initialization
oauth_settings = OAuthSettings(
client_id=CLIENT_ID,
client_secret=CLIENT_SECRET,
scopes=[
"chat:write", "im:write", "im:history", "chat:write.public", "commands"
],
installation_store=FileInstallationStore(base_dir=INSTALLATIONS_DIR),
state_store=FileOAuthStateStore(expiration_seconds=600, base_dir=STATES_DIR),
redirect_uri="pdfbot-slack--jaimemendez2.repl.co/slack/oauth_redirect",
)
app = App(signing_secret=SIGNING_SECRET, oauth_settings=oauth_settings)
# WebClient for sending messages
client = WebClient(token=SLACK_TOKEN)
# Event listener for DMs (Direct Messages)
@app.event("message")
def handle_message(body, event, say):
if event.get("channel_type") == "im":
message_text = event['text']
# OPTIONAL: add 'thinking' message
# say("Thinking...")
response = requests.get(FIXED_API_ENDPOINT + message_text)
response_text = response.json()[
'response'] if response.status_code == 200 else f"Request failed with status code {response.status_code}"
say(response_text, channel=event['channel'])
# Event listener for channel messages
@app.event("message")
def handle_channel_message(body, event, say):
if event.get("channel_type") == "channel" and event.get("channel") == CHANNEL_ID:
message_text = event['text']
# OPCIONAL: Agregar un mensaje de "pensando" si deseas
# say("Pensando...")
response = requests.get(FIXED_API_ENDPOINT + message_text)
response_text = response.json()[
'response'] if response.status_code == 200 else f"Solicitud fallida con código de estado {response.status_code}"
say(response_text, channel=event['channel'])
# Flask app and routes
flask_app = Flask(__name__)
handler = SlackRequestHandler(app)
@flask_app.route("/slack/events", methods=["POST"])
def slack_events():
return handler.handle(request)
@flask_app.route("/slack/install", methods=["GET"])
def install():
return handler.handle(request)
@flask_app.route("/slack/oauth_redirect", methods=["GET"])
def oauth_redirect():
return handler.handle(request)
@flask_app.route('/')
def hello_world():
return '¡Hola desde la instancia del bot de Slack! Ahora probando OAuth'
# Run the app on Waitress server
if __name__ == "__main__":
serve(flask_app, host='0.0.0.0', port=81)
It is working in channels now! I share it
import os
import logging
from flask import Flask, request
from slack_bolt import App
from slack_bolt.oauth.oauth_settings import OAuthSettings
from slack_sdk.oauth.installation_store import FileInstallationStore
from slack_sdk.oauth.state_store import FileOAuthStateStore
from slack_bolt.adapter.flask import SlackRequestHandler
from slack_sdk import WebClient
from waitress import serve
import requests
# Define constants
INSTALLATIONS_DIR = './data/installations/'
STATES_DIR = './data/states/'
CLIENT_ID = os.environ["CLIENT_ID"]
CLIENT_SECRET = os.environ["CLIENT_SECRET"]
SIGNING_SECRET = os.environ["SIGNING_SECRET"]
SLACK_TOKEN = os.environ["SLACK_TOKEN"]
FIXED_API_ENDPOINT = os.environ["API_ENDPOINT"]
CHANNEL_ID = os.environ["CHANNEL_ID"] # Reemplaza con el ID correcto del canal
# Set up directories
def setup_directory(dir_path):
if not os.path.exists(dir_path):
os.makedirs(dir_path)
os.chmod(dir_path, 0o755)
setup_directory(INSTALLATIONS_DIR)
setup_directory(STATES_DIR)
# Set up logging
logging.basicConfig(level=logging.DEBUG)
# OAuth settings and app initialization
oauth_settings = OAuthSettings(
client_id=CLIENT_ID,
client_secret=CLIENT_SECRET,
scopes=[
"chat:write", "im:write", "im:history", "chat:write.public", "commands"
],
installation_store=FileInstallationStore(base_dir=INSTALLATIONS_DIR),
state_store=FileOAuthStateStore(expiration_seconds=600, base_dir=STATES_DIR),
redirect_uri="pdfbot-slack--jaimemendez2.repl.co/slack/oauth_redirect",
)
app = App(signing_secret=SIGNING_SECRET, oauth_settings=oauth_settings)
# WebClient for sending messages
client = WebClient(token=SLACK_TOKEN)
# Event listener for DMs (Direct Messages) and channel messages
@app.event("message")
def handle_message(body, event, say):
channel_type = event.get("channel_type")
channel_id = event.get("channel")
text = event.get("text", "")
bot_user_id = ""
if channel_type == "im" or (channel_type == "channel" and bot_user_id in text):
message_text = event['text']
response = requests.get(FIXED_API_ENDPOINT + message_text)
response_text = response.json()[
'response'] if response.status_code == 200 else f"Solicitud fallida con código de estado {response.status_code}"
say(response_text, channel=event['channel'])
# Flask app and routes
flask_app = Flask(__name__)
handler = SlackRequestHandler(app)
@flask_app.route("/slack/events", methods=["POST"])
def slack_events():
return handler.handle(request)
@flask_app.route("/slack/install", methods=["GET"])
def install():
return handler.handle(request)
@flask_app.route("/slack/oauth_redirect", methods=["GET"])
def oauth_redirect():
return handler.handle(request)
@flask_app.route('/')
def hello_world():
return '¡Hola desde la instancia del bot de Slack! Ahora probando OAuth'
# Run the app on Waitress server
if __name__ == "__main__":
serve(flask_app, host='0.0.0.0', port=81)
I am getting this error on slack when I enable the events and paste my link
Your URL didn't respond with the value of the challenge parameter.
I am getting the same.
@@72mkal Me too. Any chance this will be fixed soon?
How to use it on teams ?!
Hi! can i ask you about a problem its showing me? it says "Your URL didn't respond with the value of the challenge parameter." .. tried everyring just like on the video. Thx in advance!
Hi Liam, I have a question on the marketplace of chatGPT plugins. I'm confused on how developers can make money off plugins, because from what I heard chatGPT plugins will be free. I thought it would be similar to wordpress where you have to pay monthly for plugins? Thanks
Would be an app that when installed requires you to sign in to the plug-in site itself. That's the only way I can think of that would work.
It worked fine for the first 4 hours. Then, it stopped working. Is there a reason why?
Hi can you please give us open source solution,(free solution) , without OpenAi key
You are a fu*king super hero !!!!
great dear
Bit hard to trust any provider with IP
Nice! But a bit hard to follow for non coders
is this completely free?
I love this video because it gives me pleasure and hope so l am sure l should be win in my life
So you mean DialogFlow is now irrelevant?
Blur your email at 7:45.
So basically just use Cody AI lol
It already does this ha
Too many APis and your company documents will be going into a ton of black boxes.
@LiamOttley. Thank you so much for this. Can i also limit the responses received when chatting my document? I have some more questions, i will be glad if you could help. if you like, i can send you an email