sop for execuitve generator added

This commit is contained in:
2024-09-04 01:22:36 +00:00
parent 1f02a30a16
commit 6f781cb90a
5 changed files with 624 additions and 188 deletions
+64 -16
View File
@@ -13,31 +13,51 @@
},
{
"cell_type": "code",
"execution_count": null,
"execution_count": 3,
"metadata": {},
"outputs": [],
"source": [
"from langchain_community.document_loaders import PyPDFLoader\n",
"loader = PyPDFLoader(\"/root/ds_erp_ai/data/raw/test_sop.pdf\")\n",
"docs = loader.load()"
]
},
{
"cell_type": "code",
"execution_count": 4,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"[Document(metadata={'source': '/root/ds_erp_ai/data/raw/test_sop.pdf', 'page': 0}, page_content='ERGO \\nERGO 202 4 VISION \\nDEFINITION \\nA standard operating procedure (SOP) is a step -by-step, repeatable process for any critical \\nand routine task. Its a kind of documentation that prevents stress, mistakes, and \\nmiscommunication. SOPs ensure reliability, efficiency, and consistently hitting quality \\nstandards in regular work activities. The SOPs represent the what, when, where and how of \\nevery role in the organization as it aligns to its vision and goals. \\n \\nVISION: \\nERGO envisions itself as the leading platform for renting spaces, equipment, and services, \\ntransforming the way people access and share resources. By the end of the next year, we \\naim to significantly increase our user base and participation rates, fosterin g a vibrant and \\nactive community that thrives on mutual benefit and shared success. \\n \\nWe are committed to creating an intuitive, reliable, and user -friendly app that empowers \\nindividuals and businesses to rent what they need when they need it, contributing to a \\nmore efficient and sustainable use of resources. We believe in the power of tech nology to \\nsimplify transactions, build connections, and unlock new possibilities. \\n \\nOur strategic vision is to continuously innovate and improve our platform, ensuring it \\nmeets the evolving needs of our users. We will invest in marketing and user engagement \\nstrategies to attract new users and retain existing ones, with a focus on providin g \\nexceptional customer service and a seamless user experience. \\n \\nIn the long term, we aspire to expand our services to new markets and regions, establishing \\nERGO as a global leader in the sharing economy. We are dedicated to creating value for our \\nusers, stakeholders, and the broader community, contributing to a more co nnected and \\nresource -efficient world.\" \\n \\nRemember, a strategic vision is a guiding light for a companys future direction. It will be \\nrevisited and potentially revised as the company grows and the market landscape \\nchanges. Its also important to ensure that all stakeholders understand and align with the \\nvision. This includes employees, investors, and customers. They all play a crucia l role in \\nthe companys journey towards its vision. \\n '),\n",
" Document(metadata={'source': '/root/ds_erp_ai/data/raw/test_sop.pdf', 'page': 1}, page_content=' '),\n",
" Document(metadata={'source': '/root/ds_erp_ai/data/raw/test_sop.pdf', 'page': 2}, page_content='GOALS; \\n1. MARKETING \\na. Brand Awareness : Increase brand awareness by 50% over the next year \\nthrough targeted marketing campaigns. \\nb. User Acquisition: Acquire 100,000 new users over the next year through \\ndigital marketing strategies. \\nc. User Engagement : Improve user engagement by 30% by implementing a \\ncontent marketing strategy that educates users about the benefits and uses \\nof ERGO. \\nd. Market Expansion : Enter two new geographic markets by the end of the year \\nthrough localized marketing campaigns. \\n2. IT INFRASTRUCTURE : \\na. Platform Stability: Achieve 99.9% uptime for the ERGO app to ensure a \\nseamless user experience. \\nb. Security: Implement robust security measures to protect user data and build \\ntrust with the user base. \\nc. Scalability: Enhance the IT infrastructure to support a 50% increase in user \\ntraffic over the next year. \\nd. Feature Development: Develop and launch three new features based on user \\nfeedback to improve the functionality and usability of the ERGO app. \\n3. SALES TEAM GOALS: \\na. New User Sales: Sign up 50,000 new users over the next year through direct \\nsales efforts. \\nb. Partnership Development: Establish partnerships with 20 new businesses to \\noffer their spaces, equipment, or services on ERGO. \\nc. Customer Retention: Achieve a customer retention rate of 90% by providing \\nexcellent customer service and follow -up. \\nd. Revenue Growth: Increase sales revenue by 30% over the next year by \\nupselling premium features and services. \\n '),\n",
" Document(metadata={'source': '/root/ds_erp_ai/data/raw/test_sop.pdf', 'page': 3}, page_content='ERGO 2024 Standard Operating Procedures : \\n \\nAPPLICATION \\nThis document applies to Information technology specialists and contractors. Marketing \\nteams and Contracting Specialist inv olved with Marketing contracts. Current and future \\nsales associates employed or contracted by ERGO. \\n \\nVISION STATEMENT \\n \\nERGOs strategic goals for the next year encompass marketing, IT infrastructure, and sales. \\nIn marketing, we aim to increase brand awareness by 50% through targeted campaigns, \\nacquire 100,000 new users via digital strategies, improve user engagement by 30% with a \\ncontent marketing strategy, and expand into two new markets. For IT infrastructure, our \\ngoals are to achieve 99.9% app uptime, implement robust security measures, enhance \\ninfrastructure to support a 50% increase in user traffic, and develop three n ew features \\nbased on user feedback. The sales team aims to sign up 50,000 new users, establish \\npartnerships with 20 new businesses, achieve a 90% customer retention rate, and increase \\nsales revenue by 30% through upselling. \\n \\nRESPONSIBILITIES \\n \\nCHIEF OPERATIONS OFFICER : \\nCross -Functional Coordination: As a key member of the executive team, the COO will \\nensure alignment and coordination across different departments to achieve these goals. \\nPerformance Monitoring: The COO will establish key performance indicators (KPIs) and \\nregularly review progress towards these goals, making necessary adjustments to strategies \\nand plans. \\n \\nSALES MANAGER; \\nUnder the oversight and control of the COO, the sales manager will guide the sales team to \\nsign up 50,000 new users, establish partnerships with 20 new businesses, achieve a 90% \\ncustomer retention rate, and increase sales revenue by 30% through upselling. \\n \\nCAMPAIGN MANAGER: '),\n",
" Document(metadata={'source': '/root/ds_erp_ai/data/raw/test_sop.pdf', 'page': 4}, page_content='Under the oversight and control of the COO the campaign manager will oversee the \\nmarketing teams efforts to increase brand awareness and acquire new users. They will \\nalso ensure the implementation of a content marketing strategy to improve user \\nengagement and spearhead efforts to expand into two new geographic markets. The \\ncampaign manager will exercise operational oversight and control over marketing \\nspecialist and ad contracts. \\n \\nCONTENT MARKETING SPECIALIST: \\nUnder the oversight and control of the campaign manager the content marketing specialist \\nwill; \\n1. Create fun and informative quizzes related to your brand or services . Share them on \\nsocial media and encourage users to participate and share their results. \\n2. Share behind -the-scenes glimpses of your company culture, product development, \\nor team members. People love to connect with the human side of brands. \\n3. User -Generated Content Contests: Run a contest where users submit photos, \\nvideos, or stories related to your brand. Feature the best entries on your website or \\nsocial media. \\n4. Host online webinars or workshops that provide value to potential users. Topics \\ncould include product demos, services trends, or problem -solving sessions. \\n5. Create comprehensive guides or e -books that address common pain points your \\nproduct solves. Promote these through targeted ads and email campaigns. \\n6. Share success stories of existing users. Highlight how your product transformed \\ntheir lives or businesses. Authentic testimonials resonate well with potential users. \\n7. Develop a series of short videos explaining different aspects of your product or \\nservices . Keep them engaging and easy to understand. \\n8. Create visually appealing infographics that educate users about ERGOs benefits. \\nUse interactive elements like clickable sections or animations. \\n9. Set up a community forum where users can ask questions, share tips, and interact \\nwith each other. Host live Q&A sessions on social media. \\n10. Write blog posts specifically tailored to the culture, language, and interests of the \\nnew markets. Address local challenges and showcase how ERGO can solve them. \\n11. Create landing pages in the local language, highlighting the unique value \\nproposition of ERGO for each market. \\n12. Partner with influencers or thought leaders from the new markets. Have them \\ncreate content or host events related to ERGO. \\n \\nDIGITAL MARKETING SPECIALIST: '),\n",
" Document(metadata={'source': '/root/ds_erp_ai/data/raw/test_sop.pdf', 'page': 5}, page_content='Under the oversight and control of the campaign manager the digital marketing specialist \\nwill; \\n1. Conduct market research to understand the target audience, their preferences, and \\nwhere they spend their time online.. \\n2. React to media inquiries: engage with journalists and media outlets to kickstart your \\nPR efforts1. \\n3. Start a referral program to encourage existing users to refer new ones. \\n4. Regularly publish informative blog posts to attract organic traffic and showcase \\nyour expertise . \\n5. Offer limited -time promotions or exclusive deals to entice new users. \\n6. Personalize content: tailor content to user interests and needs. Use personalized \\npush notifications, emails, and SEO strategies. \\n7. Measure metrics: track page views, time spent on site, bounce rate, and social \\nmedia interactions. Tools like Full Session can provide insights into user behavior4. \\n8. Engage with audience: respond to comments, likes, and shares. Regularly publish \\nrelevant content to keep users engaged. \\n9. Conduct market research: understand local nuances, preferences, and behaviors. \\nDefine demographics, languages, and dialects. \\n10. Adapt content: translate and culturally adapt content. Consider local holidays, \\nsymbols, and traditions. \\n11. Localize marketing channels: choose platforms popular in the new markets. Adjust \\nadvertising campaigns accordingly. \\n12. Test and analyze pilot localized campaigns, analyze results, and optimize based on \\ndata. \\nUnder the oversight and control of the campaign manager and in coordination with other \\nspecialist the digital marketing specialist must; \\n1. Leverage social media: use platforms where your audience is most active. Share \\nengaging content, run targeted ads, and interact with followers \\n2. Implement a search -focused content marketing strategy, create valuable content \\nthat aligns with what your audience searches for. Optimize it for relevant keywords \\nto improve organic visibility \\n3. Run targeted ads on cloud -related platforms or industry -specific websites in the \\nnew markets. Emphasize ERGOs cloud advantages for local businesses. \\nSEARCH ENGINE OPTIMIZATION SPECIALIST: \\nUnder the oversight and control of the campaign manager the search engine optimization \\nspecialist will; \\n1. Create valuable content that aligns with what your audience searches for. Optimize \\nit for relevant keywords to improve organic visibility '),\n",
" Document(metadata={'source': '/root/ds_erp_ai/data/raw/test_sop.pdf', 'page': 6}, page_content='2. Personalize Content: Tailor content to user interests and needs. Use personalized \\npush notifications, emails, and SEO strategies. \\n3. Measure Metrics: Track page views, time spent on site, bounce rate, and social \\nmedia interactions. Tools like Full Session can provide insights into user behavior4. \\n4. Under the oversight and control of the campaign manager and in coordination with \\nother specialist the search engine optimization specialist must; \\n5. Engage with journalists and media outlets to kickstart your PR efforts. \\n6. Use platforms where your audience is most active. Share engaging content, run \\ntargeted ads, and interact with followers. \\n \\nINFORMATION TECHNOLOGY OFFICER \\nIn coordination cooperation with the Chief Operations Officer the Information Technology \\nOfficer will work closely with the it team to achieve 99.9% uptime for the ergo app, \\nimplement robust security measures, shall enhance the it infrastructure to support \\nincreased user traffic, and must develop and launch new features based on user feedback. \\nThe Information Technology officer will h ave a well -defined plan in place to handle security \\nincidents in local and new markets . \\nCLOUD ENGINEER: \\nunder the oversight and control of the Information Technology Officer the Cloud Engineer \\nshall; \\n1. Select cloud service providers with strong security practices. Ensure they comply \\nwith industry standards. \\n2. Clearly communicate to users how their data will be collected, used, and \\nprotected. Maintain a comprehensive privacy policy on your website. \\n3. Obtain explicit consent from users before collecting any personal data. Implement \\ncookie consent banners and ensure compliance with regulations like GDPR or \\nCCPA. \\n4. Isolate different components of your infrastructure to prevent lateral movement in \\ncase of a breach \\n5. Conduct periodic security audits to identify vulnerabilities and address them \\npromptly. \\nunder the oversight and control of the Information Technology Officer the Cloud Engineer \\nwill; \\n1. Design , implement, and manag e cloud computing solutions, such as public, \\nprivate, and hybrid cloud environments. \\n2. Create step -by-step video tutorials on how new users can set up their accounts, \\naccess features, and utilize cloud -based services within ERGO. \\n3. Deploy cloud infrastructure '),\n",
" Document(metadata={'source': '/root/ds_erp_ai/data/raw/test_sop.pdf', 'page': 7}, page_content=\"4. Migrate on -premises systems to the cloud \\n1. Continuously monitor and optimize ERGOs cloud resources for scalability and \\ncost -effectiveness. Share success stories of how cloud improvements directly \\nbenefit users. Ensure cloud security and compliance \\n2. Host webinars on cloud -related topics, emphasizing how ERGO leverages cloud \\ntechnology. Invite industry experts and influencers to participate. \\nunder the oversight and control of the Information Technology Officer the Cloud Engineer \\nmust ; \\n3. Establish an online community forum where users can share tips, ask questions, \\nand discuss cloud -related topics. Cloud engineers can actively participate and \\nprovide insights. \\n4. Create visually appealing case studies or blog posts highlighting how ERGOs cloud \\ninfrastructure enables seamless user experiences. Explain how scalability, \\nreliability, and security are achieved through cloud services. \\n5. Develop an interactive web page or app feature that takes users on a virtual tour of \\nERGOs cloud architecture. Explain key components, data flow, and benefits. \\n6. Train cloud support teams to assist users in the new markets. Ensure they \\nunderstand the cultural context and can address cloud -related queries effectively. \\n \\nDATABASE ADMINISTRATOR (DBA): \\nDatabase administrators are responsible for the design, implementation, and \\nmaintenance of databases that store and organize an organization's data. They install and \\nconfigure database management systems, optimize database performance, backup and \\nrestore d ata, and enforce data security policies. \\nunder the oversight and control of the Information Technology Officer the DBA will; \\n1. Continuously update and expand the user database. Capture user data through \\nsign -ups, app usage, and interactions. Ensure data accuracy and completeness. \\n2. Leverage lookalike audience targeting on platforms like Facebook and Google Ads. \\nUse existing user profiles to find similar potential users. \\n3. Set up automated triggers based on user behavior (e.g., abandoned carts, frequent \\nvisits). Send personalized emails or notifications to re -engage users. \\n4. Regularly clean and optimize the database. Remove inactive or irrelevant users to \\nimprove engagement metrics. \\n5. Gather data on market trends, cultural nuances, and user preferences in the new \\nmarkets. Understand how ERGOs brand can align with local values. \\nunder the oversight and control of the Information Technology Officer the DBA must; \"),\n",
" Document(metadata={'source': '/root/ds_erp_ai/data/raw/test_sop.pdf', 'page': 8}, page_content='1. Collaborate with the marketing team to collect data on brand awareness metrics \\n(e.g., social media mentions, website traffic, search volume). Use this data to \\nidentify trends and areas for improvement. \\n2. Create segments within the database based on user interactions with ERGOs \\nbrand. Tailor marketing messages to each segment, emphasizing brand values, \\nunique selling points, and success stories. \\n3. Experiment with different marketing campaigns and track their impact on brand \\nawareness. Optimize based on the most effective strategies. \\n6. Work closely with data analysts to profile existing users. Understand their \\ndemographics, behavior, and preferences. Use this information to target similar \\naudiences in digital marketing campaigns. \\n7. Collaborate with content creators to personalize marketing content. Use database \\ninsights to tailor messages that resonate with users interests and pain points. \\n8. Collaborate with content teams to create region -specific marketing materials. \\nTranslate content, adapt visuals, and customize messaging. \\nIT SECURITY ANALYST: \\nUnder the oversight and control of the Information Technology Officer the IT Security \\nAnalyst shall; \\n1. Research and understand the data protection laws and regulations in the new \\nmarkets. Ensure compliance with GDPR, CCPA, or other relevant standards. \\n2. Train local teams on incident response procedures \\nUnder the oversight and control of the Information Technology Officer the IT Security \\nAnalyst will; \\n1. Restrict access to marketing databases. Only authorized personnel should handle \\nsensitive customer information. \\n2. Implement CAPTCHA or other anti -bot measures during user registration to prevent \\nfraudulent accounts. \\n3. If ERGO uses apis for user registration or authentication, ensure they are properly \\nsecured with authentication tokens and rate limiting. \\n4. Set up anomaly detection to identify suspicious user activity (e.g., sudden spikes in \\nregistrations). \\n5. Regularly update CMS platforms and plugins to patch security vulnerabilities. Use \\nstrong authentication for CMS access. \\n6. Ensure that content marketing materials (blogs, videos, etc.) Are free from \\nmalicious code (e.g., cross -site scripting). Scan for vulnerabilities. \\nUnder the oversight and control of the Information Technology Officer the IT Security \\nAnalyst must; '),\n",
" Document(metadata={'source': '/root/ds_erp_ai/data/raw/test_sop.pdf', 'page': 9}, page_content=\"1. Collaborate with the marketing team to ensure that all customer data collected for \\ntargeted campaigns is securely stored and transmitted. Implement encryption for \\ndata in transit and at rest. \\n2. Educate marketing staff about security best practices. Ensure they understand the \\nimportance of protecting customer data. \\nIT OPERATIONS MANAGER: \\nIT operations managers oversee the day -to-day operations of an organization's IT \\ninfrastructure and support teams. They develop and implement IT policies and procedures, \\nmanage IT resources and budgets, coordinate IT projects and initiatives, and ensure th at IT \\nsystems meet business requirements and objectives. \\nIT SUPPORT SPECIALIST: \\nUnder the oversight and control of the IT OPERATIONS MANAGER the IT Security Analyst \\nwill; \\n1. Ensure that the onboarding process is seamless for new users. Provide clear \\ninstructions, troubleshoot any issues, and guide them through setup. \\n2. Set up efficient user support channels (chat, email, or phone). Respond promptly to \\ninquiries and resolve any technical hurdles. \\n3. Reach out to users who havent engaged recently. Offer personalized assistance, \\nask for feedback, and provide tips on using ERGO effectively. \\n4. Gather user feedback on their experiences. Use this information to improve the \\nproduct and enhance brand perception. \\n5. Conduct surveys to understand pain points and areas for improvement. Use this \\ndata to enhance user engagement strategies. \\n6. Continuously update the knowledge base with troubleshooting guides, FAQs, and \\nbest practices. Make it easily accessible to users. \\n7. Collaborate with localization teams to ensure that ERGOs software and \\ndocumentation are available in the local languages of the new markets. \\n8. Anticipate region -specific technical challenges. Prepare troubleshooting guides \\ntailored to the new markets. \\n9. Host webinars or virtual training sessions for existing and potential users. Teach \\nthem how to make the most of ERGOs services. \\nUnder the oversight and control of the IT OPERATIONS MANAGER the IT Security Analyst \\nmust; \\n1. Collaborate with the marketing team to create engaging technical content. Write \\nblog posts, FAQs, or video tutorials about ERGOs unique features and benefits. \\n2. Encourage existing users to refer new users. Offer incentives or discounts for \\nsuccessful referrals. \"),\n",
" Document(metadata={'source': '/root/ds_erp_ai/data/raw/test_sop.pdf', 'page': 10}, page_content='3. Understand cultural nuances and adapt communication accordingly. Provide user \\nsupport that aligns with local customs and preferences. \\nDEVOPS ENGINEER: \\nUnder the oversight and control of the IT OPERATIONS MANAGER the DEVOPS engineer \\nshall ; \\n1. Collaborate with legal and compliance teams to understand data protection laws \\nand ensure adherence in each region. \\nUnder the oversight and control of the IT OPERATIONS MANAGER the DEVOPS engineer \\nwill; \\n1. Implement monitoring tools to track website performance, uptime, and user \\ninteractions. Set up alerts for any anomalies or downtime. \\n2. Ensure that ERGOs infrastructure can handle increased traffic during marketing \\ncampaigns. Autoscale servers and optimize load balancers. \\n3. Design robust and fault -tolerant systems to handle user registrations, logins, and \\ndata processing. Use redundancy and failover mechanisms. \\n4. optimize content delivery networks (CDNs). Reduce latency for users accessing \\nERGOs content. \\n5. Set up infrastructure to support A/B testing for different content variations. Monitor \\nuser engagement metrics for each variant. \\n6. Customize deployment scripts for each new market. Consider regional cloud \\nproviders and data centers. \\nUnder the oversight and control of the IT OPERATIONS MANAGER the DEVOPS engineer \\nmust; \\n1. Set up CI/CD pipelines to streamline marketing campaign deployments. Automate \\nthe rollout of new landing pages, banners, and promotional content. \\n2. Collaborate with DBA to simulate heavy user loads during testing. Optimize \\ndatabase queries and API endpoints for scalability. \\n3. Create a feedback loop between DevOps and content teams. Rapidly deploy \\nchanges based on user feedback to improve engagement. \\n4. Set up databases with geo -replication to ensure data availability and low latency in \\nnew markets. \\n \\n \\n \\n \\n \\n \\n '),\n",
" Document(metadata={'source': '/root/ds_erp_ai/data/raw/test_sop.pdf', 'page': 11}, page_content=' \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n ')]"
]
},
"execution_count": 4,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"docs"
]
},
{
"cell_type": "code",
"execution_count": 1,
"execution_count": 5,
"metadata": {},
"outputs": [
{
"ename": "NameError",
"evalue": "name 'SOPsResponse' is not defined",
"output_type": "error",
"traceback": [
"\u001b[0;31m---------------------------------------------------------------------------\u001b[0m",
"\u001b[0;31mNameError\u001b[0m Traceback (most recent call last)",
"Cell \u001b[0;32mIn[1], line 22\u001b[0m\n\u001b[1;32m 19\u001b[0m \u001b[38;5;28;01mclass\u001b[39;00m \u001b[38;5;21;01mRoles_response\u001b[39;00m(BaseModel):\n\u001b[1;32m 20\u001b[0m roles: \u001b[38;5;28mlist\u001b[39m[\u001b[38;5;28mstr\u001b[39m]\n\u001b[0;32m---> 22\u001b[0m \u001b[38;5;28;01mclass\u001b[39;00m \u001b[38;5;21;01mSopGenerator\u001b[39;00m:\n\u001b[1;32m 23\u001b[0m \u001b[38;5;28;01mdef\u001b[39;00m \u001b[38;5;21m__init__\u001b[39m(\u001b[38;5;28mself\u001b[39m):\n\u001b[1;32m 24\u001b[0m \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39mapi_key \u001b[38;5;241m=\u001b[39m os\u001b[38;5;241m.\u001b[39mgetenv(\u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mOPENAI_API_KEY\u001b[39m\u001b[38;5;124m\"\u001b[39m)\n",
"Cell \u001b[0;32mIn[1], line 89\u001b[0m, in \u001b[0;36mSopGenerator\u001b[0;34m()\u001b[0m\n\u001b[1;32m 60\u001b[0m response \u001b[38;5;241m=\u001b[39m \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39mclient\u001b[38;5;241m.\u001b[39mbeta\u001b[38;5;241m.\u001b[39mchat\u001b[38;5;241m.\u001b[39mcompletions\u001b[38;5;241m.\u001b[39mparse(\n\u001b[1;32m 61\u001b[0m model\u001b[38;5;241m=\u001b[39m\u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39mmodel,\n\u001b[1;32m 62\u001b[0m messages\u001b[38;5;241m=\u001b[39m[\n\u001b[0;32m (...)\u001b[0m\n\u001b[1;32m 83\u001b[0m temperature\u001b[38;5;241m=\u001b[39m\u001b[38;5;241m0.1\u001b[39m\n\u001b[1;32m 84\u001b[0m )\n\u001b[1;32m 86\u001b[0m \u001b[38;5;28;01mreturn\u001b[39;00m json\u001b[38;5;241m.\u001b[39mloads(response\u001b[38;5;241m.\u001b[39mchoices[\u001b[38;5;241m0\u001b[39m]\u001b[38;5;241m.\u001b[39mmessage\u001b[38;5;241m.\u001b[39mcontent)\n\u001b[0;32m---> 89\u001b[0m \u001b[38;5;28;01mdef\u001b[39;00m \u001b[38;5;21mgenerate_sops\u001b[39m(\u001b[38;5;28mself\u001b[39m, roles, docs_text) \u001b[38;5;241m-\u001b[39m\u001b[38;5;241m>\u001b[39m \u001b[43mSOPsResponse\u001b[49m:\n\u001b[1;32m 90\u001b[0m roles_sops_all \u001b[38;5;241m=\u001b[39m {}\n\u001b[1;32m 92\u001b[0m \u001b[38;5;28;01mfor\u001b[39;00m role \u001b[38;5;129;01min\u001b[39;00m roles:\n",
"\u001b[0;31mNameError\u001b[0m: name 'SOPsResponse' is not defined"
]
}
],
"outputs": [],
"source": [
"import os\n",
"import json\n",
@@ -167,6 +187,26 @@
"roles = [\"Devops engineers\"]\n",
"sops_response = service.check_role_sop(roles,docs)"
]
},
{
"cell_type": "code",
"execution_count": 6,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"{'message': 'SOPs found for the roles: Devops engineers', 'status': True}"
]
},
"execution_count": 6,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"sops_response"
]
}
],
"metadata": {
@@ -176,7 +216,15 @@
"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.10.13"
}
},