diff --git a/.env b/.env index 8596fba..1cc3330 100644 --- a/.env +++ b/.env @@ -1,2 +1,3 @@ PERPLEXITY_AI_API = "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" -OPENAI_API_KEY = "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" \ No newline at end of file +OPENAI_API_KEY = "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" +TAVILY_API_KEY = "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" \ No newline at end of file diff --git a/data_collector.ipynb b/data_collector.ipynb new file mode 100644 index 0000000..c70f979 --- /dev/null +++ b/data_collector.ipynb @@ -0,0 +1,399 @@ +{ + "cells": [ + { + "cell_type": "code", + "execution_count": 12, + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "True" + ] + }, + "execution_count": 12, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "from openai import OpenAI\n", + "import os\n", + "import requests\n", + "from dotenv import load_dotenv\n", + "from langchain_openai import ChatOpenAI\n", + "from tavily import TavilyClient\n", + "from langchain_core.prompts.prompt import PromptTemplate\n", + "from langchain_core.output_parsers import StrOutputParser, JsonOutputParser\n", + "from loguru import logger\n", + "load_dotenv()" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": {}, + "outputs": [], + "source": [ + "os.environ[\"OPENAI_API_KEY\"] = os.getenv(\"OPENAI_API_KEY\")\n", + "llm = ChatOpenAI(model=\"gpt-4o\")" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": {}, + "outputs": [], + "source": [ + "API_KEY = os.getenv('PERPLEXITY_AI_API')" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "metadata": {}, + "outputs": [], + "source": [ + "def perplexity_data(prompt, api_key=API_KEY):\n", + " url = \"https://api.perplexity.ai/chat/completions\"\n", + "\n", + " payload = {\n", + " \"model\": \"llama-3.1-sonar-huge-128k-online\",\n", + " \"messages\": [\n", + " {\n", + " \"role\": \"system\",\n", + " \"content\": \"Be precise and concise.\"\n", + " },\n", + " {\n", + " \"role\": \"user\",\n", + " \"content\": prompt\n", + " }\n", + " ],\n", + " \"temperature\": 0.2,\n", + " \"top_p\": 0.9,\n", + " \"return_citations\": True,\n", + " \"search_domain_filter\": [\"perplexity.ai\"],\n", + " \"return_images\": False,\n", + " \"return_related_questions\": False,\n", + " \"search_recency_filter\": \"month\",\n", + " \"top_k\": 0,\n", + " \"stream\": False,\n", + " \"presence_penalty\": 0,\n", + " \"frequency_penalty\": 1\n", + " }\n", + " \n", + " headers = {\n", + " \"Authorization\": f\"Bearer {api_key}\",\n", + " \"Content-Type\": \"application/json\"\n", + " }\n", + " \n", + " response = requests.post(url, json=payload, headers=headers)\n", + " \n", + " # Check if the request was successful\n", + " if response.status_code == 200:\n", + " response_data = response.json()\n", + " try:\n", + " # Extract the message content\n", + " message_content = response_data['choices'][0]['message']['content']\n", + " return message_content\n", + " except (KeyError, IndexError):\n", + " return \"Unexpected response format.\"\n", + " else:\n", + " return f\"Request failed with status code: {response.status_code}\"" + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "metadata": {}, + "outputs": [], + "source": [ + "product_categories = [\n", + " \"Beauty & Skincare\",\n", + " \"Fashion & Lifestyle\",\n", + " \"Health & Fitness\",\n", + " \"Travel & Adventure\",\n", + " \"Food & Beverage\",\n", + " \"Technology & Gadgets\",\n", + " \"Gaming & Esports\",\n", + " \"Parenting & Family\",\n", + " \"Finance & Business\",\n", + " \"Wellness & Mental Health\",\n", + " \"Automotive & Motorsports\",\n", + " \"Entertainment & Pop Culture\",\n", + " \"Photography & Visual Arts\",\n", + " \"Education & Learning\",\n", + " \"Environmental & Sustainability\"\n", + "]" + ] + }, + { + "cell_type": "code", + "execution_count": 6, + "metadata": {}, + "outputs": [], + "source": [ + "us_states = [\n", + " \"Alabama\", \"Alaska\", \"Arizona\", \"Arkansas\", \"California\", \"Colorado\", \"Connecticut\",\n", + " \"Delaware\", \"Florida\", \"Georgia\", \"Hawaii\", \"Idaho\", \"Illinois\", \"Indiana\", \"Iowa\",\n", + " \"Kansas\", \"Kentucky\", \"Louisiana\", \"Maine\", \"Maryland\", \"Massachusetts\", \"Michigan\",\n", + " \"Minnesota\", \"Mississippi\", \"Missouri\", \"Montana\", \"Nebraska\", \"Nevada\", \"New Hampshire\",\n", + " \"New Jersey\", \"New Mexico\", \"New York\", \"North Carolina\", \"North Dakota\", \"Ohio\",\n", + " \"Oklahoma\", \"Oregon\", \"Pennsylvania\", \"Rhode Island\", \"South Carolina\", \"South Dakota\",\n", + " \"Tennessee\", \"Texas\", \"Utah\", \"Vermont\", \"Virginia\", \"Washington\", \"West Virginia\",\n", + " \"Wisconsin\", \"Wyoming\"\n", + "]" + ] + }, + { + "cell_type": "code", + "execution_count": 7, + "metadata": {}, + "outputs": [], + "source": [ + "prompt = \"\"\"\n", + " Give me a list of the names of the all the beauty and skincare influencers in USA\n", + "\"\"\"" + ] + }, + { + "cell_type": "code", + "execution_count": 8, + "metadata": {}, + "outputs": [], + "source": [ + "# prompt = \"\"\"\n", + "# I'm a business owner in search for influencers to promote my brand.\\n\n", + "# My brand falls under this category : \"Beauty & Skincare\" \\n.\n", + "# I need your help with getting information for at least the top 30 influencers in Alabama in the USA. \\n\n", + "# These are the informations I need regarding each of them: \\n\n", + "# 1. Name \\n\n", + "# 2. Contact info \\n\n", + "# 4. Facebook username\\n\n", + "# 5. Instagram username \\n\n", + "# 6. Tiktok username \\n\n", + "# 7. Youtube username \\n\n", + "# 8. Facebook followers \\n\n", + "# 9. Instagram followers \\n\n", + "# 10 Tiktok followers \\n\n", + "# 11. Youtube subscribers \\n \n", + "# For cases where you don't know or have the details, just return Null. \\n\n", + "# Make sure you return a structured response only. Don't add extra informations. \\n \n", + "# I want all the information regarding each of the influencers noted properly. \\n\n", + "# Please do this carefully and correctly. \n", + "# \"\"\"" + ] + }, + { + "cell_type": "code", + "execution_count": 9, + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\n", + " Give me a list of the names of the all the beauty and skincare influencers in USA\n", + "\n" + ] + } + ], + "source": [ + "print(prompt)" + ] + }, + { + "cell_type": "code", + "execution_count": 10, + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Given the extensive list of influencers across various sources, here is a combined list of beauty and skincare influencers mentioned in the provided search results:\n", + "\n", + "### From Modash (Top 20 American Beauty Influencers on Instagram)\n", + "1. Alexis Tyler (@iamalexistyler)\n", + "2. LaShay (@k_bella3)\n", + "3. G.H.❤️ RN,BSN👩🏽⚕️ (@_therealparis)\n", + "4. Ashanti Camille | HTX Fashion & Lifestyle\n", + "5. MaLeaн\n", + "6. C J (@hoodspolitic_)\n", + "7. 💕🐎COUNTRY BEAUTY🐎💕 (@_escapewithsyd)\n", + "8. Beauty Therapist (@ambitiousamb__)\n", + "9. Faye Davis (@mz_fae88)\n", + "10. Media Queen 👑 (@what_shayna_say)\n", + "11. Tee 🤍 | Natural Hair + UGC (@theblushway)\n", + "12. (And 8 more influencers listed on the page, but not detailed here due to space constraints)\n", + "\n", + "### From Feedspot (Top 50 Cruelty Free Beauty Influencers in 2024)\n", + "1. Jessica Lyn (@veganbeautyaddict)\n", + "2. Cordelia (@phyrra)\n", + "3. Jennifer Mathews\n", + "4. Sunny Subramanian\n", + "5. Vicky (@kabukirune)\n", + "6. Bella Fiori\n", + "7. Suzana Rose\n", + "8. Tashina\n", + "9. Mariel (@marielveganbeauty)\n", + "10. Danielle (@crueltyfreeveganbeauty)\n", + "11. Kasey S (@skinandvelvet)\n", + "12. Project Pan (@themakeupfairy_)\n", + "13. Caitie Anisman-Reiner (@naturallabeauty)\n", + "14. Krisztina Williams (@krisztinawilliams)\n", + "15. Dreesa (@flightqueen7)\n", + "16. Marissa Jean (@glambyrissaj)\n", + "17. Hailee Jones (@haileejonesmua)\n", + "18. Kate Audrey (@kateaudreyartistry)\n", + "19. Becky Louise (@bottled.blue)\n", + "20. (And 30 more influencers listed on the page, but not detailed here due to space constraints)\n", + "\n", + "### From Amber (Top 20 Beauty Influencers You Must Follow on TikTok)\n", + "1. Nikkia Joy\n", + "2. Makeup by Analiza\n", + "3. Sanny\n", + "4. BJ Bushra\n", + "5. sarahli\n", + "6. Sasha_British\n", + "7. chass\n", + "8. Ruby Malik\n", + "9. Makeup A Murder, INC.\n", + "10. (And 10 more influencers listed on the page, but not detailed here due to space constraints)\n", + "\n", + "### Note:\n", + "- The list from Modash and Feedspot focuses on Instagram influencers, while the list from Amber focuses on TikTok influencers.\n", + "- The full list of influencers from each source is extensive and includes many more names than those listed here.\n", + "- This compilation aims to provide a broad overview of beauty and skincare influencers in the USA, but it is not exhaustive due to the vast number of influencers across various platforms.\n" + ] + } + ], + "source": [ + "result = perplexity_data(prompt)\n", + "print(result)" + ] + }, + { + "cell_type": "code", + "execution_count": 11, + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Based on the provided search result, here are the available details for Faye Davis:\n", + "\n", + "1. **Name**: Faye Davis\n", + "2. **Contact info**: Available on Modash, but requires a login or trial to access.\n", + "3. **Facebook username**: Not provided in the search results.\n", + "4. **Instagram username**: @mz_fae88.\n", + "5. **TikTok username**: Not provided in the search results.\n", + "6. **YouTube username**: Not provided in the search results.\n", + "7. **Facebook followers**: Not provided in the search results.\n", + "8. **Instagram followers**: 12.3k.\n", + "9. **TikTok followers**: Not provided in the search results.\n", + "10. **YouTube subscribers**: Not provided in the search results.\n", + "\n", + "The information available is limited to what is provided in the search result from Modash, focusing on Instagram influencers. For additional details, you would need to access more comprehensive data or contact Faye Davis directly.\n" + ] + } + ], + "source": [ + "prompt = \"\"\"\n", + " Give me a the following social details of Faye Davis, a beauty and skincare influencer: \\n\n", + " 1. Name \\n\n", + " 2. Contact info \\n\n", + " 4. Facebook username\\n\n", + " 5. Instagram username \\n\n", + " 6. Tiktok username \\n\n", + " 7. Youtube username \\n\n", + " 8. Facebook followers \\n\n", + " 9. Instagram followers \\n\n", + " 10 Tiktok followers \\n\n", + " 11. Youtube subscribers \\n \n", + "\"\"\"\n", + "result = perplexity_data(prompt)\n", + "print(result)" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Solution Implmentation" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [] + } + ], + "metadata": { + "kernelspec": { + "display_name": "base", + "language": "python", + "name": "python3" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 3 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython3", + "version": "3.11.7" + } + }, + "nbformat": 4, + "nbformat_minor": 2 +} diff --git a/experiment.ipynb b/experiment.ipynb index 9e1c3df..9f249db 100644 --- a/experiment.ipynb +++ b/experiment.ipynb @@ -480,6 +480,7 @@ " 6. At the end of your processing you want to return a structured response and also make sure it in the best order as expected by the user. \\n\n", " \n", " Return a structured JSON or dictionary as output. \\n \n", + " Avoid individual dictionaay per person, but one for al. \\n\n", " Ensure that the data is properly arranged and in a good format. \\n\n", " Please do this carefully and excellently. \n", " \n", diff --git a/tav_experiment.ipynb b/tav_experiment.ipynb new file mode 100644 index 0000000..04e7664 --- /dev/null +++ b/tav_experiment.ipynb @@ -0,0 +1,599 @@ +{ + "cells": [ + { + "cell_type": "code", + "execution_count": 1, + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Looking in indexes: https://pypi.org/simple, https://pypi.ngc.nvidia.com\n", + "Requirement already satisfied: tavily-python in c:\\users\\timmy_3aupohg\\anaconda3\\lib\\site-packages (0.3.5)\n", + "Requirement already satisfied: requests in c:\\users\\timmy_3aupohg\\anaconda3\\lib\\site-packages (from tavily-python) (2.32.3)\n", + "Requirement already satisfied: tiktoken>=0.5.1 in c:\\users\\timmy_3aupohg\\anaconda3\\lib\\site-packages (from tavily-python) (0.7.0)\n", + "Requirement already satisfied: httpx in c:\\users\\timmy_3aupohg\\anaconda3\\lib\\site-packages (from tavily-python) (0.27.0)\n", + "Requirement already satisfied: regex>=2022.1.18 in c:\\users\\timmy_3aupohg\\anaconda3\\lib\\site-packages (from tiktoken>=0.5.1->tavily-python) (2023.10.3)\n", + "Requirement already satisfied: charset-normalizer<4,>=2 in c:\\users\\timmy_3aupohg\\anaconda3\\lib\\site-packages (from requests->tavily-python) (2.0.4)\n", + "Requirement already satisfied: idna<4,>=2.5 in c:\\users\\timmy_3aupohg\\anaconda3\\lib\\site-packages (from requests->tavily-python) (3.4)\n", + "Requirement already satisfied: urllib3<3,>=1.21.1 in c:\\users\\timmy_3aupohg\\anaconda3\\lib\\site-packages (from requests->tavily-python) (2.0.7)\n", + "Requirement already satisfied: certifi>=2017.4.17 in c:\\users\\timmy_3aupohg\\anaconda3\\lib\\site-packages (from requests->tavily-python) (2024.8.30)\n", + "Requirement already satisfied: anyio in c:\\users\\timmy_3aupohg\\anaconda3\\lib\\site-packages (from httpx->tavily-python) (4.2.0)\n", + "Requirement already satisfied: httpcore==1.* in c:\\users\\timmy_3aupohg\\anaconda3\\lib\\site-packages (from httpx->tavily-python) (1.0.5)\n", + "Requirement already satisfied: sniffio in c:\\users\\timmy_3aupohg\\anaconda3\\lib\\site-packages (from httpx->tavily-python) (1.3.0)\n", + "Requirement already satisfied: h11<0.15,>=0.13 in c:\\users\\timmy_3aupohg\\anaconda3\\lib\\site-packages (from httpcore==1.*->httpx->tavily-python) (0.14.0)\n" + ] + } + ], + "source": [ + "!pip install tavily-python" + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "True" + ] + }, + "execution_count": 5, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "from openai import OpenAI\n", + "import os\n", + "import requests\n", + "from dotenv import load_dotenv\n", + "from langchain_openai import ChatOpenAI\n", + "from tavily import TavilyClient\n", + "from langchain_core.prompts.prompt import PromptTemplate\n", + "from langchain_core.output_parsers import StrOutputParser, JsonOutputParser\n", + "from loguru import logger\n", + "load_dotenv()" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": {}, + "outputs": [], + "source": [ + "os.environ[\"OPENAI_API_KEY\"] = os.getenv(\"OPENAI_API_KEY\")\n", + "os.environ[\"TAVILY_API_KEY\"] = os.getenv(\"TAVILY_API_KEY\")\n", + "os.environ[\"PERPLEXITY_AI_API\"] = os.getenv(\"PERPLEXITY_AI_API\")" + ] + }, + { + "cell_type": "code", + "execution_count": 7, + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{'query': 'who scored hatric in real madrid most recent match?', 'follow_up_questions': None, 'answer': None, 'images': [], 'results': [{'title': 'Vinicius Junior scores hat trick as Real Madrid beats Dortmund 5-2 in ...', 'url': 'https://apnews.com/article/champions-league-real-madrid-arsenal-psg-707b769bee5d5d305e7f44692506e7df', 'content': \"Vinicius Junior scored a hat trick as Real Madrid turned boos into cheers with a 5-2 win over Borussia Dortmund in the Champions League on Tuesday, while Paris Saint-Germain dropped more points.. Madrid was 2-0 down at halftime in a rematch of last season's final but rallied with three goals from Vinicius Junior — who also scored in the final in May — and one each from Antonio Rudiger\", 'score': 0.9272316, 'raw_content': None}, {'title': \"Vini Jr.'s spectacular hat trick leads Real Madrid in Champions League ...\", 'url': 'https://www.cbssports.com/soccer/news/vini-jr-s-spectacular-hat-trick-leads-real-madrid-in-champions-league-comeback-victory-over-borussia-dortmund/', 'content': 'Vinicius Junior stole the show on Tuesday, scoring a second-half hat trick for Real Madrid as they completed a come-from-behind 5-2 victory over Borussia Dortmund in UEFA Champions League action', 'score': 0.90515476, 'raw_content': None}, {'title': 'Champions League highlights: Real Madrid 5-2 Borussia Dortmund ... - BBC', 'url': 'https://www.bbc.co.uk/sport/football/videos/cew1wqgyjjzo', 'content': 'Vinicius Junior scores a hat-trick as Real Madrid produce a stunning second-half comeback from 2-0 down to beat Borussia Dortmund 5-2. Watch highlights of every Uefa Champions League game on iPlayer.', 'score': 0.89442116, 'raw_content': None}, {'title': 'Real Madrid 5-2 Borussia Dortmund: Player ratings as Vinicius ... - 90min', 'url': 'https://www.90min.com/real-madrid-5-2-borussia-dortmund-player-ratings-22-10-24', 'content': 'Vincius Junior netted a stunning second half hat-trick to secure a dramatic comeback win for Real Madrid over Borussia Dortmund at the Santiago Bernabeu. Dortmund had taken a shock 2-0 lead in the', 'score': 0.8489722, 'raw_content': None}, {'title': 'Real Madrid 4-1 Barcelona: Vinicius Junior scores hat-trick as Real ...', 'url': 'https://www.skysports.com/football/news/13048291/real-madrid-4-1-barcelona-vinicius-junior-scores-hat-trick-as-real-storm-to-spanish-super-cup-glory', 'content': 'Report as Vinicius Junior scores a first-half hat-trick to set Real Madrid on their way to Spanish Super Cup glory; Carlo Ancelottis side beat rivals Barcelona 4-1 in Saudi Arabia; Rodrygo also on', 'score': 0.84234506, 'raw_content': None}], 'response_time': 2.29}\n" + ] + } + ], + "source": [ + "\n", + "# Step 1. Instantiating your TavilyClient\n", + "tavily_client = TavilyClient()\n", + "\n", + "# Step 2. Executing a simple search query\n", + "response = tavily_client.search(\"who scored hatric in real madrid most recent match?\")\n", + "\n", + "# Step 3. That's it! You've done a Tavily Search!\n", + "print(response)" + ] + }, + { + "cell_type": "code", + "execution_count": 9, + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Vinicius Junior scored a hat-trick in Real Madrid's most recent match against Borussia Dortmund, leading them to a 5-2 victory in the UEFA Champions League.\n" + ] + } + ], + "source": [ + "# Step 2. Executing a Q&A search query\n", + "answer = tavily_client.qna_search(query=\"who scored hatric in real madrid most recent match?\")\n", + "\n", + "# Step 3. That's it! Your question has been answered!\n", + "print(answer)" + ] + }, + { + "cell_type": "code", + "execution_count": 12, + "metadata": {}, + "outputs": [], + "source": [ + "prompt = \"\"\"\n", + " I'm a business owner in serach for influencers to promote my brand.\\n\n", + " My brand falls under this category : \"Beauty & Skincare\" \\n.\n", + " I need your help with getting information for at least the top 30 influencers in Alabama in the USA. \\n\n", + "\"\"\"" + ] + }, + { + "cell_type": "code", + "execution_count": 13, + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Based on the data provided, here are some of the top influencers in Alabama in the \"Beauty & Skincare\" category:\n", + "1. Alessa - Asian beauty and skincare influencer with over 253k followers.\n", + "2. Victoria - Skincare influencer with 1.4 million Instagram followers.\n", + "3. Jade Marie - Professional Holistic-Medical Esthetician focusing on skincare.\n", + "4. There are also beauty influencers who cover skincare content that you might find relevant for your brand.\n", + "\n", + "Please refer to the provided sources for more detailed information on these influencers.\n" + ] + } + ], + "source": [ + "# Step 2. Executing a Q&A search query\n", + "answer = tavily_client.qna_search(query=prompt)\n", + "\n", + "# Step 3. That's it! Your question has been answered!\n", + "print(answer)" + ] + }, + { + "cell_type": "code", + "execution_count": 18, + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{'query': 'Give me a list of the names of the top 30 beauty and skincare influencers in alabama us.', 'follow_up_questions': None, 'answer': None, 'images': [], 'results': [{'title': '32 Top Beauty Influencers You Should Follow Right Now', 'url': 'https://influencermarketinghub.com/beauty-influencers/', 'content': 'She also shares skincare videos, life updates, and tries out different products. 22. Rachel Claire Levin. Rachel Claire Levin is a beauty influencer who was featured in an episode of Steve Harvey and boasts more than 14 million YouTube subscribers. In 2020, Rachel launched her own makeup brand, RCLÓ Cosmetics.', 'score': 0.96138906, 'raw_content': None}, {'title': 'Top 100 Skincare Influencers in 2024 - FeedSpot for Influencers', 'url': 'https://influencers.feedspot.com/skincare_instagram_influencers/', 'content': \"Skincare Influencers. Here are Top 100 Skincare Influencers. 1. Victoria. Bio ɢlαd yoυ're нere тнe laтeѕт тrendѕ вeαυтy, нαιr & ѕĸιɴ нow-тo & мore ****@victorialyn.net Instagram Handle @victorialyn Instagram Followers 1.4M Type Mega Gender Female Get Email Contact. 2.\", 'score': 0.9175984, 'raw_content': None}, {'title': 'Skincare Influencers: 20 With Top Beauty Routines - IZEA', 'url': 'https://izea.com/resources/skincare-influencers/', 'content': \"The skincare content community falls under a broad umbrella. You may see beauty elements mixed in with skincare content or a feed full of serums, masks, scrubbing brushes, moisturizers, toners, and all the other skincare essentials. On the flip side, having so many products can be overwhelming for some people, so here's a list of some of the top skincare influencers and their particular take\", 'score': 0.8899121, 'raw_content': None}, {'title': 'Top 37 Beauty Influencers in the U.S. - The Social Shepherd', 'url': 'https://thesocialshepherd.com/blog/top-beauty-influencers-us', 'content': \"Harnessing the power of top beauty influencers in the U.S. is not just an option; it's a necessity. The global influencer marketing market has skyrocketed, doubling in size since 2019, reaching an impressive 21.1 billion U.S. dollars in 2023. The fact is that brands today are investing up to 20% of their marketing budget on influencers.\", 'score': 0.8556101, 'raw_content': None}, {'title': '15 of the Top Skincare Influencers on Instagram - Get Hyped', 'url': 'https://gethypedmedia.com/skincare-influencers-on-instagram/', 'content': '10. Okikiola Emaleku. Image via Instagram. Okikiola Emaleku is a UK-based beauty influencer on Instagram, who is also a licensed aesthetician. Also known as The Skin Priest, Okikiola refers to herself as the Harriet Tubman of skincare owing to her passion for creating skincare content for people of color.', 'score': 0.64422506, 'raw_content': None}, {'title': '75+ Skincare Influencers To Follow in 2024 [Non-Celebrity]', 'url': 'https://blog.ainfluencer.com/skincare-influencers/', 'content': 'Shani Darden (@shanidarden) Shani is an esthetician, skin expert, and one of the top skincare influencers on our list with 329K followers. She is a mom of two little cuties and the founder of the Shani Darden Skincare brand. Her products are available to shop online and in Sephora stores. View this post on Instagram.', 'score': 0.4631407, 'raw_content': None}, {'title': 'Top 20 Beauty Influencers on Instagram, TikTok & YouTube - Glewee', 'url': 'https://glewee.com/blog/beauty-influencers/', 'content': 'Who are some of the most popular makeup influencers right now? Below is a list of big names in beauty, from top beauty influencers to up and coming stars. List of the Most Popular Makeup Influencers on Instagram, YouTube, and TikTok James Charles. YouTube: 23.9 M subscribers . Instagram: 21.1M followers . TikTok: 38.4M followers', 'score': 0.22101425, 'raw_content': None}, {'title': 'The Most Popular Beauty & Skincare Products Our Readers Could Not Stop ...', 'url': 'https://www.allure.com/gallery/most-popular-beauty-products-2021', 'content': \"It seems like SkinCeuticals C E Ferulic might never be dethroned as a top-selling product, despite its hefty $166 price tag. This three-time Best of Beauty Award and one-time Readers' Choice Award\", 'score': 0.008511303, 'raw_content': None}, {'title': '30 Best Skincare Products of 2024, Tested by Experts - Good Housekeeping', 'url': 'https://www.goodhousekeeping.com/beauty/anti-aging/g28135730/best-skincare-products/', 'content': 'Guide to Your Best Skin Ever\\nThe Best At-Home Red Light Therapy Devices\\nThe Best Anti-Aging Creams\\n11 Best Razors for Women of 2023\\nThe Best Face Washes for Oily Skin\\nDerms Say This Is the Best Daily Skincare Routine\\n20 Best Eye Creams of 2023\\n10 Best Razors for Women of 2023\\n18 Best Dark Spot Correctors\\nThe Best Skin Scrubbers and Spatulas\\nWhat Does Glycolic Acid Do?\\n Our top picks:\\nBest Face Cleanser\\nBest Value Face Cleanser\\nBest Anti-Aging Day Cream\\nBest Anti-Aging Moisturizer\\nBest Day Cream\\nBest Dark Spot Treatment\\nBest Anti-Aging Face Serum\\nBest Face Scrub\\nBest Face Moisturizer\\nBest Face Moisturizer with Sunscreen\\nThe GH Beauty Lab thoroughly evaluates skincare products using technical Lab instruments and consumer feedback. \"\\nRELATED: The Best Face Moisturizers With Sunscreen for One-Step Sun Protection\\nPalmer\\'s Cocoa Butter Formula Moisturizing Skin Therapy Oil for Face\\nPalmer\\'s Cocoa Butter Formula Moisturizing Skin Therapy Oil for Face\\nThe best bargain in the GH Beauty Lab’s test of face oils, this Seal Star is a 10-botanical oil blend (with argan, apricot and almond oils) that effectively boosts skin’s softness. RELATED:\\nThe Best Anti-Aging Serums, According to Skin Experts\\nAcure Brightening Facial Scrub\\nAcure Brightening Facial Scrub\\nNumber one in the GH Beauty Lab’s test of face scrubs, the Acure face exfoliator clarifies skin with a blend of walnut shell powder and green clay. The Best Face Washes Ever, According to Skincare Pros\\nCetaphil Daily Facial Cleanser\\nCetaphil Daily Facial Cleanser\\nWith a powder fresh scent and mild suds, Cetaphil\\'s dermatologist-recommended face wash was a winner in the GH Beauty Lab’s face wash test for cleansing thoroughly yet leaving skin soft.', 'score': 0.008283626, 'raw_content': None}, {'title': 'The 18 Best Beauty Products of 2021, According to Top ... - Vogue', 'url': 'https://www.vogue.com/article/best-beauty-products', 'content': 'The Sleep Masque Night Repair is the first bottle you should grab. Healthy hair gives colorists a solid foundation to work with for the best possible end-result color, and this masque leaves hair', 'score': 0.0060739345, 'raw_content': None}], 'response_time': 3.91}\n" + ] + } + ], + "source": [ + "# Step 2. Executing a simple search query\n", + "response = tavily_client.search(\"Give me a list of the names of the top 30 beauty and skincare influencers in alabama us.\", search_depth='advanced', max_results=10)\n", + "\n", + "# Step 3. That's it! You've done a Tavily Search!\n", + "print(response)" + ] + }, + { + "cell_type": "code", + "execution_count": 23, + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{'query': 'Get me all the social media details of Faye Davis, a beauty and skincare influencer.', 'follow_up_questions': None, 'answer': 'Faye Davis, a beauty and skincare influencer, has a significant presence on social media platforms such as Instagram and TikTok. She actively engages with her followers by sharing skincare tips, product reviews, and beauty tutorials. Faye Davis has successfully partnered with various beauty brands to promote their products to her audience, showcasing her influence in the beauty industry.', 'images': [], 'results': [{'title': 'Skincare Influencer: How To Become A Successful Skincare Influencer On ...', 'url': 'https://www.netinfluencer.com/how-to-be-a-skincare-influencer/', 'content': \"Now that we've covered what being a skincare influencer is all about, let's take a quick look at the benefits you can receive. Sponsored Content. Brand partnerships are a vital source of income for most social media influencers. A typical skincare influencer with 100k followers and good engagement earns roughly $1000 for each sponsored post.\", 'score': 0.9719393, 'raw_content': None}, {'title': '20 Beauty Influencers Reshaping the Industry - Dash Hudson', 'url': 'https://www.dashhudson.com/blog/top-beauty-influencers', 'content': 'The beauty landscape on social media encompasses a range of influencers, from makeup artists and skincare enthusiasts to hairstylists and beauty gurus, collectively shaping trends and sharing their expertise with an expansive audience. The volume of influencers is ever-changing, making it hard to pinpoint an exact number.', 'score': 0.9657707, 'raw_content': None}, {'title': 'Skincare Influencers: 20 With Top Beauty Routines - IZEA', 'url': 'https://izea.com/resources/skincare-influencers/', 'content': \"The skincare content community falls under a broad umbrella. You may see beauty elements mixed in with skincare content or a feed full of serums, masks, scrubbing brushes, moisturizers, toners, and all the other skincare essentials. On the flip side, having so many products can be overwhelming for some people, so here's a list of some of the top skincare influencers and their particular take\", 'score': 0.9502266, 'raw_content': None}, {'title': 'The Rise Of \"Dermatology Influencers\" Is Changing The Beauty Social ...', 'url': 'https://www.byrdie.com/dermatologist-beauty-influencers-5210605', 'content': \"This growth has added yet another layer to the ever-evolving social media space. Consumers demand more knowledge and transparency from all areas of the beauty industry, including brands and influencers. And thus, another shift. On buzzy platforms like TikTok and Instagram, there's been an uptick in the number of doctors and dermatologists\", 'score': 0.82233185, 'raw_content': None}, {'title': \"Social Media's Impact On The Beauty Industry | Beautifi\", 'url': 'https://www.beautifi.com/social-medias-impact-on-the-beauty-industry/', 'content': \"Many positive impacts have come from social media, especially in the beauty industry. Brands can now get consumers' attention anywhere, plus it's easy to shop with them. This is great for anyone that loves to embrace the latest makeup or skincare trend. However, sometimes this constant exposure to beauty adverts can also affect our\", 'score': 0.7905303, 'raw_content': None}, {'title': 'Top Beauty Influencers in 2024 - Metricool', 'url': 'https://metricool.com/beauty-influencers/', 'content': 'Sign up here for the online presentation\\nAnalytics\\nThe data that matters\\nCompetitors\\nAnalyze your competition\\nReports\\nNetwork reports at the click of a button\\nLooker Studio\\nLooker Studio conector\\nHashtag tracker\\nMeasure and follow your hashtags\\nPlanner\\nPlan your social networks\\nApproval System\\nAllow your clients to review your content\\nSmartLinks\\nThe definitive link in bio\\nAI Assistant\\nGenerate copies from a single prompt\\nChrome Extension\\nProgram while browsing\\nInbox\\nComments and messages management\\nAds\\nManage and measure your advertising\\nInstagram\\nAnalyze your Instagram account\\nTikTok\\nGrowing on TikTok\\nYouTube\\nMeasure, programme and move forward\\nTwitter\\nMeasure and publish threads and tweets\\nTwitch\\nAnalyse your channel and competitors on Twitch\\nGoogle Business Profile\\nSchedule and answer reviews on Google Business Profile\\nFacebook\\nManage Facebook like a pro\\nPinterest\\nGet growing on Pinterest\\nLinkedIn\\nAnalyze and schedule your personal or company profile\\nTutorials\\nHow to use Metricool\\nNewsletter\\nFind out all the news of social networks in one click\\nMasterclass\\nLearn with social media professionals\\nMarketing Tutorials\\nOnline Advertising Tutorials\\nInstagram\\nTikTok\\nYouTube\\nThreads\\nTwitter\\nTwitch\\nGoogle Business Profile\\nFacebook\\nPinterest\\nLinkedIn\\nAnalytics\\nInfluencer Marketing\\nContent Marketing\\nEmail Marketing\\nOnline Advertising\\nHome / Top Beauty Influencers in 2024\\nTop Beauty Influencers in 2024\\nBeauty influencers have been and will continue to take over many of the social media platforms, especially on Instagram and Tiktok. Top Podcast Influencers in 2024\\nTop Lifestyle Influencers in 2024\\nHow to create an influencer Media Kit\\nCompany\\nProduct\\nResources\\nStudies\\n Required fields are marked *\\nName *\\nEmail *\\nMetricool Software, S.L. is the data controller of your data, with the purpose of moderating and publishing your comment with your name (in no case will your email address be published). All in all, beauty influencers aren’t going anywhere, and here are some to be aware of!\\nBeauty or Makeup Influencers to Know\\nSelena Gomez\\nSelena Gomez has recently been deemed the most followed woman on Instagram! More information in Metricool Privacy Policy\\nI have read and accepted the\\xa0Legal Notice\\nSend comment\\nΔ\\nRelated articles\\n', 'score': 0.7889086, 'raw_content': None}, {'title': '32 Top Beauty Influencers You Should Follow Right Now', 'url': 'https://influencermarketinghub.com/beauty-influencers/', 'content': 'She also shares skincare videos, life updates, and tries out different products. 22. Rachel Claire Levin. Rachel Claire Levin is a beauty influencer who was featured in an episode of Steve Harvey and boasts more than 14 million YouTube subscribers. In 2020, Rachel launched her own makeup brand, RCLÓ Cosmetics.', 'score': 0.77713084, 'raw_content': None}, {'title': \"As attitudes change, what's next for beauty influencers?\", 'url': 'https://www.voguebusiness.com/beauty/as-attitudes-change-whats-next-for-beauty-influencers', 'content': 'Customer acquisition costs continue to rise. According to research by influencer marketing software platform, Creator iQ, over 52 per cent of beauty brands surveyed spent more than $200,000 on influencer marketing in 2022, with 28 per cent saying their spend had \"significantly increased\" in the last year.', 'score': 0.55983156, 'raw_content': None}, {'title': 'Top 37 Beauty Influencers in the U.S. - The Social Shepherd', 'url': 'https://thesocialshepherd.com/blog/top-beauty-influencers-us', 'content': \"She has solidified her status as an influencer for brands like Fashion Nova, Maven Beauty, Nova Kids, and more. Alissa Janay's influence extends beyond makeup and fashion; it's about empowering individuals to be confident in their natural selves. 3. Mia Anjelica.\", 'score': 0.12368282, 'raw_content': None}, {'title': 'Beauty Influencers: What They Are and Top Influencers to Strengthen ...', 'url': 'https://influencity.com/blog/en/top-beauty-influencer-what-is-it', 'content': 'Kylie Jenner. Kylie Jenner, the biggest beauty influencer on TikTok in 2023 with 54.4 million followers, is a world-famous American media personality and businesswoman who has revolutionized the beauty industry with her influential presence on social media and successful entrepreneurial ventures, notably Kylie Cosmetics.', 'score': 0.08678673, 'raw_content': None}], 'response_time': 5.65}\n" + ] + } + ], + "source": [ + "# Step 2. Executing a Q&A search query\n", + "answer = tavily_client.search(query=\"Get me all the social media details of Faye Davis, a beauty and skincare influencer.\", search_depth='advanced', max_results=10, include_answer=True)\n", + "\n", + "# Step 3. That's it! Your question has been answered!\n", + "print(answer)" + ] + }, + { + "cell_type": "code", + "execution_count": 27, + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Based on the provided data, there is no specific information available regarding the number of Facebook followers Faye Davis, a beauty and skincare influencer, has.\n" + ] + } + ], + "source": [ + "# Step 2. Executing a Q&A search query\n", + "answer = tavily_client.qna_search(query=\"how many facebook followers does Faye Davis, a beauty and skincare influencer have?.\", search_depth='advanced')\n", + "\n", + "# Step 3. That's it! Your question has been answered!\n", + "print(answer)" + ] + }, + { + "cell_type": "code", + "execution_count": 30, + "metadata": {}, + "outputs": [], + "source": [ + "llm = ChatOpenAI(model=\"gpt-4o\")" + ] + }, + { + "cell_type": "code", + "execution_count": 63, + "metadata": {}, + "outputs": [], + "source": [ + "def get_influencer_data(social_media: str, influencer_name:str , socialmedia_name: str, socialmedia_followers:str) -> dict:\n", + " logger.info(f\"Formatting Influencer Data\")\n", + " initiator_prompt = PromptTemplate(\n", + " template=\"\"\"<|begin_of_text|><|start_header_id|>system<|end_header_id|>\n", + " You are a Influencer Data Extractor AI Agent tasked with extracting information from a search result\\n\n", + " You are provided with three informations: \\n\n", + " 1. The social media name \\n\n", + " 2. The influencer social media name search result \\n\n", + " 3. The influencer social media followers/subscribers search results \\n\n", + " \n", + " Your job is to extract the influencer social media name, and social media followers or subscriber. \\n \n", + " You are to return this as a JSON output. Three data should be there, the social media , social media name, and social media followers or subscribers.\\n \n", + " Do this decently and properly. If the search result isn't showing the social media name or social media folloers/subscribers, return the data as NULL. \\n\n", + " Don not add to the search result, just return the JSON data as expected. Also rmember to replace social media with the given social media name in the JSON output.\\n\n", + "\n", + " <|eot_id|><|start_header_id|>user<|end_header_id|>\n", + " SOCIALMEDIA: {social_media} \\n \n", + " INFLUENCER_NAME: {influencer_name}\\n\n", + " SOCIALMEDIA_NAME: {socialmedia_name} \\n\n", + " SOCIALMEDIA_FOLLOWERS: {socialmedia_followers} \\n\n", + " \n", + " <|eot_id|><|start_header_id|>assistant<|end_header_id|>\"\"\",\n", + " input_variables=[\"social_media\", \"socialmedia_name\", \"socialmedia_followers\", \"influencer_name\"],\n", + " )\n", + "\n", + " initiator_router = initiator_prompt | llm | JsonOutputParser()\n", + " output = initiator_router.invoke({\"social_media\":social_media, \"socialmedia_name\":socialmedia_name, \"socialmedia_followers\":socialmedia_followers, \"influencer_name\":influencer_name})\n", + " return output" + ] + }, + { + "cell_type": "code", + "execution_count": 64, + "metadata": {}, + "outputs": [], + "source": [ + "def socialmedia_details(social_media:str, influencer_name:str, product_category:str): \n", + " logger.info(f\"{social_media} name search\")\n", + " name_question = f\"What is the {social_media} username of {influencer_name}, this person is a popular {product_category} influencer.\"\n", + " print(name_question)\n", + " name = tavily_client.qna_search(query=name_question, search_depth='advanced')\n", + " print(name)\n", + " \n", + " logger.info(f\"{social_media} followers search\")\n", + " followers_question = f\"How many {social_media} followers does {influencer_name} have? Note this is a {product_category} popular influencer.\"\n", + " print(followers_question)\n", + " followers = tavily_client.qna_search(query=followers_question, search_depth='advanced')\n", + " print(followers)\n", + " \n", + " logger.info(f\"Formatting Influencer {social_media} Data\")\n", + " format_response = get_influencer_data(social_media={social_media}, influencer_name=influencer_name, socialmedia_name=name, socialmedia_followers=followers)\n", + " return format_response" + ] + }, + { + "cell_type": "code", + "execution_count": 65, + "metadata": {}, + "outputs": [], + "source": [ + "def get_influencer_contact(influencer_name:str, contact:str, location:str) -> dict:\n", + " logger.info(f\"Formatting Influencer Data\")\n", + " initiator_prompt = PromptTemplate(\n", + " template=\"\"\"<|begin_of_text|><|start_header_id|>system<|end_header_id|>\n", + " You are a Influencer Data Extractor AI Agent tasked with extracting information from a search result\\n\n", + " You are provided with three informations: \\n\n", + " 1. The social media name \\n\n", + " 2. The influencer contact info search result \\n\n", + " 3. The influencer location or state search results \\n\n", + " \n", + " Your job is to extract the influencer's contact info, and location. \\n \n", + " You are to return this as a JSON output. The contact and location should be the keys in the JSON \\n\n", + " Do not add to the search result, just return the JSON data as expected.\\n\n", + "\n", + " <|eot_id|><|start_header_id|>user<|end_header_id|>\n", + " INFLUENCER_NAME: {influencer_name}\\n\n", + " CONTACT: {contact} \\n\n", + " LOCATION: {location} \\n\n", + " \n", + " <|eot_id|><|start_header_id|>assistant<|end_header_id|>\"\"\",\n", + " input_variables=[\"contact\", \"location\", \"influencer_name\"],\n", + " )\n", + "\n", + " initiator_router = initiator_prompt | llm | JsonOutputParser()\n", + " output = initiator_router.invoke({\"contact\":contact, \"location\":location, \"influencer_name\":influencer_name})\n", + " return output" + ] + }, + { + "cell_type": "code", + "execution_count": 66, + "metadata": {}, + "outputs": [], + "source": [ + "def contact_details(influencer_name:str, product_category:str): \n", + " logger.info(f\"contact details search\")\n", + " contact_question = f\"What is the contact details or email of {influencer_name}, this person is a popular {product_category} influencer.\"\n", + " print(contact_question)\n", + " contact = tavily_client.qna_search(query=contact_question, search_depth='advanced')\n", + " print(contact)\n", + " \n", + " logger.info(f\"Location details search\")\n", + " location_question = f\"What is the location of {influencer_name}, this person is a popular {product_category} influencer.\"\n", + " print(location_question)\n", + " location = tavily_client.qna_search(query=location_question, search_depth='advanced')\n", + " print(location)\n", + " \n", + " logger.info(f\"Formatting Influencer contact details\")\n", + " format_response = get_influencer_contact(influencer_name=influencer_name, contact=contact, location=location)\n", + " return format_response" + ] + }, + { + "cell_type": "code", + "execution_count": 67, + "metadata": {}, + "outputs": [ + { + "name": "stderr", + "output_type": "stream", + "text": [ + "\u001b[32m2024-10-25 00:03:52.122\u001b[0m | \u001b[1mINFO \u001b[0m | \u001b[36m__main__\u001b[0m:\u001b[36msocialmedia_details\u001b[0m:\u001b[36m2\u001b[0m - \u001b[1mInstagram name search\u001b[0m\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "What is the Instagram username of Jennifer Mathews, this person is a popular Beauty & skincare influencer.\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "\u001b[32m2024-10-25 00:03:58.080\u001b[0m | \u001b[1mINFO \u001b[0m | \u001b[36m__main__\u001b[0m:\u001b[36msocialmedia_details\u001b[0m:\u001b[36m8\u001b[0m - \u001b[1mInstagram followers search\u001b[0m\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The Instagram username of Jennifer Mathews, a popular Beauty & skincare influencer, is @skincare_jen19. She has 5,415 followers and 7,823 following on Instagram.\n", + "How many Instagram followers does Jennifer Mathews have? Note this is a Beauty & skincare popular influencer.\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "\u001b[32m2024-10-25 00:04:04.387\u001b[0m | \u001b[1mINFO \u001b[0m | \u001b[36m__main__\u001b[0m:\u001b[36msocialmedia_details\u001b[0m:\u001b[36m14\u001b[0m - \u001b[1mFormatting Influencer Instagram Data\u001b[0m\n", + "\u001b[32m2024-10-25 00:04:04.391\u001b[0m | \u001b[1mINFO \u001b[0m | \u001b[36m__main__\u001b[0m:\u001b[36mget_influencer_data\u001b[0m:\u001b[36m2\u001b[0m - \u001b[1mFormatting Influencer Data\u001b[0m\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Based on the data provided, Jennifer Mathews, a Beauty & skincare influencer, has 16.6 million followers on Instagram as of the most recent information available.\n" + ] + } + ], + "source": [ + "instagram = socialmedia_details(social_media=\"Instagram\", influencer_name=\"Jennifer Mathews\", product_category=\"Beauty & skincare\")" + ] + }, + { + "cell_type": "code", + "execution_count": 68, + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{'Instagram': {'social_media_name': '@skincare_jen19', 'social_media_followers': '16.6 million'}}\n" + ] + } + ], + "source": [ + "print(instagram)" + ] + }, + { + "cell_type": "code", + "execution_count": 69, + "metadata": {}, + "outputs": [ + { + "name": "stderr", + "output_type": "stream", + "text": [ + "\u001b[32m2024-10-25 00:04:32.173\u001b[0m | \u001b[1mINFO \u001b[0m | \u001b[36m__main__\u001b[0m:\u001b[36msocialmedia_details\u001b[0m:\u001b[36m2\u001b[0m - \u001b[1mTiktok name search\u001b[0m\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "What is the Tiktok username of Jennifer Mathews, this person is a popular Beauty & skincare influencer.\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "\u001b[32m2024-10-25 00:04:38.711\u001b[0m | \u001b[1mINFO \u001b[0m | \u001b[36m__main__\u001b[0m:\u001b[36msocialmedia_details\u001b[0m:\u001b[36m8\u001b[0m - \u001b[1mTiktok followers search\u001b[0m\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Jennifer Mathews' TikTok username is @jennifermathewssince93.\n", + "How many Tiktok followers does Jennifer Mathews have? Note this is a Beauty & skincare popular influencer.\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "\u001b[32m2024-10-25 00:04:44.813\u001b[0m | \u001b[1mINFO \u001b[0m | \u001b[36m__main__\u001b[0m:\u001b[36msocialmedia_details\u001b[0m:\u001b[36m14\u001b[0m - \u001b[1mFormatting Influencer Tiktok Data\u001b[0m\n", + "\u001b[32m2024-10-25 00:04:44.815\u001b[0m | \u001b[1mINFO \u001b[0m | \u001b[36m__main__\u001b[0m:\u001b[36mget_influencer_data\u001b[0m:\u001b[36m2\u001b[0m - \u001b[1mFormatting Influencer Data\u001b[0m\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Based on the provided data, there is no specific information available regarding the number of TikTok followers Jennifer Mathews, a beauty and skincare influencer, has.\n" + ] + } + ], + "source": [ + "tiktok = socialmedia_details(social_media=\"Tiktok\", influencer_name=\"Jennifer Mathews\", product_category=\"Beauty & skincare\")" + ] + }, + { + "cell_type": "code", + "execution_count": 70, + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{'Tiktok': {'social_media_name': '@jennifermathewssince93', 'social_media_followers': None}}\n" + ] + } + ], + "source": [ + "print(tiktok)" + ] + }, + { + "cell_type": "code", + "execution_count": 71, + "metadata": {}, + "outputs": [ + { + "name": "stderr", + "output_type": "stream", + "text": [ + "\u001b[32m2024-10-25 00:05:04.964\u001b[0m | \u001b[1mINFO \u001b[0m | \u001b[36m__main__\u001b[0m:\u001b[36mcontact_details\u001b[0m:\u001b[36m2\u001b[0m - \u001b[1mcontact details search\u001b[0m\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "What is the contact details or email of Jennifer Matthews, this person is a popular Beauty & Skincare influencer.\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "\u001b[32m2024-10-25 00:05:11.384\u001b[0m | \u001b[1mINFO \u001b[0m | \u001b[36m__main__\u001b[0m:\u001b[36mcontact_details\u001b[0m:\u001b[36m8\u001b[0m - \u001b[1mLocation details search\u001b[0m\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Jennifer Matthews, a popular Beauty & Skincare influencer, can be contacted via email at [email protected] as indicated on the influence.co website.\n", + "What is the location of Jennifer Matthews, this person is a popular Beauty & Skincare influencer.\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "\u001b[32m2024-10-25 00:05:17.171\u001b[0m | \u001b[1mINFO \u001b[0m | \u001b[36m__main__\u001b[0m:\u001b[36mcontact_details\u001b[0m:\u001b[36m14\u001b[0m - \u001b[1mFormatting Influencer contact details\u001b[0m\n", + "\u001b[32m2024-10-25 00:05:17.173\u001b[0m | \u001b[1mINFO \u001b[0m | \u001b[36m__main__\u001b[0m:\u001b[36mget_influencer_contact\u001b[0m:\u001b[36m2\u001b[0m - \u001b[1mFormatting Influencer Data\u001b[0m\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Based on the available data, there is no information indicating the current location of Jennifer Matthews, who was a CIA officer known for her work in counterterrorism.\n" + ] + } + ], + "source": [ + "contact = contact_details(influencer_name=\"Jennifer Matthews\", product_category=\"Beauty & Skincare\")" + ] + }, + { + "cell_type": "code", + "execution_count": 62, + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "{'contact': {'emails': ['j***@oakland.edu',\n", + " 'j**@thebloc.com',\n", + " 'j***@thecementbond.com'],\n", + " 'phone_numbers': ['(248) XXX-XXXX', '(917) XXX-XXXX', '(707) 864-8774']},\n", + " 'location': None}" + ] + }, + "execution_count": 62, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "\n", + "contact" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [] + } + ], + "metadata": { + "kernelspec": { + "display_name": "base", + "language": "python", + "name": "python3" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 3 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython3", + "version": "3.11.7" + } + }, + "nbformat": 4, + "nbformat_minor": 2 +}