{"id":13680390,"url":"https://github.com/shadowfax92/Fyin","last_synced_at":"2025-04-29T23:31:22.980Z","repository":{"id":240302801,"uuid":"802260733","full_name":"shadowfax92/Fyin","owner":"shadowfax92","description":"Open source alternative to Perplexity AI with ability to run locally","archived":false,"fork":false,"pushed_at":"2024-10-09T13:41:50.000Z","size":13293,"stargazers_count":200,"open_issues_count":8,"forks_count":16,"subscribers_count":4,"default_branch":"main","last_synced_at":"2025-04-26T02:26:06.866Z","etag":null,"topics":["llm","ollama","openai","rag","rust"],"latest_commit_sha":null,"homepage":"https://fyin.app/","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"agpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/shadowfax92.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-05-17T21:02:47.000Z","updated_at":"2025-04-17T10:24:44.000Z","dependencies_parsed_at":"2024-08-02T13:19:19.809Z","dependency_job_id":"095d4c59-bb14-4e6f-ab9a-8e85d093bacd","html_url":"https://github.com/shadowfax92/Fyin","commit_stats":null,"previous_names":["shadowfax92/fyin.app","shadowfax92/fyin"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shadowfax92%2FFyin","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shadowfax92%2FFyin/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shadowfax92%2FFyin/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shadowfax92%2FFyin/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/shadowfax92","download_url":"https://codeload.github.com/shadowfax92/Fyin/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251600019,"owners_count":21615623,"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":["llm","ollama","openai","rag","rust"],"created_at":"2024-08-02T13:01:16.622Z","updated_at":"2025-04-29T23:31:17.965Z","avatar_url":"https://github.com/shadowfax92.png","language":"Rust","funding_links":[],"categories":["Rust"],"sub_categories":[],"readme":"# fyin\n\u003e Open source alternative to Perplexity AI with ability to run locally. \n\n## Motivation\nThis project aims to build a tool that can be run locally, is open-source, and delivers faster answers, serving as an alternative to Perplexity AI.\n\n## Features\n- [x] Run locally using ollama or use openai API\n- [x] local VectorDB for fast search\n- [x] very quick searching, scraping \u0026 answering due to parallelism \n- [x] Configurable number of search results to parse\n- [x] local scraping of websites\n\n---\n\n## Demo\n\n[![Youtube Demo - Running locally with OpenAI gpt-4o](https://github.com/shadowfax92/fyin-website/blob/78f9785d4905151ac1faafc6ab4bc15076bbdcf0/public/demo.gif)](https://www.youtube.com/watch?v=9tVGcPokgdo)\n\n(You can watch the demo on YouTube too [here](https://www.youtube.com/watch?v=9tVGcPokgdo))\n\n---\n\n## Installation\n\n1. Clone the repository - `git clone https://github.com/shadowfax92/fyin.app`\n2. Get Bing API key or searxng URL or duckduckgo URL\n3. Get OpenAI API key or [Ollama](https://ollama.com/)\n4. Fill/setup the environment variables (see `sample.env` file, copy it to `.fyin.env` and fill the values))\n5. `cargo run --query \"\u003cQuestion\u003e\" -n \u003cnumber of search results\u003e`\n\n\n### Environment Variables\n```\n# Open AI config; Ollama config in comments\n\n# OPENAI_API_KEY=\"ollama\"\nOPENAI_API_KEY=\"your-openai-api-key\"\n\n# OPENAI_BASE_URL=http://localhost:11434/v1\n# Leave blank for default\nOPENAI_BASE_URL=\n\nBING_SUBSCRIPTION_KEY=\"your-bing-subscription-key\"\n# Leave blank for default\nBING_ENDPOINT=\n\n# EMBEDDING_MODEL_NAME=\"llama3\"\nEMBEDDING_MODEL_NAME=\"text-embedding-ada-002\"\n\n# CHAT_MODEL_NAME=\"llama3\"\nCHAT_MODEL_NAME=\"gpt-4o\"\n\n# Search engine config\nSEARCH_ENGINE=\"bing\" # Options: bing, searxng, duckduckgo\nSEARXNG_ENDPOINT=\"your-searxng-endpoint\"\nDUCKDUCKGO_ENDPOINT=\"your-duckduckgo-endpoint\"\n```\n\n### Docker\nHere is how you can run the app using docker:\n1. Build the docker image - `docker build -t fyin .`\n2. Create environment file - `cp sample.env .env` and populate the values\n3. Run the docker container \n\n`docker run --rm --env-file .env fyin --query \"\u003cyour question\u003e\" --search \u003coptional: number of search results to parse\u003e`\n\n## Notes\n- The app use Bing API for searching. You can get from [Active Bing API](https://www.microsoft.com/en-us/bing/apis/bing-web-search-api).\n- You can get OpenAI API key form [OpenAI](https://openai.com/api/).\n- [Ollama](https://www.ollama.com/) setup instructions here.\n\n---\n\n## TODO\n- [ ] Simlar to perplexity.ai, use GPT to figure out 3-5 search queries based on prompt\n  - This should give better results as we are translating human query into search query.\n- [ ] Build a simple website\n- [ ] Hosted version of the app\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshadowfax92%2FFyin","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fshadowfax92%2FFyin","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshadowfax92%2FFyin/lists"}