Spaces:
Runtime error
Runtime error
Commit History
-
Fix syntax error in JSON error handler and ensure error details are escaped safely
Verified signatureCorrect a syntax error in the exception handling of finalize_and_doc() that produced invalid Python code in the f-string. The code now uses json.dumps to build a proper JSON error response, eliminating the unexpected character after the line continuation character.901e364 -
Switch to Docker SDK to fix build error due to missing libgl1-mesa-glx
Verified signatureSwitch the Space to use the Docker SDK by adding a Dockerfile that installs required system packages (git, ffmpeg, libgl dependencies, etc.) and sets up Python and our app. This bypasses the default apt-get command which fails to install libgl1-mesa-glx on the Trixie base image. Added packages.txt with libgl1, libglx-mesa0 and libglib2.0-0 for completeness. Updated README.md's YAML front matter to set sdk: docker. These changes should resolve the build error and allow our app with JSON-based outlines to run.62bf7f1 -
Use JSON schema for course outline; implement structured plan generation; add schema file; update planner to produce JSON; update app to write JSON and doc attachments; update requirements and searcher for PDF extraction and unify dependencies.
Verified signatureThis update introduces a JSON schema for course outlines and modifies the planner and app to generate structured course plans that follow this schema. A new file 'course_outline_schema.json' defines the outline structure. The planner now reads this schema and instructs the LLM to output valid JSON matching it. The finalize function writes the JSON outline and a Word document to attachments. Searcher gains PDF extraction support and requirements.txt is updated to include PyPDF2 and unify dependencies.06825b1
-
Fallback to prior conversation topic when search query is generic
Verified signatureIf the extracted search query is empty or appears generic (such as 'the internet' or 'articles'), the assistant now looks back through the conversation history for the most recent non-search user message and uses that as the query. This preserves context (e.g., using 'Gen AI for data science' instead of leaving the query blank) and yields relevant resources. The update supplements previous query-cleaning and domain-filtering logic.dd22541 -
Improve search query extraction and domain filtering; unify requirements and enable PDF extraction
Verified signatureThis update refines the agent's web search pipeline: it extracts queries more intelligently by stripping trigger phrases and optional counts, selecting quoted or topic phrases after 'about' or 'on', and discarding trailing instructions. It passes a list of allowed domains (e.g. .edu, .org, .gov, arxiv.org, kdnuggets.com, towardsdatascience.com, datacamp.com, medium.com) to the search API to prioritise reputable sources. The requirements file has been cleaned to remove duplicate youtube-transcript-api lines and includes dependencies needed for PDF extraction (PyPDF2). These improvements help preserve conversation context, avoid hallucinations, and support reading online PDFs.f2c945e -
Save generated files to sessions; attachments feature
Verified signatureImplement persistent attachments for course creator: update db.py to include attachments table and add helpers (add_attachment, list_attachments). Modify app.py to import new helpers, add attachments output component, and update session loading and finalize/generate functions to store generated documents and zip packages in the database and update attachments display. Now each chat session lists its saved files and caches resources.d33d74b -
Refactor session picker to radio with label and value pairs; fix rename and delete reliability.
Verified signatureSwitch the session picker back to a Radio component using (label, value) pairs. Each entry shows the chat title and part of its key, but the radio's value is the full key. refresh_sessions builds these pairs and selects the active key. load_session now directly receives the selected key. This ensures that renaming a chat updates the sidebar correctly and deleting a chat switches to the next one without issues.a9d92ec -
Fix session sidebar: display chat titles with key snippet; parse selection to obtain chat key; improve rename and delete operations to work reliably.
Verified signatureThis commit updates app.py to fix session sidebar functionality. It changes refresh_sessions() to display chat titles along with a short key snippet and selects the current session correctly. It also changes load_session() to extract the chat key from the selected radio choice and load messages properly. These changes ensure that renaming a session updates the sidebar labels correctly and deleting a session does not break the UI. No changes to other files.67e0a60 -
Upload app.py
Verified signatured8d53d9 -
Upload 5 files
Verified signatureImplement persistent chat sessions and Word document output: add session sidebar and chat management via DB, generate docx on finalize; update search caching and UI.8812eb7 -
Add python-docx dependency for Word document generation
Verified signatureb5b62e6 -
Add requests and beautifulsoup4 dependencies to fix missing modules for web scraping and summarization
Verified signatureAdd dependencies required for scraping and summarizing web pages to fix search errors.15f2125 -
Implement grounded web search and summarization with caching; integrate DB helpers
Verified signatureThis commit updates app.py to perform real web searches using Tavily, fetch and extract article content, summarise each article via OpenAI, and cache results. It integrates db.py for resource caching, adds improved search pipeline in the chat function, and refactors the conversation to avoid hallucinated resources. Also uploads updated searcher.py and db.py.813f3c0 -
Upload app.py
Verified signatureImprove chat UI and implement search result caching. This commit fixes the chat display by switching to the default Gradio Chatbot (tuple-based) with a fixed height and returning chat pairs so conversations are visible. It also introduces a per-session resource cache to store web search results keyed by the query, preventing repeated searches and ensuring all resources shown come from real results. When searching, previously seen URLs are filtered out before adding to sources. State management now includes the resource cache alongside chat history, pairs, sources, and plan.a24abb9 -
Upload 3 files
Verified signatureAdd webpage and YouTube content extraction and summarization. This commit enhances the course creator agent to read and analyze external links directly in chat. It updates searcher.py to include extract_web_content (via Tavily extract API) and get_youtube_transcript (using youtube-transcript-api), while preserving run_web_search. In app.py, the assistant detects URLs in user messages, fetches page content or video transcripts, and summarises them with OpenAI before replying. Requirements are updated to include youtube-transcript-api. The assistant can now open webpages and YouTube videos, summarise the content, and use it for brainstorming.617daa2 -
Normalize web search results and handle Tavily results dict; ensure search uses TAVILY_API_KEY
Verified signaturea977462 -
Remove search query and domain filter fields; trigger web searches from chat.
Verified signature7fca00d
-
Add automatic web search: detect search keywords in user messages, perform internet search, and return summarized results.
Verified signatureb52cc70 -
Upload 2 files
Verified signatureChange default model to gpt-3.5-turbo for compatibility with pinned OpenAI SDK (<1.0)d5d1317 -
change temp from 0.7 to 1
Verified signature95b6e72 -
Upload 2 files
Verified signatureFix ChatCompletion call: use correct 'temperature' and 'max_tokens' parameters for legacy OpenAI SDK; update planner.py accordingly1c4804c -
change temp from 0.7 to 1
Verified signature8944956 -
change max_tokens with max_completion_tokens
Verified signature57b822b -
Pin openai version to <1.0.0 to restore max_tokens support
Verified signature905ffee -
Fix chat interface (return message dictionaries for Gradio Chatbot) and add fallback to COURSECREATOR_API_KEY for OpenAI API key retrieval.
Verified signature9047f8a -
Handle missing API keys in app.py: add try/except around OpenAI, search, planner, and generator calls to display helpful error messages.
Verified signature9098a8c -
Fix Gradio runtime error by switching Chatbot to messages format and removing faulty event chaining; improve chat interface.
Verified signature33f1631 -
Upload app.py
Verified signature05871ef -
Upload 2 files
Verified signature28abf63 -
Upload 7 files
Verified signaturefirst attempt of uploadingd50fc97 -
initial commit
Verified signature6faeb4e