{"id":13494763,"url":"https://github.com/leptonai/search_with_lepton","last_synced_at":"2025-10-24T07:16:32.487Z","repository":{"id":219242718,"uuid":"747030811","full_name":"leptonai/search_with_lepton","owner":"leptonai","description":"Building a quick conversation-based search demo with Lepton AI.","archived":false,"fork":false,"pushed_at":"2025-04-01T01:00:56.000Z","size":119,"stargazers_count":8091,"open_issues_count":44,"forks_count":1028,"subscribers_count":57,"default_branch":"main","last_synced_at":"2025-04-23T18:41:20.809Z","etag":null,"topics":["ai","ai-applications","leptonai","llm"],"latest_commit_sha":null,"homepage":"https://search.lepton.run","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/leptonai.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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,"zenodo":null}},"created_at":"2024-01-23T05:51:43.000Z","updated_at":"2025-04-23T15:09:56.000Z","dependencies_parsed_at":"2024-12-12T04:00:24.322Z","dependency_job_id":"1f2c2dde-5605-4c5a-bde6-52ea501d3741","html_url":"https://github.com/leptonai/search_with_lepton","commit_stats":{"total_commits":20,"total_committers":7,"mean_commits":2.857142857142857,"dds":0.6,"last_synced_commit":"a8c464ebb7c2f5f251dfcb0e24307553b02778ff"},"previous_names":["leptonai/search_with_lepton"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/leptonai%2Fsearch_with_lepton","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/leptonai%2Fsearch_with_lepton/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/leptonai%2Fsearch_with_lepton/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/leptonai%2Fsearch_with_lepton/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/leptonai","download_url":"https://codeload.github.com/leptonai/search_with_lepton/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253821557,"owners_count":21969727,"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":["ai","ai-applications","leptonai","llm"],"created_at":"2024-07-31T19:01:27.896Z","updated_at":"2025-10-24T07:16:27.435Z","avatar_url":"https://github.com/leptonai.png","language":"TypeScript","funding_links":[],"categories":["TypeScript","A01_文本生成_文本对话","NLP","LLM Deployment","Repos","LLM Applications"],"sub_categories":["大语言对话模型及数据","3. Pretraining"],"readme":"\u003cdiv align=\"center\"\u003e\n\u003ch1 align=\"center\"\u003eSearch with Lepton\u003c/h1\u003e\nBuild your own conversational search engine using less than 500 lines of code.\n\u003cbr/\u003e\n\u003ca href=\"https://search.lepton.run/\" target=\"_blank\"\u003e Live Demo \u003c/a\u003e\n\u003cbr/\u003e\n\u003cimg width=\"70%\" src=\"https://github.com/leptonai/search_with_lepton/assets/1506722/845d7057-02cd-404e-bbc7-60f4bae89680\"\u003e\n\u003c/div\u003e\n\n\n## Features\n- Built-in support for LLM\n- Built-in support for search engine\n- Customizable pretty UI interface\n- Shareable, cached search results\n\n## Setup Search Engine API\nThere are two default supported search engines: Bing and Google.\n \n### Bing Search\nTo use the Bing Web Search API, please visit [this link](https://www.microsoft.com/en-us/bing/apis/bing-web-search-api) to obtain your Bing subscription key.\n\n### Google Search\nYou have three options for Google Search: you can use the [SearchApi Google Search API](https://www.searchapi.io/) from SearchApi, [Serper Google Search API](https://serper.dev) from Serper, or opt for the [Programmable Search Engine](https://developers.google.com/custom-search) provided by Google.\n\n## Setup LLM and KV\n\n\u003e [!NOTE]\n\u003e We recommend using the built-in llm and kv functions with Lepton. \n\u003e Running the following commands to set up them automatically.\n\n```shell\npip install -U leptonai openai \u0026\u0026 lep login\n```\n\n## Obtain Your Lepton AI Workspace Token\nYou can copy your workspace toke from the Lepton AI Dashboard \u0026rarr; Settings \u0026rarr; Tokens.\n\n\n## Build\n\n1. Set Bing subscription key\n```shell\nexport BING_SEARCH_V7_SUBSCRIPTION_KEY=YOUR_BING_SUBSCRIPTION_KEY\n```\n2. Set Lepton AI workspace token\n```shell\nexport LEPTON_WORKSPACE_TOKEN=YOUR_LEPTON_WORKSPACE_TOKEN\n```\n3. Build web\n```shell\ncd web \u0026\u0026 npm install \u0026\u0026 npm run build\n```\n4. Run server\n```shell\nBACKEND=BING python search_with_lepton.py\n```\n\nFor Google Search using SearchApi:\n```shell\nexport SEARCHAPI_API_KEY=YOUR_SEARCHAPI_API_KEY\nBACKEND=SEARCHAPI python search_with_lepton.py\n```\n\nFor Google Search using Serper:\n```shell\nexport SERPER_SEARCH_API_KEY=YOUR_SERPER_API_KEY\nBACKEND=SERPER python search_with_lepton.py\n```\n\nFor Google Search using Programmable Search Engine:\n```shell\nexport GOOGLE_SEARCH_API_KEY=YOUR_GOOGLE_SEARCH_API_KEY\nexport GOOGLE_SEARCH_CX=YOUR_GOOGLE_SEARCH_ENGINE_ID\nBACKEND=GOOGLE python search_with_lepton.py\n```\n\n\n\n## Deploy\n\nYou can deploy this to Lepton AI with one click:\n\n[![Deploy with Lepton AI](https://github.com/leptonai/search_with_lepton/assets/1506722/bbd40afa-69ee-4acb-8974-d060880a183a)](https://dashboard.lepton.ai/workspace-redirect/explore/detail/search-by-lepton)\n\nYou can also deploy your own version via\n\n```shell\nlep photon run -n search-with-lepton-modified -m search_with_lepton.py --env BACKEND=BING --env BING_SEARCH_V7_SUBSCRIPTION_KEY=YOUR_BING_SUBSCRIPTION_KEY\n```\n\nLearn more about `lep photon` [here](https://www.lepton.ai/docs/references/lep_photon).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fleptonai%2Fsearch_with_lepton","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fleptonai%2Fsearch_with_lepton","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fleptonai%2Fsearch_with_lepton/lists"}