Refactor backend: modularize query workflow and add local model support#169
Merged
FranardoHuang merged 139 commits intoaugcog:mainfrom Mar 3, 2026
Merged
Refactor backend: modularize query workflow and add local model support#169FranardoHuang merged 139 commits intoaugcog:mainfrom
FranardoHuang merged 139 commits intoaugcog:mainfrom
Conversation
…change embedding function to data base, next step is add speaker name into json file.
…to local_commit
…stem This merge combines: - vLLM OpenAI-compatible API configuration from main (settings-based URLs) - 4-mode system (Chat Tutor, Chat Regular, Voice Tutor, Voice Regular) from final_develop - Composable prompts system from final_develop - Timer/latency tracking from final_develop - OpenAI model integration from final_develop - Dynamic path configuration from main - TTS server configuration from main Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Major changes: - Implement 4-mode system (Chat Tutor, Chat Regular, Voice Tutor, Voice Regular) - Add OpenAI model integration alongside vLLM - Add request timer for latency tracking - Refactor prompts into separate modules (app/prompts/) - Add sentence mapping and batch upload services for RAG - Improve video converter and database utilities - Add web service for RAG file conversion Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
…main Resolved conflicts by accepting incoming changes: - Remove VLLM guided decoding constants (GUIDED_RESPONSE_BLOCKS, GUIDED_VOICE_TUTOR_BLOCKS) - Remove json_output parameter (derived from tutor_mode) - Add dynamic engine initialization - Simplify markdown spacing logic Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
FranardoHuang
approved these changes
Mar 3, 2026
FranardoHuang
added a commit
that referenced
this pull request
Mar 12, 2026
…rt (#169) * rebase and bring all change before 0709 into main * Test commit * deleted Test commit * add condition on video paragraph if less than 5 * fixed video page for now * build a new paeg class * local change push * fix problem for ## empty content * title helper fixed for roar academt * update index helper * finish roar academy * command change * fixing pdf converter * fixing (2) * fix video scraper * fix cs61a added new chunk create * add conversion ignore, change chunk from save pkl file to data base, change embedding function to data base, next step is add speaker name into json file. * changed from pkl to data base and added extra information into db * added Assessment question in video * add assessment question and strict order for all kinds of file * add speaker role into video * create a fix function for problem table * create a fix function for problem table * create a fix function for problem table * fixed url, uuid and relative path in db * backup * add guess speaker function * temp change need to be clean * finalize data base next step is create update db function * add ssplit db for each course and colletive db for all course. * add Cladue code support for file_conversion_router and refector the api.py since it is too large * deleted old useless file, added data base mereger function * change database merger * code refactor fore title handle.py * add validator function for db. * add helper for title handle * update scraper can try multi times * add file_rearangement folder * mvp version of file rearangement * update readme * add middle json * command change * add the pdf bbox and search structure * implemented sentence citation service function * remove test files * add playlist information to metadata * fix scraper and implement conversion accurate reference * finalized new prompt and add file_discription and new key concept * added new json formate and streaming * streaming * restore to origin * back to depoly * json response * enable json * unadd audio * rewrite the prompt * remove unuse file * add new prompt * revert the change * add inline json * new json prompt * json streaming and prompt turning can be better * fuxk * fix * Removed redundant code * fix * Removed redundant code * Restore RAG prompt improvements after removing bad commit This restores the final state of the RAG prompt engineering changes while keeping the commit history clean. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com> * command change * add web service for rag and modify rag_generation prompt * add code block * add code block and muti-level heading * add thinking in the json * remove level info * remove limit * add openai model for testing * add a timer and four mode * prompt fixed * test for both local model and gpt5.2 model * add many debug statments * delete unuse tests * remove some reduntent prompt * feat: 4-mode system, RAG improvements, file conversion enhancements Major changes: - Implement 4-mode system (Chat Tutor, Chat Regular, Voice Tutor, Voice Regular) - Add OpenAI model integration alongside vLLM - Add request timer for latency tracking - Refactor prompts into separate modules (app/prompts/) - Add sentence mapping and batch upload services for RAG - Improve video converter and database utilities - Add web service for RAG file conversion Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> * remove unuse functions * fixed bug between openai format and vllm format. * remove example in prompt * remove the load local env function * refactor prompt * sync text tutor prompt source with approved export wording * refactor regular text prompt to template-based addendums * structure the prompt * remove unuse code * remove unuse code * import error * add citation show in frontend * add citation show in frontend * add citation show in frontend * add prompt * refactor and update openai prompt * add file description * temp * add purpose to outline * add local model to tutor mode Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * remove .claude/settings.json and add .claude/ to .gitignore Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> --------- Co-authored-by: Franco <francohuang945@gmail.com> Co-authored-by: Claude Sonnet 4.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
rag_generation.py,rag_retriever.py,rag_preprocess.py, andchat_service.pyinto modular packages underservices/generation/,services/query/,services/memory/, andservices/audio/openai_model.pydependency and tutor pipeline supportapp/prompts/toservices/generation/prompts/with structured textchat/voice modules, including canvas and outline promptsTest plan
🤖 Generated with Claude Code