Skip to content

Conversation

@Iansabia
Copy link

@Iansabia Iansabia commented Feb 9, 2026

Summary

  • Adds a Lecture Notes webhook plugin (plugins/lecture-notes/) — a standalone FastAPI service that transforms recorded lectures into structured academic notes
  • Adds a Study Companion prompt-based plugin to community-plugins.json — an interactive study buddy that generates flashcard-style Q&A pairs and quizzes users via chat
  • Students are a core Omi demographic — this gives them both passive note extraction and active recall study tools

Relationship to Existing class-notes Plugin

The existing class-notes plugin is prompt-only with memories capability and a basic 4-section outline format. This PR adds two complementary tools that don't overlap:

class-notes (existing) lecture-notes (this PR) study-companion (this PR)
Type Prompt-based Webhook FastAPI service Prompt-based
Capabilities memories webhook integration memories + chat
Output Generic outline, facts, homework, other Structured key concepts w/ definitions, topics, summary, questions, action items, study tips Flashcard Q&A pairs, practice questions, concept connections
Academic detection None (runs on everything) Heuristic NLP pre-filter (keyword density, speaker asymmetry, duration) None
Chat companion No No Yes — quizzes users using active recall

class-notes = passive outline. lecture-notes = smart webhook with structured extraction. study-companion = interactive chat that tests you on the material.

How the Webhook Plugin Works

Two-stage pipeline that avoids wasting API tokens on casual conversations:

  1. Heuristic pre-filter — Scores conversations using keyword density (60+ academic terms), speaker asymmetry (lectures have one dominant speaker), duration, and Omi's own category classification. Casual conversations are filtered out before any LLM call.
  2. Structured LLM extraction — GPT-4o with with_structured_output extracts key concepts with definitions, topics covered, summary, questions to explore, action items (homework/readings), and study tips.

Files Changed

File Description
plugins/lecture-notes/main.py FastAPI service — models, heuristic scoring, LLM extraction, formatting
plugins/lecture-notes/requirements.txt Dependencies (fastapi, langchain-openai, tiktoken)
plugins/lecture-notes/.env.template Environment variable template
plugins/lecture-notes/Dockerfile Docker deployment
plugins/lecture-notes/README.md Setup, example output, test payload, deployment guide
community-plugins.json Study Companion prompt-based plugin entry

Test Plan

  • Syntax validation: python -c "import py_compile; py_compile.compile('plugins/lecture-notes/main.py')"
  • Black formatting: black --check --line-length 120 --skip-string-normalization plugins/lecture-notes/main.py
  • JSON validation: python -c "import json; json.load(open('community-plugins.json'))"
  • 23 automated tests with FastAPI TestClient — endpoints, heuristic scoring, formatting, edge cases (discarded, empty, casual, extra Omi payload fields)
  • Test payload included in README — curl command to POST a sample OS lecture transcript

Example Webhook Output

LECTURE NOTES | Operating Systems

Summary
Introduction to process scheduling, covering the key algorithms
used to manage CPU time allocation among competing processes.

Key Concepts
  - Process: A program in execution with its own address space and resources
  - Context Switch: Saving and restoring process state when switching CPU allocation
  - Round Robin: Scheduling algorithm assigning equal time slices in circular order

Topics Covered
  - Process lifecycle and states
  - CPU scheduling algorithms (FCFS, SJF, Round Robin, Priority)
  - Preemptive vs non-preemptive scheduling

Action Items
  - Read Chapter 5 of Silberschatz
  - Complete Problem Set 3 by Friday

Study Tips
  - Draw state diagrams for each scheduling algorithm with numeric examples
  - Practice Gantt chart problems for exam prep

Standalone webhook plugin that transforms recorded lectures and study
sessions into structured academic notes. Uses a two-stage pipeline:
heuristic pre-filter (keyword density, speaker asymmetry, duration) to
skip non-academic conversations, then GPT-4o with structured output to
extract key concepts, topics, summaries, action items, and study tips.
Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request introduces a new 'Lecture Notes' plugin, both as a standalone FastAPI service and a prompt-based version. The implementation is well-structured, with clear data models, a heuristic pre-filter to save costs, and structured LLM extraction. The accompanying documentation, Dockerfile, and configuration files are comprehensive.

My review focuses on improving the robustness and performance of the FastAPI service. I've identified a critical issue where malformed input could crash the server and a high-priority performance issue related to blocking I/O calls. Addressing these will make the plugin more resilient and scalable.

Prompt-based study buddy that extracts flashcard-style Q&A pairs and
practice questions from recorded lectures, and quizzes users via chat
using active recall principles. Complements the existing class-notes
plugin by focusing on interactive study rather than passive note output.
Includes setup guide, example output, curl test payload for reviewers,
deployment instructions (Render, Docker, Railway), and API reference.
@Iansabia Iansabia force-pushed the feat/lecture-notes-plugin branch from 9742e49 to 5b07225 Compare February 9, 2026 23:41
…rsing

- Wrap speaker_id parsing in try/except for malformed input (IndexError, ValueError)
- Convert lecture_notes_endpoint to async def
- Use ainvoke() instead of blocking invoke() for LLM call
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant