{"id":37640588,"url":"https://github.com/ma2za/docqa-stream","last_synced_at":"2026-01-16T11:17:00.474Z","repository":{"id":190832270,"uuid":"682253370","full_name":"ma2za/docqa-stream","owner":"ma2za","description":"Document QA with FastAPI, Weaviate and Azure OpenAI","archived":false,"fork":false,"pushed_at":"2025-12-21T20:21:17.000Z","size":1880,"stargazers_count":9,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-12-23T08:17:11.640Z","etag":null,"topics":["chatgpt","fastapi","langchain","openai","weaviate"],"latest_commit_sha":null,"homepage":"","language":"Python","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/ma2za.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,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2023-08-23T19:16:30.000Z","updated_at":"2025-12-21T20:21:20.000Z","dependencies_parsed_at":"2023-08-26T16:44:14.762Z","dependency_job_id":null,"html_url":"https://github.com/ma2za/docqa-stream","commit_stats":null,"previous_names":["ma2za/docqa-stream"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/ma2za/docqa-stream","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ma2za%2Fdocqa-stream","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ma2za%2Fdocqa-stream/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ma2za%2Fdocqa-stream/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ma2za%2Fdocqa-stream/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ma2za","download_url":"https://codeload.github.com/ma2za/docqa-stream/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ma2za%2Fdocqa-stream/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28478183,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-16T06:30:42.265Z","status":"ssl_error","status_checked_at":"2026-01-16T06:30:16.248Z","response_time":107,"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":["chatgpt","fastapi","langchain","openai","weaviate"],"created_at":"2026-01-16T11:17:00.416Z","updated_at":"2026-01-16T11:17:00.462Z","avatar_url":"https://github.com/ma2za.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# DocQA Stream with FastAPI, Weaviate and Azure OpenAI\n\nI noticed that there aren't many examples on how to deploy via docker compose\na **FastAPI** application backed by a self-hosted **Weaviate** vector store, so here is one.  \nThe interaction with Azure OpenAI happens through **langchain**.\n\n\u003cimg src=\"https://drive.google.com/uc?export=view\u0026id=1i152Lw1hOJDRKYW5Cb2c7oLqYqlBrQ1_\" width=\"300\"\u003e\n\n## Quickstart\n\nThe API exposes 2 endpoints:\n\n- **/files/upload**: a POST with a .pdf document to store in a weaviate\n  collection.\n\n- **/files/query**: a GET with a question to ask based on the uploaded\n  documents. The response will be streamed back to the user.\n\n### 1) Set the environment\n\nCreate a .env in the project root folder in order to set up the environment variables:\n\n```text\nWEAVIATE_SERVICE_NAME=weaviate\nFASTAPI_PORT=8000\nWEAVIATE_PORT=8080\nWEAVIATE_COLLECTION = Document\nWEAVIATE_DROP_COLLECTION = False\nOPENAI_API_TYPE = azure\nOPENAI_API_VERSION = 2023-07-01-preview\nOPENAI_DEPLOYMENT_NAME=\nOPENAI_API_KEY = \nOPENAI_API_BASE = \n```\n\nIf those ports are not in use then you can leave these variables as\nthey are, you just need to set **OPENAI_API_KEY**, **OPENAI_API_BASE** and\n**OPENAI_DEPLOYMENT_NAME** with the values you can find on the Azure dashboard of your\nAzure Open AI resource deployment.\n\n### 2) Docker compose\n\n```shell\ndocker compose up --build\n```\n\nOnce it is done, you can check if everything is working fine by\nmaking a GET to the following endpoint:\n\n```text\nhttp://localhost:8000/health\n```\n\nIf you get an OK message than you are ready to go. You can go the openAPI\nendpoint and start testing the API:\n\n```text\nhttp://localhost:8000/docs\n```\n\nRun tests:\n\n```shell\ndocker exec fastapi-application poetry run pytest .\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fma2za%2Fdocqa-stream","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fma2za%2Fdocqa-stream","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fma2za%2Fdocqa-stream/lists"}