{"id":19454795,"url":"https://github.com/fancellu/langchaindemo","last_synced_at":"2026-05-04T01:34:35.218Z","repository":{"id":188315270,"uuid":"678511628","full_name":"fancellu/langChainDemo","owner":"fancellu","description":"Lots of little applications showing langchain at work","archived":false,"fork":false,"pushed_at":"2025-07-15T11:10:39.000Z","size":12848,"stargazers_count":4,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-07-16T01:08:53.802Z","etag":null,"topics":["chromadb","flask","huggingface","langchain","openai","python","tutorial"],"latest_commit_sha":null,"homepage":"","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/fancellu.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,"publiccode":null,"codemeta":null}},"created_at":"2023-08-14T18:11:56.000Z","updated_at":"2025-07-15T11:11:20.000Z","dependencies_parsed_at":"2024-11-10T17:12:06.654Z","dependency_job_id":"c28790f3-4474-430d-bdc1-d47d52ab655d","html_url":"https://github.com/fancellu/langChainDemo","commit_stats":null,"previous_names":["fancellu/langchaindemo"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/fancellu/langChainDemo","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fancellu%2FlangChainDemo","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fancellu%2FlangChainDemo/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fancellu%2FlangChainDemo/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fancellu%2FlangChainDemo/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/fancellu","download_url":"https://codeload.github.com/fancellu/langChainDemo/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fancellu%2FlangChainDemo/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32591601,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-03T22:12:39.696Z","status":"ssl_error","status_checked_at":"2026-05-03T22:09:10.534Z","response_time":103,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["chromadb","flask","huggingface","langchain","openai","python","tutorial"],"created_at":"2024-11-10T17:12:02.850Z","updated_at":"2026-05-04T01:34:35.212Z","avatar_url":"https://github.com/fancellu.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# LangChain demo project\n\n## To install requirements\n\n```pip install -r requirements.txt```\n\n## Tutorial\n\n[Tutorial](tutorial/index.md)\n\n## To run\n\nMake sure you have environmental variable setup for OpenAI and HuggingFace API keys\n\n| Keyname                  |\n|--------------------------|\n| HUGGINGFACEHUB_API_TOKEN |\n| OPENAI_API_KEY           |\n\n### [main.py](main.py)\n\nA simple OpenAI prompt example. e.g.\n```\n\u003e What would be a good company name for a company than makes colorful socks?\nRainbow Socksy\nBrightToes Socks\n```\n\n### [hf.pay](hf.py)\n\nA hugging face prompt example using the flan-t5-base model\n```\n\u003e translate English to German: How old are you?\nWie alt sind Sie?\n```\n\n### [template_and_chain.py](template_and_chain.py)\nExample of prompt templating and prompt chaining\n```\n\u003e You are a naming consultant for new companies. What is a good name for a company that makes {product}?\n\u003e colorful socks\nRainbow Socks Co.\n\u003e Digital pianos\nDigitalPianoKeys.\n```\n```\n\u003e You are a naming consultant for new companies. What is a good name for a {company} that makes {product}?\n\u003e {\"company\": \"AI Startup\", \"product\": \"large language models\"}\nBigTalk Technologies.\n```\n\n### [simple_sequential_chain.py](simple_sequential_chain.py)\nAnother way to do simple chaining\n```\n\u003e What is a good name for a company that makes {product}?\n\u003e Write a catch phrase for the following company: {company_name}\n\u003e Gaming mice\n\"Level up with GamersRigged!\"\n```\n\n### [action.py](action.py)\nHow to supply extra tools/plugins/agents to llm to perform certain functionality\n```\n\u003e When was the 3rd president of the USA born? What is that year cubed?\nThomas Jefferson was born in 1743 and the year cubed is 5295319407\n```\n\n### [duckduckgo_wikipedia.py](duckduckgo_wikipedia.py)\nAnother example of action agents\n```\n\u003e Where are the next summer olympics going to be hosted? What is the population of that country ?\nThe 2024 Olympics will be held in Paris, France, with a population of 68,035,000 people\n```\n \n\n### [plan.py](plan.py)\nComplex PlanAndExecute agent example\n```\n\u003e Where are the next summer olympics going to be hosted? What is the population of that country, squared?\nThe square of the population of Paris, France is 4,840,000,000,000\n```\n\n### [chat.py](chat.py)\nA simple chat repl\n```\n\u003e  Why do dogs have black lips?\nDogs have black lips to help protect their skin from the sun's UV rays. The black pigment in their lips helps to absorb the sun's rays and prevent sunburn.\n\u003e And how many legs do they generally have?\nDogs generally have four legs\n\n```\n\n### [documentQA.py](documentQA.py)\nLoads up a text document (State of the Union 2020) into chromadb, and lets you do QA/chat with LLM about that document\n```\n\u003e Summarize what Trump says\nPresident Trump states that since he took office, the U.S. economy has improved, with 7 million new jobs created, and the country is thriving and highly respected again. He has taken action to combat human trafficking and secure the southern border, ending the practice of catch and release.\n\u003e Make a list of all his talking points\n- Reviving the US economy\n- Slashing job-killing regulations\n- Enacting historic and record-setting tax cuts\n- Fighting for fair and reciprocal trade agreements\n- Creating 7 million new jobs\n- Putting America first\n- Protecting patients with pre-existing conditions\n- Protecting Medicare and Social Security\n- Requiring price transparency\n- Replacing the disastrous NAFTA trade deal\n```\n\n### [flask_documentQA.py](documentQA.py)\nAs above, but with a web UI. I also added in a PDF about cats, so you can ask about cats too\n\n![Screenshot](/2023-08-17_17-59-46.png?raw=true \"Screenshot\")","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffancellu%2Flangchaindemo","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffancellu%2Flangchaindemo","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffancellu%2Flangchaindemo/lists"}