{"id":13457157,"url":"https://github.com/rashadphz/farfalle","last_synced_at":"2025-05-14T21:07:10.205Z","repository":{"id":236158716,"uuid":"792039881","full_name":"rashadphz/farfalle","owner":"rashadphz","description":"🔍 AI search engine - self-host with local or cloud LLMs","archived":false,"fork":false,"pushed_at":"2024-09-27T07:52:45.000Z","size":2291,"stargazers_count":3265,"open_issues_count":50,"forks_count":290,"subscribers_count":30,"default_branch":"main","last_synced_at":"2025-04-11T14:17:05.473Z","etag":null,"topics":["fastapi","generative-ui","gpt-4o","groq","llm","nextjs","ollama","openai","perplexity","react","search-engine","shadcn-ui","tailwindcss"],"latest_commit_sha":null,"homepage":"https://www.farfalle.dev/","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/rashadphz.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}},"created_at":"2024-04-25T21:24:27.000Z","updated_at":"2025-04-11T11:14:41.000Z","dependencies_parsed_at":"2024-05-29T02:30:54.007Z","dependency_job_id":"d90725ba-4e48-4fad-a748-c5d4d831fefa","html_url":"https://github.com/rashadphz/farfalle","commit_stats":{"total_commits":234,"total_committers":5,"mean_commits":46.8,"dds":"0.021367521367521403","last_synced_commit":"a9dd4939d21f4da6bb3ef7de138caba0f2ffab13"},"previous_names":["rashadphz/farfalle"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rashadphz%2Ffarfalle","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rashadphz%2Ffarfalle/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rashadphz%2Ffarfalle/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rashadphz%2Ffarfalle/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rashadphz","download_url":"https://codeload.github.com/rashadphz/farfalle/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254227612,"owners_count":22035669,"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":["fastapi","generative-ui","gpt-4o","groq","llm","nextjs","ollama","openai","perplexity","react","search-engine","shadcn-ui","tailwindcss"],"created_at":"2024-07-31T08:01:34.401Z","updated_at":"2025-05-14T21:07:05.180Z","avatar_url":"https://github.com/rashadphz.png","language":"TypeScript","funding_links":[],"categories":["TypeScript","A01_文本生成_文本对话","Repos","tailwindcss"],"sub_categories":["大语言对话模型及数据"],"readme":"# Farfalle\n\nOpen-source AI-powered search engine. (Perplexity Clone)\n\nRun local LLMs (**llama3**, **gemma**, **mistral**, **phi3**), custom LLMs through **LiteLLM**, or use cloud models (**Groq/Llama3**, **OpenAI/gpt4-o**)\n\nhttps://github.com/rashadphz/farfalle/assets/20783686/9527a8c9-a13b-4e53-9cda-a3ab28d671b2\n\nPlease feel free to contact me on [Twitter](https://twitter.com/rashadphz) or [create an issue](https://github.com/rashadphz/farfalle/issues/new) if you have any questions.\n\n## 💻 Live Demo\n\n[farfalle.dev](https://farfalle.dev/) (Cloud models only)\n\n## 📖 Overview\n\n- 🛠️ [Tech Stack](#%EF%B8%8F-tech-stack)\n- 🏃🏿‍♂️ [Getting Started](#%EF%B8%8F-getting-started)\n- 🚀 [Deploy](#-deploy)\n\n## 🛣️ Roadmap\n\n- [x] Add support for local LLMs through Ollama\n- [x] Docker deployment setup\n- [x] Add support for [searxng](https://github.com/searxng/searxng). Eliminates the need for external dependencies.\n- [x] Create a pre-built Docker Image\n- [x] Add support for custom LLMs through LiteLLM\n- [x] Chat History\n- [x] Expert Search\n- [ ] Chat with local files\n\n\n\n## 🛠️ Tech Stack\n\n- Frontend: [Next.js](https://nextjs.org/)\n- Backend: [FastAPI](https://fastapi.tiangolo.com/)\n- Search API: [SearXNG](https://github.com/searxng/searxng), [Tavily](https://tavily.com/), [Serper](https://serper.dev/), [Bing](https://www.microsoft.com/en-us/bing/apis/bing-web-search-api)\n- Logging: [Logfire](https://pydantic.dev/logfire)\n- Rate Limiting: [Redis](https://redis.io/)\n- Components: [shadcn/ui](https://ui.shadcn.com/)\n\n\n## Features\n- Search with multiple search providers (Tavily, Searxng, Serper, Bing)\n- Answer questions with cloud models (OpenAI/gpt4-o, OpenAI/gpt3.5-turbo, Groq/Llama3)\n- Answer questions with local models (llama3, mistral, gemma, phi3)\n- Answer questions with any custom LLMs through [LiteLLM](https://litellm.vercel.app/docs/providers)\n- Search with an agent that plans and executes the search for better results\n\n## 🏃🏿‍♂️ Getting Started Locally\n\n### Prerequisites\n\n- [Docker](https://docs.docker.com/get-docker/)\n- [Ollama](https://ollama.com/download) (If running local models)\n  - Download any of the supported models: **llama3**, **mistral**, **gemma**, **phi3**\n  - Start ollama server `ollama serve`\n\n### Get API Keys\n\n- [Tavily (Optional)](https://app.tavily.com/home)\n- [Serper (Optional)](https://serper.dev/dashboard)\n- [OpenAI (Optional)](https://platform.openai.com/api-keys)\n- [Bing (Optional)](https://www.microsoft.com/en-us/bing/apis/bing-web-search-api)\n- [Groq (Optional)](https://console.groq.com/keys)\n\n### Quick Start:\n```\ngit clone https://github.com/rashadphz/farfalle.git\ncd farfalle \u0026\u0026 cp .env-template .env\n```\nModify .env with your API keys (Optional, not required if using Ollama)\n\nStart the app:\n```\ndocker-compose -f docker-compose.dev.yaml up -d\n```\n\nWait for the app to start then visit [http://localhost:3000](http://localhost:3000).\n\nFor custom setup instructions, see [custom-setup-instructions.md](/custom-setup-instructions.md)\n\n## 🚀 Deploy\n\n### Backend\n\n[![Deploy to Render](https://render.com/images/deploy-to-render-button.svg)](https://render.com/deploy?repo=https://github.com/rashadphz/farfalle)\n\nAfter the backend is deployed, copy the web service URL to your clipboard.\nIt should look something like: https://some-service-name.onrender.com.\n\n### Frontend\n\nUse the copied backend URL in the `NEXT_PUBLIC_API_URL` environment variable when deploying with Vercel.\n\n[![Deploy with Vercel](https://vercel.com/button)](https://vercel.com/new/clone?repository-url=https%3A%2F%2Fgithub.com%2Frashadphz%2Ffarfalle\u0026env=NEXT_PUBLIC_API_URL\u0026envDescription=URL%20for%20your%20backend%20application.%20For%20backends%20deployed%20with%20Render%2C%20the%20URL%20will%20look%20like%20this%3A%20https%3A%2F%2F%5Bsome-hostname%5D.onrender.com\u0026root-directory=src%2Ffrontend)\n\nAnd you're done! 🥳\n\n\n## Use Farfalle as a Search Engine\n\nTo use Farfalle as your default search engine, follow these steps:\n1. Visit the settings of your browser\n2. Go to 'Search Engines'\n3. Create a new search engine entry using this URL: http://localhost:3000/?q=%s.\n4. Add the search engine.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frashadphz%2Ffarfalle","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frashadphz%2Ffarfalle","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frashadphz%2Ffarfalle/lists"}