{"id":24983925,"url":"https://github.com/korpog/firstchain","last_synced_at":"2025-03-29T10:15:13.334Z","repository":{"id":273605883,"uuid":"920255301","full_name":"korpog/firstchain","owner":"korpog","description":"REST API using RAG ","archived":false,"fork":false,"pushed_at":"2025-02-03T22:23:21.000Z","size":618,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-02-03T22:24:22.324Z","etag":null,"topics":["fastapi","langchain","openai-api"],"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/korpog.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":"2025-01-21T20:38:19.000Z","updated_at":"2025-02-03T22:23:24.000Z","dependencies_parsed_at":"2025-01-21T22:32:49.208Z","dependency_job_id":"26412643-ad4d-40dc-a437-61515d9c8c37","html_url":"https://github.com/korpog/firstchain","commit_stats":null,"previous_names":["korpog/lovechain","korpog/firstchain"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/korpog%2Ffirstchain","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/korpog%2Ffirstchain/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/korpog%2Ffirstchain/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/korpog%2Ffirstchain/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/korpog","download_url":"https://codeload.github.com/korpog/firstchain/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246168108,"owners_count":20734390,"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","langchain","openai-api"],"created_at":"2025-02-04T09:40:19.766Z","updated_at":"2025-03-29T10:15:13.322Z","avatar_url":"https://github.com/korpog.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"## 1. What is this?\r\nREST API created with FastAPI, OpenAI API and LangChain (for RAG). Ask questions concerning David Hume's *A Treatise of Human Nature*.\r\n\r\nApp performs semantic search on the book and using retrieved context pieces generates answers to your questions.\r\n\r\n## 2. How to run\r\nClone/download this repository and create .env file in project directory. It should look like this\r\n```\r\nENVIRONMENT = \"production\" (or \"development\")\r\nOPENAI_API_KEY=\"your_key\"\r\nMODEL_TEMPERATURE = 0.3\r\nAUTH_SECRET_KEY = \"auth_secret_key\" (use 'openssl rand -hex 32' to generate)\r\nLANGCHAIN_API_KEY=\"your_key\"\r\nLANGCHAIN_TRACING_V2=\"true\"\r\n```\r\n\r\n### 2.1 Without Docker [on Linux]\r\nInstall [uv](https://docs.astral.sh/uv/getting-started/installation/)\r\n\r\nOpen terminal in your project directory and run the following command\r\n\r\n```uv run -- fastapi run src/main.py```\r\n\r\n### 2.2 With Docker\r\nIn your project directory:\r\n\r\n```docker build -t firstchain .```\r\n\r\n```docker run --env-file .env -p 8000:8000 firstchain```\r\n\r\n![API Response](https://github.com/korpog/screens/blob/main/firstchain/hume.png)\r\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkorpog%2Ffirstchain","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkorpog%2Ffirstchain","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkorpog%2Ffirstchain/lists"}