{"openapi":"3.1.0","info":{"title":"Envision AI Medical Assistant","version":"2.0.0"},"paths":{"/chat/stream":{"post":{"summary":"Stream Chat","description":"Streaming chat endpoint\n\nThis endpoint returns a Server-Sent Events (SSE) stream.\nEach event contains a JSON object with either:\n- {\"text\": \"...\"} for content chunks\n- {\"done\": true} when complete\n- {\"error\": \"...\"} if an error occurs","operationId":"stream_chat_chat_stream_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StreamingChatRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/chat/stream/test":{"get":{"summary":"Test Stream","description":"Test streaming with a simple message","operationId":"test_stream_chat_stream_test_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/":{"get":{"summary":"Health Check","operationId":"health_check__get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/chat":{"post":{"summary":"Chat With Dornn","operationId":"chat_with_dornn_chat_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChatRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChatResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"options":{"summary":"Chat Options","operationId":"chat_options_chat_options","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/feedback":{"post":{"summary":"Feedback","operationId":"feedback_feedback_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChatFeedback"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/previous":{"get":{"summary":"Previous","operationId":"previous_previous_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/delete":{"post":{"summary":"Delete Message","operationId":"delete_message_delete_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeleteConversationRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/search":{"post":{"summary":"Search Documents Debug","description":"Debug endpoint to see what documents are retrieved","operationId":"search_documents_debug_search_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChatRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/generate-title":{"post":{"summary":"Generate Title","operationId":"generate_title_generate_title_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TitleRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/review":{"post":{"summary":"Review","operationId":"review_review_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReviewRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/visit":{"post":{"summary":"Visit","operationId":"visit_visit_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/playbook/progress":{"get":{"summary":"Get Playbook Progress","operationId":"get_playbook_progress_playbook_progress_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]},"put":{"summary":"Put Playbook Progress","operationId":"put_playbook_progress_playbook_progress_put","requestBody":{"content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Payload"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]},"delete":{"summary":"Delete Playbook Progress","operationId":"delete_playbook_progress_playbook_progress_delete","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/active-subscription":{"get":{"summary":"Active Subscription","operationId":"active_subscription_active_subscription_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/create-checkout-session":{"post":{"summary":"Create Checkout Session","operationId":"create_checkout_session_create_checkout_session_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/clerk":{"post":{"summary":"Clerk Webhook","operationId":"clerk_webhook_clerk_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/stripe":{"post":{"summary":"Stripe Webhook","operationId":"stripe_webhook_stripe_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/admin/messages":{"get":{"summary":"Get Messages","operationId":"get_messages_admin_messages_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/admin/usermessages":{"get":{"summary":"Get User Messages","operationId":"get_user_messages_admin_usermessages_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"userId","in":"query","required":true,"schema":{"type":"string","title":"Userid"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/reviews":{"get":{"summary":"Get Reviews","operationId":"get_reviews_admin_reviews_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/admin/playbook-progress":{"get":{"summary":"Get All Playbook Progress","operationId":"get_all_playbook_progress_admin_playbook_progress_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/admin/users":{"get":{"summary":"Get Users","operationId":"get_users_admin_users_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/intelligence/status":{"get":{"summary":"Intelligence Status","description":"Get current status of all Phase 2 intelligence features","operationId":"intelligence_status_intelligence_status_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}}},"components":{"schemas":{"ChatFeedback":{"properties":{"message_id":{"type":"string","title":"Message Id"},"feedback":{"type":"integer","title":"Feedback"}},"type":"object","required":["message_id","feedback"],"title":"ChatFeedback"},"ChatRequest":{"properties":{"question":{"type":"string","title":"Question"},"message_id":{"type":"string","title":"Message Id"},"conversation_id":{"type":"string","title":"Conversation Id"},"user_id":{"type":"string","title":"User Id"}},"type":"object","required":["question","message_id","conversation_id","user_id"],"title":"ChatRequest"},"ChatResponse":{"properties":{"answer":{"type":"string","title":"Answer"},"sources":{"items":{},"type":"array","title":"Sources","default":[]},"message_id":{"type":"string","title":"Message Id"},"message_timestamp":{"type":"number","title":"Message Timestamp"},"video_url":{"type":"string","title":"Video Url","default":""},"video_title":{"type":"string","title":"Video Title","default":""},"document_url":{"type":"string","title":"Document Url","default":""},"document_title":{"type":"string","title":"Document Title","default":""}},"type":"object","required":["answer","message_id","message_timestamp"],"title":"ChatResponse"},"DeleteConversationRequest":{"properties":{"conversation_id":{"type":"string","title":"Conversation Id"}},"type":"object","required":["conversation_id"],"title":"DeleteConversationRequest"},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"ReviewRequest":{"properties":{"rating":{"type":"integer","title":"Rating"},"content":{"type":"string","title":"Content"}},"type":"object","required":["rating","content"],"title":"ReviewRequest"},"StreamingChatRequest":{"properties":{"question":{"type":"string","title":"Question"},"session_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Session Id"},"conversation_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Conversation Id"},"context":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Context"},"prompt":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Prompt"},"system":{"anyOf":[{"items":{"additionalProperties":true,"type":"object"},"type":"array"},{"type":"null"}],"title":"System"},"user_message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"User Message"}},"type":"object","required":["question"],"title":"StreamingChatRequest"},"TitleRequest":{"properties":{"message":{"type":"string","title":"Message"},"user_id":{"type":"string","title":"User Id"},"conversation_id":{"type":"string","title":"Conversation Id"}},"type":"object","required":["message","user_id","conversation_id"],"title":"TitleRequest"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"},"input":{"title":"Input"},"ctx":{"type":"object","title":"Context"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"}},"securitySchemes":{"HTTPBearer":{"type":"http","scheme":"bearer"}}}}