{"id":51073685,"url":"https://github.com/jhiltonsantos/speech-code-api","last_synced_at":"2026-06-23T12:33:37.887Z","repository":{"id":366444859,"uuid":"1276282718","full_name":"jhiltonsantos/speech-code-api","owner":"jhiltonsantos","description":"Backend FastAPI do SpeechCode. RAG com LangChain, ChromaDB e Modelo de IA para estudos","archived":false,"fork":false,"pushed_at":"2026-06-21T20:42:15.000Z","size":8,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-06-21T22:13:54.623Z","etag":null,"topics":["fastapi","langchain","python","rag"],"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/jhiltonsantos.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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-06-21T19:24:14.000Z","updated_at":"2026-06-21T20:42:19.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/jhiltonsantos/speech-code-api","commit_stats":null,"previous_names":["jhiltonsantos/speech-code-api"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/jhiltonsantos/speech-code-api","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jhiltonsantos%2Fspeech-code-api","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jhiltonsantos%2Fspeech-code-api/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jhiltonsantos%2Fspeech-code-api/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jhiltonsantos%2Fspeech-code-api/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jhiltonsantos","download_url":"https://codeload.github.com/jhiltonsantos/speech-code-api/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jhiltonsantos%2Fspeech-code-api/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34688154,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-23T02:00:07.161Z","response_time":65,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["fastapi","langchain","python","rag"],"created_at":"2026-06-23T12:33:37.204Z","updated_at":"2026-06-23T12:33:37.880Z","avatar_url":"https://github.com/jhiltonsantos.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# SpeechCode API\n\nBackend FastAPI do assistente de estudos **SpeechCode** — RAG local para Programação e Inglês.\n\n## Pré-requisitos\n\n- Python 3.10+ (3.11+ recomendado)\n- [Ollama](https://ollama.com/download) rodando na bandeja do sistema\n- Modelos baixados: `llama3` e `nomic-embed-text`\n- Ambiente virtual em `.venv/` (já criado neste diretório)\n\n```shell\nollama pull llama3\nollama pull nomic-embed-text\n```\n\n## Como rodar\n\n```shell\ncd speech-code-api\n.\\.venv\\Scripts\\Activate.ps1\npip install -r requirements.txt\nuvicorn main:app --reload --host 127.0.0.1 --port 8000\n```\n\nDocumentação interativa: [http://127.0.0.1:8000/docs](http://127.0.0.1:8000/docs)\n\n## Estrutura (Fase 2)\n\n```\nspeech-code-api/\n├── main.py                 # Bootstrap: create_app()\n├── app/\n│   ├── factory.py          # FastAPI + CORS + routers\n│   ├── config.py           # Ollama, ChromaDB, paths\n│   ├── dependencies.py     # Singletons LangChain\n│   ├── routers/            # health, upload, ask\n│   ├── services/           # pdf, ingest, rag\n│   └── prompts/            # system prompt do tutor\n├── chroma_data/            # persistência ChromaDB (gitignored)\n└── tmp_uploads/            # PDFs temporários (gitignored)\n```\n\n## Endpoints\n\n| Método | Rota | Descrição |\n|--------|------|-----------|\n| GET | `/health` | Health check |\n| POST | `/upload` | Ingestão de PDF → ChromaDB via LangChain |\n| POST | `/ask` | Pergunta com retrieval + `llama3` via Ollama |\n\n### Respostas\n\n**POST /upload** (sucesso):\n\n```json\n{\n  \"message\": \"PDF indexado com sucesso.\",\n  \"filename\": \"guia-python.pdf\",\n  \"chunks_indexed\": 42\n}\n```\n\n**POST /ask** (sucesso):\n\n```json\n{\n  \"answer\": \"Resposta contextual gerada pelo tutor...\"\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjhiltonsantos%2Fspeech-code-api","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjhiltonsantos%2Fspeech-code-api","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjhiltonsantos%2Fspeech-code-api/lists"}