Skip to content

Conversation

@sahilds1
Copy link
Collaborator

@sahilds1 sahilds1 commented Aug 18, 2025

This PR enables the chatbot to search bipolar research docs per #345

This PR removed the previous server-backed, multi-conversation flow and on-page DOM extraction from the Chat component, along with associated state, functions, and UI for listing/selecting conversations

This PR added a new Assistant API (views + URL) that uses the OpenAI Responses API with function-calling, semantic document search, iterative reasoning, and cost/token tracking and added sendAssistantMessage() and rewrote Chat.tsx to persist conversations in sessionStorage, manage currentMessages/currentResponseId, and call the assistant endpoint.

@sahilds1 sahilds1 self-assigned this Aug 18, 2025
@sahilds1 sahilds1 changed the title [WIP][#345] Add RAG to the Chatbot [WIP][#345] Enable chatbot to search bipolar research docs Aug 19, 2025
…tance

- Replace conversation-based chat system with direct assistant API calls
- Remove ConversationList component and related conversation state management
- Switch from continueConversation to sendAssistantMessage API endpoint
- Track current messages and response IDs instead of full conversations
- Remove conversation creation, deletion, and title updating functionality
- Simplify UI by removing conversation list toggle and management buttons
- Update welcome message to focus on document-based Q&A instead of bipolar treatment
- Maintain backward compatibility by keeping Conversation interface export
- Remove DOM content extraction and page content tracking
- Streamline message handling with direct assistant responses
@sahilds1 sahilds1 requested a review from taichan03 August 21, 2025 19:19
@sahilds1 sahilds1 marked this pull request as ready for review August 21, 2025 19:42
@sahilds1 sahilds1 changed the title [WIP][#345] Enable chatbot to search bipolar research docs [#345] Enable chatbot to search bipolar research docs Aug 21, 2025
@sahilds1 sahilds1 requested a review from StubberG3 August 27, 2025 20:28
@taichan03 taichan03 merged commit e6a9a3f into CodeForPhilly:listOfMed Sep 3, 2025
1 check passed
MODEL_DEFAULTS = {
"instructions": INSTRUCTIONS,
"model": "gpt-5-nano", # 400,000 token context window
"reasoning": {"effort": "low", "summary": "auto"},
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

GPT-5, GPT-5 mini Access:

Models: All API users on tiers 1 through 5, with some subject to organization verification

Streaming: All API users on tiers 1 through 5, subject to organization verification

Reasoning Summaries (Responses API only): All API users on tiers 1 through 5, subject to organization verification

Endpoints: Responses API and Chat Completions API

https://help.openai.com/en/articles/10362446-api-model-availability-by-usage-tier-and-verification-status

https://help.openai.com/en/articles/10910291-api-organization-verification

@themightychris themightychris mentioned this pull request Nov 16, 2025
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.

2 participants