{"info":{"_postman_id":"9ae75db5-3c92-48e3-b9e2-ab4e66ff4824","name":"FlaimBrain","schema":"https://schema.getpostman.com/json/collection/v2.0.0/collection.json","toc":[],"description":"<html><head></head><body></body></html>","owner":"16996416","collectionId":"9ae75db5-3c92-48e3-b9e2-ab4e66ff4824","publishedId":"2s9YR6ZYu6","public":true,"customColor":{"top-bar":"FFFFFF","right-sidebar":"303030","highlight":"FF6C37"},"publishDate":"2023-10-15T13:38:39.000Z"},"item":[{"name":"Auth","item":[{"name":"login","id":"b6818851-58a2-40b5-9c0f-ef733ecd7666","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n    \"username\": \"a\",\n    \"password\": \"a\"\n}","options":{"raw":{"language":"json"}}},"url":"http://127.0.0.1:5000/auth/login","description":"<p>This is the login endpoint. Takes in a username and password.</p>\n","urlObject":{"protocol":"http","port":"5000","path":["auth","login"],"host":["127","0","0","1"],"query":[],"variable":[]}},"response":[{"id":"da4e350e-9a07-4d84-b549-f75e8547b8b7","name":"New Request","originalRequest":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n    \"username\": \"a\",\n    \"password\": \"a\"\n}","options":{"raw":{"language":"json"}}},"url":"http://127.0.0.1:5000/auth/login"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Server","value":"Werkzeug/3.0.0 Python/3.11.1"},{"key":"Date","value":"Sat, 14 Oct 2023 14:28:05 GMT"},{"key":"Content-Type","value":"application/json"},{"key":"Content-Length","value":"306"},{"key":"Access-Control-Allow-Origin","value":"http://localhost:3000"},{"key":"Connection","value":"close"}],"cookie":[],"responseTime":null,"body":"{\n    \"access_token\": \"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJmcmVzaCI6ZmFsc2UsImlhdCI6MTY5NzI5MzY4NSwianRpIjoiNDFlOTA0YjktZTJiYy00MGI1LWJiYzAtMWRkMThhMWJhMGY4IiwidHlwZSI6ImFjY2VzcyIsInN1YiI6eyJ1c2VybmFtZSI6ImEifSwibmJmIjoxNjk3MjkzNjg1LCJleHAiOjE2OTcyOTcyODV9.ObwvWMse7E5ufG3cx739a4bPxcmmW8202lpuJfuaoAQ\"\n}"}],"_postman_id":"b6818851-58a2-40b5-9c0f-ef733ecd7666"},{"name":"register","id":"26015690-5896-412e-ad9e-4439e4060f67","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n    \"username\": \"b\",\n    \"password\": \"b\"\n}","options":{"raw":{"language":"json"}}},"url":"http://127.0.0.1:5000/auth/register","description":"<p>This is the register endpoint. Takes in a username and password.</p>\n","urlObject":{"protocol":"http","port":"5000","path":["auth","register"],"host":["127","0","0","1"],"query":[],"variable":[]}},"response":[{"id":"4b8af8cf-69a1-4281-92cc-191059510518","name":"New Request","originalRequest":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n    \"username\": \"b\",\n    \"password\": \"b\"\n}","options":{"raw":{"language":"json"}}},"url":"http://127.0.0.1:5000/auth/register"},"status":"CREATED","code":201,"_postman_previewlanguage":"json","header":[{"key":"Server","value":"Werkzeug/3.0.0 Python/3.11.1"},{"key":"Date","value":"Sat, 14 Oct 2023 15:38:41 GMT"},{"key":"Content-Type","value":"application/json"},{"key":"Content-Length","value":"48"},{"key":"Access-Control-Allow-Origin","value":"http://localhost:3000"},{"key":"Connection","value":"close"}],"cookie":[],"responseTime":null,"body":"{\n    \"message\": \"User registered successfully\"\n}"}],"_postman_id":"26015690-5896-412e-ad9e-4439e4060f67"}],"id":"96d39d54-fb84-4b41-8cfe-0e45c9f880b6","_postman_id":"96d39d54-fb84-4b41-8cfe-0e45c9f880b6","description":""},{"name":"Documents","item":[{"name":"create","id":"f93770f2-a7c8-49da-9ea5-471f0bdf2efd","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"<token>"}]},"isInherited":false},"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n  \"userId\": \"12345abcd.txt\",\n  \"name\": \"Sample Document\",\n  \"type\": \"document\",\n  \"parentId\": \"652a9fadcb6e6c4cdfd6838e\",\n  \"content\": \"This is the content of the sample document.\"\n}\n","options":{"raw":{"language":"json"}}},"url":"http://127.0.0.1:5000/documents/create","description":"<p>This endpoint creates a document in the mongoDB database. This endpoint also creates an embedding of the document and stores in a Chroma vector database.</p>\n","urlObject":{"protocol":"http","port":"5000","path":["documents","create"],"host":["127","0","0","1"],"query":[],"variable":[]}},"response":[{"id":"03eb41a5-cad2-4c88-b4a1-871f93b16658","name":"New Request","originalRequest":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n  \"userId\": \"12345abcd.txt\",\n  \"name\": \"Sample Document\",\n  \"type\": \"document\",\n  \"parentId\": \"652a9fadcb6e6c4cdfd6838e\",\n  \"content\": \"This is the content of the sample document.\"\n}\n","options":{"raw":{"language":"json"}}},"url":"http://127.0.0.1:5000/documents/create"},"status":"CREATED","code":201,"_postman_previewlanguage":"json","header":[{"key":"Server","value":"Werkzeug/3.0.0 Python/3.11.1"},{"key":"Date","value":"Sat, 14 Oct 2023 15:47:21 GMT"},{"key":"Content-Type","value":"application/json"},{"key":"Content-Length","value":"72"},{"key":"Access-Control-Allow-Origin","value":"http://localhost:3000"},{"key":"Connection","value":"close"}],"cookie":[],"responseTime":null,"body":"{\n    \"id\": \"652ab8097a7fdc8d8e5f9440\",\n    \"message\": \"Document created\"\n}"}],"_postman_id":"f93770f2-a7c8-49da-9ea5-471f0bdf2efd"},{"name":"delete","id":"47d1d8c7-ed0c-4ff1-9843-7d0f6bf42680","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"<token>"}]},"isInherited":false},"method":"DELETE","header":[],"body":{"mode":"raw","raw":"","options":{"raw":{"language":"json"}}},"url":"http://127.0.0.1:5000/documents/delete/<doc_id>","description":"<p>This endpoint deletes the doc with id doc_id from the mongoDB database.</p>\n","urlObject":{"protocol":"http","port":"5000","path":["documents","delete","<doc_id>"],"host":["127","0","0","1"],"query":[],"variable":[]}},"response":[{"id":"ccc71e31-c479-43de-b218-fb88f6ab3aaf","name":"New Request","originalRequest":{"method":"DELETE","header":[],"body":{"mode":"raw","raw":"","options":{"raw":{"language":"json"}}},"url":"http://127.0.0.1:5000/documents/delete/652ab8097a7fdc8d8e5f9440"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Server","value":"Werkzeug/3.0.0 Python/3.11.1"},{"key":"Date","value":"Sat, 14 Oct 2023 15:52:18 GMT"},{"key":"Content-Type","value":"application/json"},{"key":"Content-Length","value":"36"},{"key":"Access-Control-Allow-Origin","value":"http://localhost:3000"},{"key":"Connection","value":"close"}],"cookie":[],"responseTime":null,"body":"{\n    \"message\": \"Document deleted\"\n}"}],"_postman_id":"47d1d8c7-ed0c-4ff1-9843-7d0f6bf42680"}],"id":"1afa0fbc-5624-407b-98d5-7b294d64dc1e","_postman_id":"1afa0fbc-5624-407b-98d5-7b294d64dc1e","description":""},{"name":"Ocr Vision","item":[{"name":"New Request","id":"6a1cf51e-f3e0-4f22-90d3-e6bf782bdcbf","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"<token>"}]},"isInherited":false},"method":"POST","header":[],"body":{"mode":"raw","raw":""},"url":"http://127.0.0.1:5000/ocr/ocr","description":"<p>Recieves an image, preforms ocr, then returns the text on the image.</p>\n","urlObject":{"protocol":"http","port":"5000","path":["ocr","ocr"],"host":["127","0","0","1"],"query":[],"variable":[]}},"response":[],"_postman_id":"6a1cf51e-f3e0-4f22-90d3-e6bf782bdcbf"}],"id":"1213be78-de4a-49f2-a5bd-b0f717020215","_postman_id":"1213be78-de4a-49f2-a5bd-b0f717020215","description":""},{"name":"Chat","item":[{"name":"get-response","id":"5d878726-40a4-477a-9f7a-66293050e432","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"<token>"}]},"isInherited":false},"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n  \"query\": \"What is a Quasixenon\"\n}\n","options":{"raw":{"language":"json"}}},"url":"http://127.0.0.1:5000/chat/get-response","description":"<p>This sends a query to the Chroma vector database to answer the prompt.</p>\n","urlObject":{"protocol":"http","port":"5000","path":["chat","get-response"],"host":["127","0","0","1"],"query":[],"variable":[]}},"response":[{"id":"1f1931d8-d030-4f72-9e08-f3eaf81013d3","name":"New Request","originalRequest":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n  \"query\": \"What is a Quasixenon\"\n}\n","options":{"raw":{"language":"json"}}},"url":"http://127.0.0.1:5000/chat/get-response"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Server","value":"Werkzeug/3.0.0 Python/3.11.1"},{"key":"Date","value":"Sun, 15 Oct 2023 02:02:20 GMT"},{"key":"Content-Type","value":"application/json"},{"key":"Content-Length","value":"336"},{"key":"Access-Control-Allow-Origin","value":"http://localhost:3000"},{"key":"Connection","value":"close"}],"cookie":[],"responseTime":null,"body":"{\n    \"response\": \"Quasixenon is a new element that was discovered in the year 2023. It bears the symbol Qx and has an atomic number of 139. Quasixenon is unique because it has the ability to exist in a quasi-state between a noble gas and a halogen. It was uncovered by a team of researchers at the PseudoElemental Research Institute.\"\n}"}],"_postman_id":"5d878726-40a4-477a-9f7a-66293050e432"},{"name":"clear-memory","id":"c42ec26a-75d5-428a-b2ac-f8b634f2c5a0","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"<token>"}]},"isInherited":false},"method":"POST","header":[{"key":"Content-Type","value":"application/json","type":"text"}],"body":{"mode":"raw","raw":""},"url":"http://127.0.0.1:5000/chat/clear-memory","description":"<p>This endpoint clears the ConversationalBufferMemory used with Langchain. To see the other one that clears the text from the database, refer to /chatHistory/delete-conversation/</p>\n","urlObject":{"protocol":"http","port":"5000","path":["chat","clear-memory"],"host":["127","0","0","1"],"query":[],"variable":[]}},"response":[],"_postman_id":"c42ec26a-75d5-428a-b2ac-f8b634f2c5a0"}],"id":"8e3e1a0d-f6a0-480d-a476-e7b2f606b083","_postman_id":"8e3e1a0d-f6a0-480d-a476-e7b2f606b083","description":""},{"name":"Chat History","item":[{"name":"save-message","id":"2121cb4e-aea1-4813-84ad-c6931a301213","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"<token>"}]},"isInherited":false},"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n  \"userId\": \"652b782ea689121389640eda\",\n  \"content\": \"What is Qx\",\n  \"documentName\": \"sampleOopen.txt\",\n  \"createdAt\": \"2023-10-15T05:27:10.804+00:00\"\n}\n","options":{"raw":{"language":"json"}}},"url":"http://127.0.0.1:5000/chatHistory/save-message","description":"<p>Saves a message to chat history</p>\n","urlObject":{"protocol":"http","port":"5000","path":["chatHistory","save-message"],"host":["127","0","0","1"],"query":[],"variable":[]}},"response":[{"id":"3a39638c-2a0b-4113-a26b-c578bfbe9131","name":"save-message","originalRequest":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n  \"userId\": \"652b782ea689121389640eda\",\n  \"content\": \"What is Qx\",\n  \"documentName\": \"sampleOopen.txt\",\n  \"createdAt\": \"2023-10-15T05:27:10.804+00:00\"\n}\n","options":{"raw":{"language":"json"}}},"url":"http://127.0.0.1:5000/chatHistory/save-message"},"status":"CREATED","code":201,"_postman_previewlanguage":"json","header":[{"key":"Server","value":"Werkzeug/3.0.0 Python/3.11.1"},{"key":"Date","value":"Sun, 15 Oct 2023 05:38:16 GMT"},{"key":"Content-Type","value":"application/json"},{"key":"Content-Length","value":"46"},{"key":"Access-Control-Allow-Origin","value":"http://localhost:3000"},{"key":"Connection","value":"close"}],"cookie":[],"responseTime":null,"body":"{\n    \"message\": \"Message saved successfully\"\n}"}],"_postman_id":"2121cb4e-aea1-4813-84ad-c6931a301213"},{"name":"get-chat-history","id":"81639401-88cd-4100-8b90-7a594ca2c348","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"<token>"}]},"isInherited":false},"method":"GET","header":[],"body":{"mode":"raw","raw":"","options":{"raw":{"language":"json"}}},"url":"http://127.0.0.1:5000/chatHistory/get-chat-history/sampleOpen.txt","description":"<p>Gets the chat history given a file name.</p>\n","urlObject":{"protocol":"http","port":"5000","path":["chatHistory","get-chat-history","sampleOpen.txt"],"host":["127","0","0","1"],"query":[],"variable":[]}},"response":[{"id":"fc0ea0dd-0268-4225-823c-01ed5e9daa8c","name":"New Request","originalRequest":{"method":"GET","header":[],"body":{"mode":"raw","raw":"","options":{"raw":{"language":"json"}}},"url":"http://127.0.0.1:5000/chatHistory/get-chat-history/<string:document_name>"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Server","value":"Werkzeug/3.0.0 Python/3.11.1"},{"key":"Date","value":"Sun, 15 Oct 2023 05:42:58 GMT"},{"key":"Content-Type","value":"application/json"},{"key":"Content-Length","value":"1559"},{"key":"Access-Control-Allow-Origin","value":"http://localhost:3000"},{"key":"Connection","value":"close"}],"cookie":[],"responseTime":null,"body":"[\n    {\n        \"_id\": \"652b782ea689121389640eda\",\n        \"content\": \"What is Qx\",\n        \"createdAt\": \"Sun, 15 Oct 2023 05:27:10 GMT\",\n        \"documentName\": \"sampleOpen.txt\",\n        \"user_id\": {\n            \"username\": \"a\"\n        }\n    },\n    {\n        \"_id\": \"652b7834a689121389640edc\",\n        \"content\": \"Qx is the symbol for the element Quasixenon. This element was identified in 2023 by a team of researchers at the PseudoElemental Research Institute. It is unique because it can exist in a quasi-state between a noble gas and a halogen. Quasixenon has an atomic number of 139.\",\n        \"createdAt\": \"Sun, 15 Oct 2023 05:27:16 GMT\",\n        \"documentName\": \"sampleOpen.txt\",\n        \"user_id\": {\n            \"username\": \"a\"\n        }\n    },\n    {\n        \"_id\": \"652b7ad48f4f255d7b15e30a\",\n        \"content\": \"hi\",\n        \"createdAt\": \"Sun, 15 Oct 2023 05:38:28 GMT\",\n        \"documentName\": \"sampleOpen.txt\",\n        \"user_id\": {\n            \"username\": \"a\"\n        }\n    },\n    {\n        \"_id\": \"652b7ad58f4f255d7b15e30c\",\n        \"content\": \"Hello! How can I assist you today?\",\n        \"createdAt\": \"Sun, 15 Oct 2023 05:38:29 GMT\",\n        \"documentName\": \"sampleOpen.txt\",\n        \"user_id\": {\n            \"username\": \"a\"\n        }\n    },\n    {\n        \"_id\": \"652b7b748f4f255d7b15e30e\",\n        \"content\": \"hi\",\n        \"createdAt\": \"Sun, 15 Oct 2023 05:41:08 GMT\",\n        \"documentName\": \"sampleOpen.txt\",\n        \"user_id\": {\n            \"username\": \"a\"\n        }\n    },\n    {\n        \"_id\": \"652b7b758f4f255d7b15e310\",\n        \"content\": \"Hello! How can I assist you today?\",\n        \"createdAt\": \"Sun, 15 Oct 2023 05:41:09 GMT\",\n        \"documentName\": \"sampleOpen.txt\",\n        \"user_id\": {\n            \"username\": \"a\"\n        }\n    }\n]"}],"_postman_id":"81639401-88cd-4100-8b90-7a594ca2c348"},{"name":"delete-conversation","id":"4fdefa2a-8196-4ae6-9cd1-ba834191802f","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"<token>"}]},"isInherited":false},"method":"DELETE","header":[],"url":"http://127.0.0.1:5000/chatHistory/delete-conversation/<string:document_name>","description":"<p>Deletes all messages witht the specified document name.</p>\n","urlObject":{"protocol":"http","port":"5000","path":["chatHistory","delete-conversation","<string:document_name>"],"host":["127","0","0","1"],"query":[],"variable":[]}},"response":[{"id":"e7ca1eec-56a2-4752-bcd5-d32162463d27","name":"New Request","originalRequest":{"method":"DELETE","header":[],"url":"http://127.0.0.1:5000/chatHistory/delete-conversation/Quasixenon.pdf"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Server","value":"Werkzeug/3.0.0 Python/3.11.1"},{"key":"Date","value":"Wed, 18 Oct 2023 20:02:58 GMT"},{"key":"Content-Type","value":"application/json"},{"key":"Content-Length","value":"51"},{"key":"Access-Control-Allow-Origin","value":"http://localhost:3000"},{"key":"Connection","value":"close"}],"cookie":[],"responseTime":null,"body":"{\n    \"message\": \"2 messages deleted successfully\"\n}"}],"_postman_id":"4fdefa2a-8196-4ae6-9cd1-ba834191802f"}],"id":"8e736f31-491b-4bcd-ab62-089c80d103a6","_postman_id":"8e736f31-491b-4bcd-ab62-089c80d103a6","description":""}]}