{"id":208955,"date":"2024-07-09T11:59:26","date_gmt":"2024-07-09T15:59:26","guid":{"rendered":"https:\/\/ibkrcampus.com\/?p=208955"},"modified":"2024-08-12T15:06:33","modified_gmt":"2024-08-12T19:06:33","slug":"build-a-warren-buffett-chatbot-using-openais-api","status":"publish","type":"post","link":"https:\/\/www.interactivebrokers.com\/campus\/ibkr-quant-news\/build-a-warren-buffett-chatbot-using-openais-api\/","title":{"rendered":"Build a Warren Buffett Chatbot using OpenAI\u2019s API"},"content":{"rendered":"\n<p><em>The article &#8220;Build a Warren Buffett Chatbot using OpenAI\u2019s API&#8221; first appeared on <a href=\"https:\/\/algotrading101.com\/learn\/warren-buffett-chatbot-chatgpt-openai\/\">AlgoTrading101<\/a> blog.<\/em><\/p>\n\n\n\n<p><em>Excerpt<\/em><\/p>\n\n\n\n<p><em>Note that this article does not refer to custom GPTs. Using custom GPTs, it is possible to build a Warren Buffett chatbot without code. Learn more about custom GPTs&nbsp;<a href=\"https:\/\/openai.com\/blog\/introducing-gpts\">here<\/a>.<\/em><\/p>\n\n\n\n<p>Table of contents:<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li>How to build a Warren Buffett Chatbot<\/li>\n\n\n\n<li>What is OpenAI?<\/li>\n\n\n\n<li>What is ChatGPT?<\/li>\n\n\n\n<li>What is Whisper?<\/li>\n\n\n\n<li>What is StableWhisper?<\/li>\n\n\n\n<li>Getting started<\/li>\n\n\n\n<li>What is Diarization?<\/li>\n\n\n\n<li>How to perform diarization and transcription with Whisper?\n<ul class=\"wp-block-list\">\n<li>Installing pre-requisites<\/li>\n\n\n\n<li>Transcription and diarization<\/li>\n\n\n\n<li>Cleaning videos and transcripts<\/li>\n<\/ul>\n<\/li>\n\n\n\n<li>What is fine-tuning?<\/li>\n\n\n\n<li>How to organize the data for ChatGPT finetuning?<\/li>\n\n\n\n<li>How to fine-tune ChatGPT on your own data?<\/li>\n\n\n\n<li>How to chat with Warren Buffett using ChatGPT?<\/li>\n\n\n\n<li>My thoughts and ideas<\/li>\n\n\n\n<li>Full code<\/li>\n<\/ol>\n\n\n\n<p><\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-how-to-build-a-warren-buffett-chatbot-using-openai\">How to build a Warren Buffett Chatbot using OpenAI?<\/h2>\n\n\n\n<p>First, we will collect data on Warren Buffett\u2019s market knowledge via video interviews. Next, we will clean and process this data. Lastly, using OpenAI\u2019s API, we will fine-tune our own ChatGPT model by training it on the prepared data.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-what-is-openai\">What is OpenAI?<\/h2>\n\n\n\n<p>OpenAI is an American artificial intelligence research laboratory that is primarily focused on NLP tasks through using Large Language Models (LLMS) such as ChatGPT, Whisper, and the like.<\/p>\n\n\n\n<p><a>Link to website:&nbsp;<\/a><a href=\"https:\/\/openai.com\/\">https:\/\/openai.com<\/a><\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-what-is-chatgpt\">What is ChatGPT?<\/h2>\n\n\n\n<p>ChatGPT is an LLM developed by OpenAI that is used for solving a wide range of tasks ranging from finance to bedtime stories.<\/p>\n\n\n\n<p><a>Link to website:&nbsp;<\/a><a href=\"https:\/\/chat.openai.com\/\">https:\/\/chat.openai.com<\/a><\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-what-is-whisper\">What is Whisper?<\/h2>\n\n\n\n<p>Whisper is an automatic speech recognition (ASR) system trained on 680,000 hours of multilingual and multitask supervised data collected from the web. It is great for transcription and similar tasks.<\/p>\n\n\n\n<p><a>Link to repo:&nbsp;<\/a><a href=\"https:\/\/github.com\/openai\/whisper\">https:\/\/github.com\/openai\/whisper<\/a><\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-what-is-stablewhisper\">What is StableWhisper?<\/h2>\n\n\n\n<p>StableWhisper is an alteration of OpenAI\u2019s Whisper model that produces more reliable timestamps.<\/p>\n\n\n\n<p>The issue with the original Whisper is that it is prone to overshoot segments and thus produce unreliable timestamps that end up with sentences being cut up halfway and similar. This isn\u2019t a big issue if we want to do summaries but for diarization, it reduces our accuracy.<\/p>\n\n\n\n<p>There are procedures that can make these realignments on the original Whisper output such as using Wav2Vec2, and different punctuation models. Depending on your use case, this might be overkill and I\u2019ve opted for using StableWhisper that doesn\u2019t solve all the issues but helps considerably.<\/p>\n\n\n\n<p><a>Link to the repo:&nbsp;<\/a><a href=\"https:\/\/github.com\/jianfch\/stable-ts\/tree\/main\">jianfch\/stable-ts: ASR with reliable word-level timestamps using OpenAI\u2019s Whisper (github.com)<\/a><\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-getting-started\">Getting started<\/h2>\n\n\n\n<p>This article will have the goal of creating an AI Chatbot that will simulate chatting with Warren Buffett with ChatGPT.<\/p>\n\n\n\n<p>To achieve such a goal, we will need to do several things that will be laid out below:<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li>Collect training data<\/li>\n\n\n\n<li>Clean and organize the training data<\/li>\n\n\n\n<li>Finetune ChatGPT on the data<\/li>\n\n\n\n<li>Chat<\/li>\n<\/ol>\n\n\n\n<p>The amount of data that we will be using in this article won\u2019t be too much so that the reader can follow the article without issues and also for brevity.<\/p>\n\n\n\n<p>The audios that we will use are these three YouTube videos that are picked semi-randomly where Warren Buffett was interviewed or hosted:<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li><a href=\"https:\/\/youtu.be\/JvEas_zZ4fM\">Watch CNBC\u2019s full interview with Berkshire Hathaway CEO Warren Buffett<\/a><\/li>\n\n\n\n<li><a href=\"https:\/\/www.youtube.com\/watch?v=SEZwkbliJr8\">Warren Buffett reveals his investment strategy for mastering the market<\/a><\/li>\n\n\n\n<li><a href=\"https:\/\/www.youtube.com\/watch?v=UKw_NjWtg5w\">Warren Buffett and Charlie Munger join the 2023 Berkshire Hathaway annual meeting \u2014 5\/6\/23<\/a><br><a href=\"https:\/\/www.youtube.com\/@CNBCtelevision\"><\/a><a href=\"https:\/\/www.youtube.com\/@YahooFinance\"><\/a><a href=\"https:\/\/www.youtube.com\/@CNBCtelevision\"><\/a><a href=\"https:\/\/www.youtube.com\/@CNBCtelevision\"><\/a><\/li>\n<\/ol>\n\n\n\n<p>Each video is different and will present its own challenge. The difference between videos 1 and 2 is that the interviewers are of different sexes which results in the male voice being more \u201csimilar\u201d to Warren\u2019s which could pose a threat to the diarization accuracy.<\/p>\n\n\n\n<p>The third video is very long and has many speakers and it showcases the issue that these models face for panel formats of discussion.<\/p>\n\n\n\n<p>When it comes to text data, for best results it would require a different treatment and use of a vector database which I\u2019ll show in another article.<\/p>\n\n\n\n<p>One thing to note is that you can easily extend the training data by adding more videos to it. You can also add other types of personas such as Soros and thus combine a&nbsp;hybrid value investor and macro trader.<\/p>\n\n\n\n<p>You could also split the data to get different versions of Warren Buffett such as the one previous to the year X and the other after.<\/p>\n\n\n\n<p>For this, I\u2019ll be using my own PC that has an ASUS ROG Strix RTX3060 12GB GPU. For those that don\u2019t have a GPU or have a weaker one, I suggest using Kaggle or Google Colab as they offer free ones.<\/p>\n\n\n\n<p>Now that we have covered the main points, let us work with the videos.<\/p>\n\n\n\n<p>Make sure that you have a fresh environment to work in. I usually use conda:<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">conda create -n buffett<\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">What is Diarization?<\/h2>\n\n\n\n<p>Diarization is a process in speech processing that involves identifying and segmenting different speakers in an audio recording. Essentially, it\u2019s about determining \u201cwho spoke when\u201d which is useful for tasks such as transcribing multi-speaker conversations.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">How to perform diarization and transcription with Whisper?<\/h2>\n\n\n\n<p>To perform diarization and prescription with Whisper, we will need to use another approach as Whisper sadly doesn\u2019t perform diarization out-of-the-box at the time of writing.<\/p>\n\n\n\n<p>Moreover, we will be using the StableWhisper library and not the original Whisper one to gain on performance.<\/p>\n\n\n\n<p>There are only a couple of diarization projects out there with mixed results. It seems that there aren\u2019t a lot of contributions to the diarization process overall (well, at least open-source ones) that solve the problem with high accuracy.<\/p>\n\n\n\n<p>I tried out a few of them such as the pyannote gated HuggingFace model and have found that it doesn\u2019t perform better than a simple clustering pipeline I wrote. I found one HugginFace project and refactored it as the code for it wasn\u2019t the best and was kept strictly inside HuggingFace.<\/p>\n\n\n\n<p>The refactored version that can perform both transcription and diarization can be found on our AlgoTrading101 GitHub repository and can easily be used and cloned into Kaggle, Google Colab, locally and etc.<\/p>\n\n\n\n<p><a>The project features a Gradio UI and has improved and cleaned code from its original version which can be found on&nbsp;<\/a><a href=\"https:\/\/huggingface.co\/spaces\/vumichien\/Whisper_speaker_diarization\">HugginFace<\/a>&nbsp;which wasn\u2019t coded by me.&nbsp;<a href=\"https:\/\/github.com\/AlgoTrading101\/AlgoTrading101-Buffet-ChatGPT\">My version<\/a>&nbsp;features a more accurate diarization process, more accurate transcriptions and timestamps, and other quality improvements.<\/p>\n\n\n\n<p>It was a quick refactor, and PRs are welcome.<\/p>\n\n\n\n<p>You can also use the HuggingFace version and skip the bottom installation header part but it often fails for me.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Installing pre-requisites<\/h3>\n\n\n\n<p>We\u2019ll start by installing the prerequisites that will ensure that you can use the above repo. First, clone the repo and install its requirements in a fresh environment that we created.<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">$ git clone https:\/\/github.com\/AlgoTrading101\/AlgoTrading101-Warren-Buffett-ChatGPT.git\n$ pip install -r requirements.txt\n$ pip install -qq https:\/\/github.com\/pyannote\/pyannote-audio\/archive\/refs\/heads\/develop.zip<\/pre>\n\n\n\n<p>After that, create a&nbsp;<code>.env<\/code>&nbsp;file in the root of the repository by following the example template in&nbsp;<code>env.example<\/code>. The most important variable is to set your&nbsp;<code>HUGGINGFACE_TOKEN<\/code>&nbsp;as this will be needed to get the models that we will use from HuggingFace.<\/p>\n\n\n\n<p>If you don\u2019t have a token, please navigate to their website and create an account by clicking the \u201cSign Up\u201d button in the upper right corner.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" width=\"1100\" height=\"439\" data-src=\"\/campus\/wp-content\/uploads\/sites\/2\/2024\/07\/huggingface_main_website-2048x818-1-1100x439.jpg\" alt=\"\" class=\"wp-image-208969 lazyload\" data-srcset=\"https:\/\/ibkrcampus.com\/campus\/wp-content\/uploads\/sites\/2\/2024\/07\/huggingface_main_website-2048x818-1-1100x439.jpg 1100w, https:\/\/ibkrcampus.com\/campus\/wp-content\/uploads\/sites\/2\/2024\/07\/huggingface_main_website-2048x818-1-700x280.jpg 700w, https:\/\/ibkrcampus.com\/campus\/wp-content\/uploads\/sites\/2\/2024\/07\/huggingface_main_website-2048x818-1-300x120.jpg 300w, https:\/\/ibkrcampus.com\/campus\/wp-content\/uploads\/sites\/2\/2024\/07\/huggingface_main_website-2048x818-1-768x307.jpg 768w, https:\/\/ibkrcampus.com\/campus\/wp-content\/uploads\/sites\/2\/2024\/07\/huggingface_main_website-2048x818-1-1536x614.jpg 1536w, https:\/\/ibkrcampus.com\/campus\/wp-content\/uploads\/sites\/2\/2024\/07\/huggingface_main_website-2048x818-1.jpg 2048w\" data-sizes=\"(max-width: 1100px) 100vw, 1100px\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" style=\"--smush-placeholder-width: 1100px; aspect-ratio: 1100\/439;\" \/><\/figure>\n\n\n\n<p>When you log into your account, click on your account icon in the upper right corner and navigate to Settings and then on the left menu click Access Tokens.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" width=\"756\" height=\"379\" data-src=\"\/campus\/wp-content\/uploads\/sites\/2\/2024\/07\/hugginface_token.png\" alt=\"\" class=\"wp-image-208983 lazyload\" data-srcset=\"https:\/\/ibkrcampus.com\/campus\/wp-content\/uploads\/sites\/2\/2024\/07\/hugginface_token.png 756w, https:\/\/ibkrcampus.com\/campus\/wp-content\/uploads\/sites\/2\/2024\/07\/hugginface_token-700x351.png 700w, https:\/\/ibkrcampus.com\/campus\/wp-content\/uploads\/sites\/2\/2024\/07\/hugginface_token-300x150.png 300w\" data-sizes=\"(max-width: 756px) 100vw, 756px\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" style=\"--smush-placeholder-width: 756px; aspect-ratio: 756\/379;\" \/><\/figure>\n\n\n\n<p>There you can create a new token with \u201cread\u201d permissions and paste it into your env.<\/p>\n\n\n\n<p><a>The next two things are&nbsp;<strong>only&nbsp;<\/strong>for users that want to run this&nbsp;<strong>locally<\/strong>. Ensure that you have&nbsp;<code>ffmpeg<\/code>&nbsp;installed. To quickly check for this open up a terminal and run&nbsp;<code>ffmpeg<\/code>. If you don\u2019t see anything popping up with the version number and similar, there is an installation guide for each major OS&nbsp;<\/a><a href=\"https:\/\/www.videoproc.com\/resource\/how-to-install-ffmpeg.htm\">here<\/a>.<\/p>\n\n\n\n<p>Because we are using PyTorch, you will probably want to re-install it with your adequate version of Cuda by using this link&nbsp;<a href=\"https:\/\/pytorch.org\/get-started\/locally\/\">here<\/a>. I will rely on the CUDA that conda provides by following this link over&nbsp;<a href=\"https:\/\/pytorch.org\/get-started\/locally\/\">here<\/a>&nbsp;and selecting the latest supported version:<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">conda install pytorch torchvision torchaudio pytorch-cuda=11.8 -c pytorch -c nvidia<\/pre>\n\n\n\n<p>To see up to which version your GPU supports the CUDA, you can run this command and read the version number in the upper right corner:<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">nvidia-smi<\/pre>\n\n\n\n<p>To start the Gradio UI, we run the following (if you face issues with HuggingFace, I suggest running it as an administrator for the first time so it can pull the models easily):<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">python main.py<\/pre>\n\n\n\n<p>Now navigate to this URL to access it: https:\/\/127.0.0.1:7860\/<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" width=\"1100\" height=\"744\" data-src=\"\/campus\/wp-content\/uploads\/sites\/2\/2024\/07\/transcription-diarization-2048x1385-1-1100x744.jpg\" alt=\"\" class=\"wp-image-208975 lazyload\" data-srcset=\"https:\/\/ibkrcampus.com\/campus\/wp-content\/uploads\/sites\/2\/2024\/07\/transcription-diarization-2048x1385-1-1100x744.jpg 1100w, https:\/\/ibkrcampus.com\/campus\/wp-content\/uploads\/sites\/2\/2024\/07\/transcription-diarization-2048x1385-1-700x473.jpg 700w, https:\/\/ibkrcampus.com\/campus\/wp-content\/uploads\/sites\/2\/2024\/07\/transcription-diarization-2048x1385-1-300x203.jpg 300w, https:\/\/ibkrcampus.com\/campus\/wp-content\/uploads\/sites\/2\/2024\/07\/transcription-diarization-2048x1385-1-768x519.jpg 768w, https:\/\/ibkrcampus.com\/campus\/wp-content\/uploads\/sites\/2\/2024\/07\/transcription-diarization-2048x1385-1-1536x1039.jpg 1536w, https:\/\/ibkrcampus.com\/campus\/wp-content\/uploads\/sites\/2\/2024\/07\/transcription-diarization-2048x1385-1.jpg 2048w\" data-sizes=\"(max-width: 1100px) 100vw, 1100px\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" style=\"--smush-placeholder-width: 1100px; aspect-ratio: 1100\/744;\" \/><\/figure>\n\n\n\n<p>If you want all of this inside a notebook, you can move the contents of&nbsp;<code>main.py<\/code>&nbsp;into a notebook and run it that way.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Transcription and diarization<\/h3>\n\n\n\n<p>We begin our transcription and diarization process by pasting our YouTube video URL and then clicking the \u201cDownload YouTube video\u201d button. After the video has been downloaded, you will be able to play it to confirm that it is functional.<\/p>\n\n\n\n<p><strong>Note:<\/strong>&nbsp;If the video is too long, sometimes it won\u2019t appear straight away as it is being rendered and you can check if it is downloaded by observing your file structure or console output. But, you still need to wait for it to appear in order to continue the process. This can take some time depending on the video length.<\/p>\n\n\n\n<p>The next step is to select the Whisper model you want to use, and the assumed number of speakers in the video.<\/p>\n\n\n\n<p>The model that I suggest using is the large-v2 one as it offers the best transcription accuracy and segmentation. I\u2019ve tried the lower ones and they had mixed accuracy results. The base one is also fine.<\/p>\n\n\n\n<p>The goal of this article is to show you what you can do and how to do it. You can bring in more advanced pipelines and experiment with different models and use cases.<\/p>\n\n\n\n<p>When it comes to the number of speakers, if you set it to 0 speakers, it will try to dynamically infer the number of speakers. It is not the best at doing it so I suggest setting this number if you know it or aren\u2019t too lazy to check as the dynamic recognition needs improvements to be more precise.<\/p>\n\n\n\n<p>It can also be an assumed number of speakers.<\/p>\n\n\n\n<p>Now, click the \u201cTranscribe audio and diarization\u201d button and watch the magic happen. When it completes, and it usually doesn\u2019t take too long, you will see your dataset at the bottom of the page. You will also be able to find its CSV in the output folder.<\/p>\n\n\n\n<p>The diarization works by applying three clustering algorithms (KMeans, Agglomerative Clustering, and a Gaussian Mixture Model) on the audio segment embeddings and labeling the segment with a vote where 2\/3 algorithms agreed.<\/p>\n\n\n\n<p>This ensures the higher accuracy of the diarization and avoids relying on just one algorithm. I\u2019ve found this approach to work well and it doesn\u2019t require the usage of fancy neural networks and similar big models.<\/p>\n\n\n\n<p>If you are using this on a Cloud or the like, you can also download the output to your local computer by pressing the download button inside the UI.<\/p>\n\n\n\n<p>The dataset will have your transcript with adequate timestamps and speaker(s).<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" width=\"1100\" height=\"566\" data-src=\"\/campus\/wp-content\/uploads\/sites\/2\/2024\/07\/diarization_result-1100x566.jpg\" alt=\"\" class=\"wp-image-208977 lazyload\" data-srcset=\"https:\/\/ibkrcampus.com\/campus\/wp-content\/uploads\/sites\/2\/2024\/07\/diarization_result-1100x566.jpg 1100w, https:\/\/ibkrcampus.com\/campus\/wp-content\/uploads\/sites\/2\/2024\/07\/diarization_result-700x360.jpg 700w, https:\/\/ibkrcampus.com\/campus\/wp-content\/uploads\/sites\/2\/2024\/07\/diarization_result-300x154.jpg 300w, https:\/\/ibkrcampus.com\/campus\/wp-content\/uploads\/sites\/2\/2024\/07\/diarization_result-768x395.jpg 768w, https:\/\/ibkrcampus.com\/campus\/wp-content\/uploads\/sites\/2\/2024\/07\/diarization_result-1536x790.jpg 1536w, https:\/\/ibkrcampus.com\/campus\/wp-content\/uploads\/sites\/2\/2024\/07\/diarization_result.jpg 1594w\" data-sizes=\"(max-width: 1100px) 100vw, 1100px\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" style=\"--smush-placeholder-width: 1100px; aspect-ratio: 1100\/566;\" \/><\/figure>\n\n\n\n<p>In the Full code section of this article, you will find all the datasets inside the output folder of our repo.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Cleaning videos and transcripts<\/h3>\n\n\n\n<p>When it comes to (pre\/post)processing your videos and transcripts, you can cut out the parts from the videos where Warren Buffett wasn\u2019t a part of the conversation as you can argue that we don\u2019t need those.<\/p>\n\n\n\n<p>This is the case for the last video labeled with the number 3 in which Buffett started speaking around the 1 hour mark. Thus, we will need to intercept the workflow. I\u2019ll trim the part up to the 1-hour mark and split the remainder into 4 parts so that it can fit into my memory without issues.<\/p>\n\n\n\n<p>The next thing that I\u2019ll do for all transcripts is to deal with the fact that even the StableWhisper overshoots or undershoots a peculiar segment which can mess with the diarization clustering algorithms as they get leakage from its neighboring segment which can result in interesting results.<\/p>\n\n\n\n<p>To combat this and increase accuracy I will create a cleaning pipeline that will check if a sentence is stopped midway and tape it back together where it is obvious. For example, ending a sentence with a comma, next row starting with a lowercase word or number, etc.<\/p>\n\n\n\n<p>We will also merge the speaker into one if it repeats for two or more rows. The pipeline can be found inside the&nbsp;<code>clean.ipynb<\/code>&nbsp;notebook and is an optional but recommended step. Feel free to think of ways to improve this pipeline and make it more robust.<\/p>\n\n\n\n<p>To completely fix the Whisper issue, we would need more heavy AI algorithms that I\u2019ve mentioned before. As improved models of Whisper and diarization algorithms come out, this will be less of an issue.<\/p>\n\n\n\n<p>Now that the datasets are cleaned, I will rename the speaker columns into \u201cBUFFETT\u201d where it makes sense and merge all datasets into a single one. I will also do some manual cleaning as Buffett stutters can mess up the segments and overall diarization.<\/p>\n\n\n\n<p><em>Visit <a href=\"https:\/\/algotrading101.com\/learn\/warren-buffett-chatbot-chatgpt-openai\/\">AlgoTrading101<\/a>&nbsp;blog to read about ChatGPT finetuning.<\/em><\/p>\n","protected":false},"excerpt":{"rendered":"<p>First, we will collect data on Warren Buffett\u2019s market knowledge via video interviews. Next, we will clean and process this data.<\/p>\n","protected":false},"author":815,"featured_media":182748,"comment_status":"open","ping_status":"closed","sticky":true,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[339,343,349,338,341],"tags":[16684,851,14403,7091,17404,806,17401,17406,17403,17405,17407,852,2860,14715,595,10883,17402],"contributors-categories":[13746],"class_list":{"0":"post-208955","1":"post","2":"type-post","3":"status-publish","4":"format-standard","5":"has-post-thumbnail","7":"category-data-science","8":"category-programing-languages","9":"category-python-development","10":"category-ibkr-quant-news","11":"category-quant-development","12":"tag-agglomerative-clustering","13":"tag-algo-trading","14":"tag-chatgpt","15":"tag-conda","16":"tag-cuda","17":"tag-data-science","18":"tag-diarization","19":"tag-gaussian-mixture-model","20":"tag-huggingface","21":"tag-kmeans","22":"tag-llm","23":"tag-machine-learning","24":"tag-nlp","25":"tag-openai","26":"tag-python","27":"tag-pytorch","28":"tag-stablewhisper-library","29":"contributors-categories-algotrading101"},"pp_statuses_selecting_workflow":false,"pp_workflow_action":"current","pp_status_selection":"publish","acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v26.9 (Yoast SEO v27.3) - https:\/\/yoast.com\/product\/yoast-seo-premium-wordpress\/ -->\n<title>Build a Warren Buffett Chatbot using OpenAI\u2019s API<\/title>\n<meta name=\"description\" content=\"First, we will collect data on Warren Buffett\u2019s market knowledge via video interviews. Next, we will clean and process this data.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.interactivebrokers.com\/campus\/wp-json\/wp\/v2\/posts\/208955\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Build a Warren Buffett Chatbot using OpenAI\u2019s API\" \/>\n<meta property=\"og:description\" content=\"First, we will collect data on Warren Buffett\u2019s market knowledge via video interviews. Next, we will clean and process this data.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.interactivebrokers.com\/campus\/ibkr-quant-news\/build-a-warren-buffett-chatbot-using-openais-api\/\" \/>\n<meta property=\"og:site_name\" content=\"IBKR Campus US\" \/>\n<meta property=\"article:published_time\" content=\"2024-07-09T15:59:26+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2024-08-12T19:06:33+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.interactivebrokers.com\/campus\/wp-content\/uploads\/sites\/2\/2023\/02\/robot-space-hand-code.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"900\" \/>\n\t<meta property=\"og:image:height\" content=\"550\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"Igor Radovanovic\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Igor Radovanovic\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"11 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\n\t    \"@context\": \"https:\\\/\\\/schema.org\",\n\t    \"@graph\": [\n\t        {\n\t            \"@type\": \"NewsArticle\",\n\t            \"@id\": \"https:\\\/\\\/www.interactivebrokers.com\\\/campus\\\/ibkr-quant-news\\\/build-a-warren-buffett-chatbot-using-openais-api\\\/#article\",\n\t            \"isPartOf\": {\n\t                \"@id\": \"https:\\\/\\\/www.interactivebrokers.com\\\/campus\\\/ibkr-quant-news\\\/build-a-warren-buffett-chatbot-using-openais-api\\\/\"\n\t            },\n\t            \"author\": {\n\t                \"name\": \"Igor Radovanovic\",\n\t                \"@id\": \"https:\\\/\\\/ibkrcampus.com\\\/campus\\\/#\\\/schema\\\/person\\\/b43b33f424bad38d84a7b78eb0193592\"\n\t            },\n\t            \"headline\": \"Build a Warren Buffett Chatbot using OpenAI\u2019s API\",\n\t            \"datePublished\": \"2024-07-09T15:59:26+00:00\",\n\t            \"dateModified\": \"2024-08-12T19:06:33+00:00\",\n\t            \"mainEntityOfPage\": {\n\t                \"@id\": \"https:\\\/\\\/www.interactivebrokers.com\\\/campus\\\/ibkr-quant-news\\\/build-a-warren-buffett-chatbot-using-openais-api\\\/\"\n\t            },\n\t            \"wordCount\": 2226,\n\t            \"commentCount\": 0,\n\t            \"publisher\": {\n\t                \"@id\": \"https:\\\/\\\/ibkrcampus.com\\\/campus\\\/#organization\"\n\t            },\n\t            \"image\": {\n\t                \"@id\": \"https:\\\/\\\/www.interactivebrokers.com\\\/campus\\\/ibkr-quant-news\\\/build-a-warren-buffett-chatbot-using-openais-api\\\/#primaryimage\"\n\t            },\n\t            \"thumbnailUrl\": \"https:\\\/\\\/www.interactivebrokers.com\\\/campus\\\/wp-content\\\/uploads\\\/sites\\\/2\\\/2023\\\/02\\\/robot-space-hand-code.jpg\",\n\t            \"keywords\": [\n\t                \"Agglomerative Clustering\",\n\t                \"Algo Trading\",\n\t                \"ChatGPT\",\n\t                \"conda\",\n\t                \"CUDA\",\n\t                \"Data Science\",\n\t                \"Diarization\",\n\t                \"Gaussian Mixture Model\",\n\t                \"HuggingFace\",\n\t                \"KMeans\",\n\t                \"LLM\",\n\t                \"Machine Learning\",\n\t                \"NLP\",\n\t                \"OpenAI\",\n\t                \"Python\",\n\t                \"PyTorch\",\n\t                \"StableWhisper Library\"\n\t            ],\n\t            \"articleSection\": [\n\t                \"Data Science\",\n\t                \"Programming Languages\",\n\t                \"Python Development\",\n\t                \"Quant\",\n\t                \"Quant Development\"\n\t            ],\n\t            \"inLanguage\": \"en-US\",\n\t            \"potentialAction\": [\n\t                {\n\t                    \"@type\": \"CommentAction\",\n\t                    \"name\": \"Comment\",\n\t                    \"target\": [\n\t                        \"https:\\\/\\\/www.interactivebrokers.com\\\/campus\\\/ibkr-quant-news\\\/build-a-warren-buffett-chatbot-using-openais-api\\\/#respond\"\n\t                    ]\n\t                }\n\t            ]\n\t        },\n\t        {\n\t            \"@type\": \"WebPage\",\n\t            \"@id\": \"https:\\\/\\\/www.interactivebrokers.com\\\/campus\\\/ibkr-quant-news\\\/build-a-warren-buffett-chatbot-using-openais-api\\\/\",\n\t            \"url\": \"https:\\\/\\\/www.interactivebrokers.com\\\/campus\\\/ibkr-quant-news\\\/build-a-warren-buffett-chatbot-using-openais-api\\\/\",\n\t            \"name\": \"Build a Warren Buffett Chatbot using OpenAI\u2019s API | IBKR Campus US\",\n\t            \"isPartOf\": {\n\t                \"@id\": \"https:\\\/\\\/ibkrcampus.com\\\/campus\\\/#website\"\n\t            },\n\t            \"primaryImageOfPage\": {\n\t                \"@id\": \"https:\\\/\\\/www.interactivebrokers.com\\\/campus\\\/ibkr-quant-news\\\/build-a-warren-buffett-chatbot-using-openais-api\\\/#primaryimage\"\n\t            },\n\t            \"image\": {\n\t                \"@id\": \"https:\\\/\\\/www.interactivebrokers.com\\\/campus\\\/ibkr-quant-news\\\/build-a-warren-buffett-chatbot-using-openais-api\\\/#primaryimage\"\n\t            },\n\t            \"thumbnailUrl\": \"https:\\\/\\\/www.interactivebrokers.com\\\/campus\\\/wp-content\\\/uploads\\\/sites\\\/2\\\/2023\\\/02\\\/robot-space-hand-code.jpg\",\n\t            \"datePublished\": \"2024-07-09T15:59:26+00:00\",\n\t            \"dateModified\": \"2024-08-12T19:06:33+00:00\",\n\t            \"description\": \"First, we will collect data on Warren Buffett\u2019s market knowledge via video interviews. Next, we will clean and process this data.\",\n\t            \"inLanguage\": \"en-US\",\n\t            \"potentialAction\": [\n\t                {\n\t                    \"@type\": \"ReadAction\",\n\t                    \"target\": [\n\t                        \"https:\\\/\\\/www.interactivebrokers.com\\\/campus\\\/ibkr-quant-news\\\/build-a-warren-buffett-chatbot-using-openais-api\\\/\"\n\t                    ]\n\t                }\n\t            ]\n\t        },\n\t        {\n\t            \"@type\": \"ImageObject\",\n\t            \"inLanguage\": \"en-US\",\n\t            \"@id\": \"https:\\\/\\\/www.interactivebrokers.com\\\/campus\\\/ibkr-quant-news\\\/build-a-warren-buffett-chatbot-using-openais-api\\\/#primaryimage\",\n\t            \"url\": \"https:\\\/\\\/www.interactivebrokers.com\\\/campus\\\/wp-content\\\/uploads\\\/sites\\\/2\\\/2023\\\/02\\\/robot-space-hand-code.jpg\",\n\t            \"contentUrl\": \"https:\\\/\\\/www.interactivebrokers.com\\\/campus\\\/wp-content\\\/uploads\\\/sites\\\/2\\\/2023\\\/02\\\/robot-space-hand-code.jpg\",\n\t            \"width\": 900,\n\t            \"height\": 550,\n\t            \"caption\": \"Curious about Automated Trading? Join Capitalise AI for a Webinar\"\n\t        },\n\t        {\n\t            \"@type\": \"WebSite\",\n\t            \"@id\": \"https:\\\/\\\/ibkrcampus.com\\\/campus\\\/#website\",\n\t            \"url\": \"https:\\\/\\\/ibkrcampus.com\\\/campus\\\/\",\n\t            \"name\": \"IBKR Campus US\",\n\t            \"description\": \"Financial Education from Interactive Brokers\",\n\t            \"publisher\": {\n\t                \"@id\": \"https:\\\/\\\/ibkrcampus.com\\\/campus\\\/#organization\"\n\t            },\n\t            \"potentialAction\": [\n\t                {\n\t                    \"@type\": \"SearchAction\",\n\t                    \"target\": {\n\t                        \"@type\": \"EntryPoint\",\n\t                        \"urlTemplate\": \"https:\\\/\\\/ibkrcampus.com\\\/campus\\\/?s={search_term_string}\"\n\t                    },\n\t                    \"query-input\": {\n\t                        \"@type\": \"PropertyValueSpecification\",\n\t                        \"valueRequired\": true,\n\t                        \"valueName\": \"search_term_string\"\n\t                    }\n\t                }\n\t            ],\n\t            \"inLanguage\": \"en-US\"\n\t        },\n\t        {\n\t            \"@type\": \"Organization\",\n\t            \"@id\": \"https:\\\/\\\/ibkrcampus.com\\\/campus\\\/#organization\",\n\t            \"name\": \"Interactive Brokers\",\n\t            \"alternateName\": \"IBKR\",\n\t            \"url\": \"https:\\\/\\\/ibkrcampus.com\\\/campus\\\/\",\n\t            \"logo\": {\n\t                \"@type\": \"ImageObject\",\n\t                \"inLanguage\": \"en-US\",\n\t                \"@id\": \"https:\\\/\\\/ibkrcampus.com\\\/campus\\\/#\\\/schema\\\/logo\\\/image\\\/\",\n\t                \"url\": \"https:\\\/\\\/www.interactivebrokers.com\\\/campus\\\/wp-content\\\/uploads\\\/sites\\\/2\\\/2024\\\/05\\\/ibkr-campus-logo.jpg\",\n\t                \"contentUrl\": \"https:\\\/\\\/www.interactivebrokers.com\\\/campus\\\/wp-content\\\/uploads\\\/sites\\\/2\\\/2024\\\/05\\\/ibkr-campus-logo.jpg\",\n\t                \"width\": 669,\n\t                \"height\": 669,\n\t                \"caption\": \"Interactive Brokers\"\n\t            },\n\t            \"image\": {\n\t                \"@id\": \"https:\\\/\\\/ibkrcampus.com\\\/campus\\\/#\\\/schema\\\/logo\\\/image\\\/\"\n\t            },\n\t            \"publishingPrinciples\": \"https:\\\/\\\/www.interactivebrokers.com\\\/campus\\\/about-ibkr-campus\\\/\",\n\t            \"ethicsPolicy\": \"https:\\\/\\\/www.interactivebrokers.com\\\/campus\\\/cyber-security-notice\\\/\"\n\t        },\n\t        {\n\t            \"@type\": \"Person\",\n\t            \"@id\": \"https:\\\/\\\/ibkrcampus.com\\\/campus\\\/#\\\/schema\\\/person\\\/b43b33f424bad38d84a7b78eb0193592\",\n\t            \"name\": \"Igor Radovanovic\",\n\t            \"url\": \"https:\\\/\\\/www.interactivebrokers.com\\\/campus\\\/author\\\/igor-radovanovic\\\/\"\n\t        }\n\t    ]\n\t}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"Build a Warren Buffett Chatbot using OpenAI\u2019s API","description":"First, we will collect data on Warren Buffett\u2019s market knowledge via video interviews. Next, we will clean and process this data.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.interactivebrokers.com\/campus\/wp-json\/wp\/v2\/posts\/208955\/","og_locale":"en_US","og_type":"article","og_title":"Build a Warren Buffett Chatbot using OpenAI\u2019s API","og_description":"First, we will collect data on Warren Buffett\u2019s market knowledge via video interviews. Next, we will clean and process this data.","og_url":"https:\/\/www.interactivebrokers.com\/campus\/ibkr-quant-news\/build-a-warren-buffett-chatbot-using-openais-api\/","og_site_name":"IBKR Campus US","article_published_time":"2024-07-09T15:59:26+00:00","article_modified_time":"2024-08-12T19:06:33+00:00","og_image":[{"width":900,"height":550,"url":"https:\/\/www.interactivebrokers.com\/campus\/wp-content\/uploads\/sites\/2\/2023\/02\/robot-space-hand-code.jpg","type":"image\/jpeg"}],"author":"Igor Radovanovic","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Igor Radovanovic","Est. reading time":"11 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"NewsArticle","@id":"https:\/\/www.interactivebrokers.com\/campus\/ibkr-quant-news\/build-a-warren-buffett-chatbot-using-openais-api\/#article","isPartOf":{"@id":"https:\/\/www.interactivebrokers.com\/campus\/ibkr-quant-news\/build-a-warren-buffett-chatbot-using-openais-api\/"},"author":{"name":"Igor Radovanovic","@id":"https:\/\/ibkrcampus.com\/campus\/#\/schema\/person\/b43b33f424bad38d84a7b78eb0193592"},"headline":"Build a Warren Buffett Chatbot using OpenAI\u2019s API","datePublished":"2024-07-09T15:59:26+00:00","dateModified":"2024-08-12T19:06:33+00:00","mainEntityOfPage":{"@id":"https:\/\/www.interactivebrokers.com\/campus\/ibkr-quant-news\/build-a-warren-buffett-chatbot-using-openais-api\/"},"wordCount":2226,"commentCount":0,"publisher":{"@id":"https:\/\/ibkrcampus.com\/campus\/#organization"},"image":{"@id":"https:\/\/www.interactivebrokers.com\/campus\/ibkr-quant-news\/build-a-warren-buffett-chatbot-using-openais-api\/#primaryimage"},"thumbnailUrl":"https:\/\/www.interactivebrokers.com\/campus\/wp-content\/uploads\/sites\/2\/2023\/02\/robot-space-hand-code.jpg","keywords":["Agglomerative Clustering","Algo Trading","ChatGPT","conda","CUDA","Data Science","Diarization","Gaussian Mixture Model","HuggingFace","KMeans","LLM","Machine Learning","NLP","OpenAI","Python","PyTorch","StableWhisper Library"],"articleSection":["Data Science","Programming Languages","Python Development","Quant","Quant Development"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.interactivebrokers.com\/campus\/ibkr-quant-news\/build-a-warren-buffett-chatbot-using-openais-api\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.interactivebrokers.com\/campus\/ibkr-quant-news\/build-a-warren-buffett-chatbot-using-openais-api\/","url":"https:\/\/www.interactivebrokers.com\/campus\/ibkr-quant-news\/build-a-warren-buffett-chatbot-using-openais-api\/","name":"Build a Warren Buffett Chatbot using OpenAI\u2019s API | IBKR Campus US","isPartOf":{"@id":"https:\/\/ibkrcampus.com\/campus\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.interactivebrokers.com\/campus\/ibkr-quant-news\/build-a-warren-buffett-chatbot-using-openais-api\/#primaryimage"},"image":{"@id":"https:\/\/www.interactivebrokers.com\/campus\/ibkr-quant-news\/build-a-warren-buffett-chatbot-using-openais-api\/#primaryimage"},"thumbnailUrl":"https:\/\/www.interactivebrokers.com\/campus\/wp-content\/uploads\/sites\/2\/2023\/02\/robot-space-hand-code.jpg","datePublished":"2024-07-09T15:59:26+00:00","dateModified":"2024-08-12T19:06:33+00:00","description":"First, we will collect data on Warren Buffett\u2019s market knowledge via video interviews. Next, we will clean and process this data.","inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.interactivebrokers.com\/campus\/ibkr-quant-news\/build-a-warren-buffett-chatbot-using-openais-api\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.interactivebrokers.com\/campus\/ibkr-quant-news\/build-a-warren-buffett-chatbot-using-openais-api\/#primaryimage","url":"https:\/\/www.interactivebrokers.com\/campus\/wp-content\/uploads\/sites\/2\/2023\/02\/robot-space-hand-code.jpg","contentUrl":"https:\/\/www.interactivebrokers.com\/campus\/wp-content\/uploads\/sites\/2\/2023\/02\/robot-space-hand-code.jpg","width":900,"height":550,"caption":"Curious about Automated Trading? Join Capitalise AI for a Webinar"},{"@type":"WebSite","@id":"https:\/\/ibkrcampus.com\/campus\/#website","url":"https:\/\/ibkrcampus.com\/campus\/","name":"IBKR Campus US","description":"Financial Education from Interactive Brokers","publisher":{"@id":"https:\/\/ibkrcampus.com\/campus\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/ibkrcampus.com\/campus\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/ibkrcampus.com\/campus\/#organization","name":"Interactive Brokers","alternateName":"IBKR","url":"https:\/\/ibkrcampus.com\/campus\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/ibkrcampus.com\/campus\/#\/schema\/logo\/image\/","url":"https:\/\/www.interactivebrokers.com\/campus\/wp-content\/uploads\/sites\/2\/2024\/05\/ibkr-campus-logo.jpg","contentUrl":"https:\/\/www.interactivebrokers.com\/campus\/wp-content\/uploads\/sites\/2\/2024\/05\/ibkr-campus-logo.jpg","width":669,"height":669,"caption":"Interactive Brokers"},"image":{"@id":"https:\/\/ibkrcampus.com\/campus\/#\/schema\/logo\/image\/"},"publishingPrinciples":"https:\/\/www.interactivebrokers.com\/campus\/about-ibkr-campus\/","ethicsPolicy":"https:\/\/www.interactivebrokers.com\/campus\/cyber-security-notice\/"},{"@type":"Person","@id":"https:\/\/ibkrcampus.com\/campus\/#\/schema\/person\/b43b33f424bad38d84a7b78eb0193592","name":"Igor Radovanovic","url":"https:\/\/www.interactivebrokers.com\/campus\/author\/igor-radovanovic\/"}]}},"jetpack_featured_media_url":"https:\/\/www.interactivebrokers.com\/campus\/wp-content\/uploads\/sites\/2\/2023\/02\/robot-space-hand-code.jpg","_links":{"self":[{"href":"https:\/\/ibkrcampus.com\/campus\/wp-json\/wp\/v2\/posts\/208955","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/ibkrcampus.com\/campus\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/ibkrcampus.com\/campus\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/ibkrcampus.com\/campus\/wp-json\/wp\/v2\/users\/815"}],"replies":[{"embeddable":true,"href":"https:\/\/ibkrcampus.com\/campus\/wp-json\/wp\/v2\/comments?post=208955"}],"version-history":[{"count":0,"href":"https:\/\/ibkrcampus.com\/campus\/wp-json\/wp\/v2\/posts\/208955\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/ibkrcampus.com\/campus\/wp-json\/wp\/v2\/media\/182748"}],"wp:attachment":[{"href":"https:\/\/ibkrcampus.com\/campus\/wp-json\/wp\/v2\/media?parent=208955"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/ibkrcampus.com\/campus\/wp-json\/wp\/v2\/categories?post=208955"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/ibkrcampus.com\/campus\/wp-json\/wp\/v2\/tags?post=208955"},{"taxonomy":"contributors-categories","embeddable":true,"href":"https:\/\/ibkrcampus.com\/campus\/wp-json\/wp\/v2\/contributors-categories?post=208955"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}