{"id":23402585,"url":"https://github.com/martincastroalvarez/langchain-agent-streamlit","last_synced_at":"2025-04-08T22:22:51.131Z","repository":{"id":231730546,"uuid":"782236052","full_name":"MartinCastroAlvarez/langchain-agent-streamlit","owner":"MartinCastroAlvarez","description":"Creating an LLM Agent using LangChain and Streamlit","archived":false,"fork":false,"pushed_at":"2024-04-05T16:08:56.000Z","size":2045,"stargazers_count":1,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-02-14T17:30:42.093Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/MartinCastroAlvarez.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null}},"created_at":"2024-04-04T22:36:32.000Z","updated_at":"2024-12-13T01:22:18.000Z","dependencies_parsed_at":"2024-04-05T16:26:51.346Z","dependency_job_id":"7ca9f3bc-5079-4e52-896a-8fd2d1b38a91","html_url":"https://github.com/MartinCastroAlvarez/langchain-agent-streamlit","commit_stats":null,"previous_names":["martincastroalvarez/langchain-agent-streamlit"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MartinCastroAlvarez%2Flangchain-agent-streamlit","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MartinCastroAlvarez%2Flangchain-agent-streamlit/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MartinCastroAlvarez%2Flangchain-agent-streamlit/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MartinCastroAlvarez%2Flangchain-agent-streamlit/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/MartinCastroAlvarez","download_url":"https://codeload.github.com/MartinCastroAlvarez/langchain-agent-streamlit/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247935650,"owners_count":21020862,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-12-22T12:29:35.112Z","updated_at":"2025-04-08T22:22:51.110Z","avatar_url":"https://github.com/MartinCastroAlvarez.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# langchain-agent-streamlit\nLLM Agent using LangChain and Streamlit\n\n![wallpaper.jpg](wallpaper.jpg)\n\n## 1 Installation\n\n#### 1.1 Install dependencies\n\n```bash\nvirtualenv -p python3 .env \nsource .env/bin/activate\npip install -r requirements.txt\n```\n\n#### 1.2 Set environment variables\n\n```bash\nexport OPENAI_API_KEY=\"#####\"\n```\n\n## 2 Testing\n\n#### 2.1 Ask a question to the agent\n\n```bash\npython3 ask.py \"What are the latest regulations affecting data privacy in the California?\"\n```\n```bash\nThe latest regulations affecting data privacy in California are primarily governed by the California Consumer Privacy Act (CCPA) and the California Privacy Rights Act (CPRA). \n\nThe CCPA, which went into effect on January 1, 2020, gives California residents more control over their personal information held by businesses. It requires businesses to disclose data collection and sharing practices, provide opt-out options, and allow consumers to request deletion of their data.\n\nThe CPRA, which was approved by California voters in November 2020 and will be fully enforced starting in 2023, expands on the CCPA by introducing new data privacy rights and obligations for businesses. It establishes a new data protection agency, enhances consumer rights, and imposes stricter requirements on businesses handling personal information.\n\nBoth the CCPA and CPRA aim to enhance data privacy protections for California residents and impose obligations on businesses to ensure the security and confidentiality of personal information. It is important for startups in California to comply with these regulations to avoid potential fines and legal consequences.\n```\n\n#### 2.2 Keep asking. The agent remembers\n\n```bash\npython3 ask.py \"Tell me more about the second regulation that you mentioned.\"\n```\n```bash\nThe second regulation I mentioned is the California Consumer Privacy Act (CCPA). This regulation gives California residents the right to know what personal information is being collected about them, the right to access that information, and the right to request that their information be deleted. It also requires businesses to disclose their data collection and sharing practices and to obtain explicit consent before collecting personal information. The CCPA applies to businesses that meet certain criteria, such as having annual gross revenues over $25 million or collecting personal information from 50,000 or more consumers. Compliance with the CCPA is important for startups operating in California to protect consumer data and avoid potential fines for non-compliance.\n```\n\n#### 2.3 Ask the agent to search the web for news\n\n```bash\npython3 ask.py \"Can you search the web to see if the are new regulations?\"\n```\n```bash\nInvoking: `duckduckgo_search` with `{'query': 'new regulations for startups in California'}`\n\nOn October 8, 2023, California Governor Gavin Newsom signed into law Senate Bill 54 (\"SB 54\"), which will apply to a majority of U.S.venture capital investment firms, even if they are not based in California.\nSB 54 aims to tackle the ongoing issue of underrepresentation of certain ethnicities, races, genders, and disability statuses in the venture capital industry by requiring specific diversity measures to be implemented.\nThis guide provides a roadmap to tackle the key legal steps involved in getting a startup off the ground successfully in California.\nThe first step is to choose a business structure, with common options including LLC, S-Corp, C-Corp, Partnership, and Sole Proprietorship, each having different legal and taxIt seems that on October 8, 2023, California Governor Gavin Newsom signed Senate Bill 54 (\"SB 54\"), which aims to address the underrepresentation of certain groups in the venture capital industry.\nThis bill will impact U.S. venture capital investment firms, even those not based in California.\nAdditionally, there are key legal steps outlined for startups in California, starting with choosing a suitable business structure such as LLC, S-Corp, C-Corp, Partnership, or Sole Proprietorship.\nIt's essential to consider the legal and tax implications of each option.\n```\n\n#### 2.4 Use the Streamlit UI to ask questions\n\n```bash\nstreamlit run ui.py\n```\n\n![streamlit.png](streamlit.png)\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmartincastroalvarez%2Flangchain-agent-streamlit","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmartincastroalvarez%2Flangchain-agent-streamlit","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmartincastroalvarez%2Flangchain-agent-streamlit/lists"}