How to Train ChatGPT on Your Data and Chat via Slack (Chat w/ PDF, Docs + MORE)

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

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

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

    Leave your questions below! 😎
    📚 My Free Skool Community: bit.ly/3uRIRB3
    🤝 Work With Me: www.morningside.ai/
    📈 My AI Agency Accelerator: bit.ly/3wxLubP

  • @captainescudodoubloon2947
    @captainescudodoubloon2947 Год назад +4

    I love watching this channel grow. thanks for all you do Liam.

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

      Appreciate the support as always mate

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

    Good job on keeping the beginning developers up to speed

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

    Great work Liam! Nice integration!

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

      Thanks mate 🙏🏼🙏🏼

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

    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?

  • @shotelco
    @shotelco Год назад +14

    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.

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

      I second this

    • @LiamOttley
      @LiamOttley  Год назад +15

      Been working on this exact thing today, video coming soon. Very important topic!

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

      I would love this but outward facing for website visitors. Does anyone know if this is available?

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

    Thanks GOAT

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

    Every video gives to me a bright future life so thank you for your great effort

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

    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.

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

      Yep 😂 let them try

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

      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.

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

    Nice! Thank you for sharing your process. I'd love to upload a pdf of a book and ask questions to it

  • @speuan1
    @speuan1 Год назад +4

    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.

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

      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

  • @ΚυριάκοςΒαρνάβας
    @ΚυριάκοςΒαρνάβας Год назад +1

    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.

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

    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?

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

    be great to query slack itself

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

    Thanks bro, nice video

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

    Thank you Liam

  • @Andrea-oj4jj
    @Andrea-oj4jj Год назад +1

    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?

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

    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.

  • @KimHansen-k6n
    @KimHansen-k6n Год назад +2

    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?

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

      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

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

    Can this be adapted to use Telegram instead of slack?

    • @LiamOttley
      @LiamOttley  Год назад +4

      Might make a quick video for this if you want!

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

      @@LiamOttley would definitely love that

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

      ​@@LiamOttleyPLEASE!!

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

    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.

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

    Berry AI has moved to litellm..how to use it

  • @zodiacTube-ee8vp
    @zodiacTube-ee8vp Год назад

    Is there are recurring charge available for the client for using this kind of chatbot?

  • @1242elena
    @1242elena Год назад

    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?

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

    Please do this with a Reddit loader! This would be truly essential! 🙏

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

    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?

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

      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

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

    So this is fantastic! Can we do the something but for an website messenger bot? Would love to collab on this!

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

      Video coming soon....

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

      @@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

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

    Is this integration free to use or do you need to purchase an api key? Sorry if you covered that

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

    leatle doubth, are a way to add memory to a Bot?, example ask 1 question related to the before without add a specification

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

    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?

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

      I didn't change the URL as shown in the video around 16 min, maybe that's why?

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

      @@andreasostman7351 I ran into the same issue. I did change the URL but it still goes to sleep after a few hours.

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

    Can this be done through Bubble or HubSpot?

  • @elsan.9056
    @elsan.9056 Год назад

    Can you feed it a library of pdf? And urls?

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

    Great video👌 do you think this could work with WhatsApp?

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

    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?

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

      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)

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

      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)

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

    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.

    • @72mkal
      @72mkal Год назад

      I am getting the same.

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

      @@72mkal Me too. Any chance this will be fixed soon?

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

    How to use it on teams ?!

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

    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!

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

    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

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

      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.

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

    It worked fine for the first 4 hours. Then, it stopped working. Is there a reason why?

  • @llmia-n2x
    @llmia-n2x Год назад +1

    Hi can you please give us open source solution,(free solution) , without OpenAi key

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

    You are a fu*king super hero !!!!

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

    great dear

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

    Bit hard to trust any provider with IP

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

    Nice! But a bit hard to follow for non coders

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

    is this completely free?

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

    I love this video because it gives me pleasure and hope so l am sure l should be win in my life

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

    So you mean DialogFlow is now irrelevant?

  • @SomeOne-jz7cn
    @SomeOne-jz7cn Год назад

    Blur your email at 7:45.

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

    So basically just use Cody AI lol

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

      It already does this ha

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

    Too many APis and your company documents will be going into a ton of black boxes.

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

    @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