khoj 1.30.11.dev64__py3-none-any.whl → 1.32.3.dev34__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (146) hide show
  1. khoj/configure.py +4 -2
  2. khoj/database/adapters/__init__.py +67 -58
  3. khoj/database/admin.py +9 -9
  4. khoj/database/migrations/0077_chatmodel_alter_agent_chat_model_and_more.py +62 -0
  5. khoj/database/migrations/0078_khojuser_email_verification_code_expiry.py +17 -0
  6. khoj/database/models/__init__.py +9 -8
  7. khoj/interface/compiled/404/index.html +1 -1
  8. khoj/interface/compiled/_next/static/chunks/182-8cd8b17d40e6e989.js +20 -0
  9. khoj/interface/compiled/_next/static/chunks/1915-605f698f2573cfd4.js +1 -0
  10. khoj/interface/compiled/_next/static/chunks/2117-9886e6a0232dc093.js +2 -0
  11. khoj/interface/compiled/_next/static/chunks/2581-455000f8aeb08fc3.js +1 -0
  12. khoj/interface/compiled/_next/static/chunks/3175-b2e522f8ca392f7e.js +3 -0
  13. khoj/interface/compiled/_next/static/chunks/3727.dcea8f2193111552.js +1 -0
  14. khoj/interface/compiled/_next/static/chunks/3789-a09e37a819171a9d.js +1 -0
  15. khoj/interface/compiled/_next/static/chunks/4124-0baa32400521e909.js +1 -0
  16. khoj/interface/compiled/_next/static/chunks/4357-03ea130575287c27.js +1 -0
  17. khoj/interface/compiled/_next/static/chunks/5243-f7f0a2a6e1ac5d28.js +1 -0
  18. khoj/interface/compiled/_next/static/chunks/5427-3e7360c8e6ac9728.js +1 -0
  19. khoj/interface/compiled/_next/static/chunks/{1279-4cb23143aa2c0228.js → 5473-b1cf56dedac6577a.js} +1 -1
  20. khoj/interface/compiled/_next/static/chunks/5477-c5d7eabee28a789a.js +1 -0
  21. khoj/interface/compiled/_next/static/chunks/6065-64db9ad305ba0bcd.js +1 -0
  22. khoj/interface/compiled/_next/static/chunks/8667-d3e5bc726e4ff4e3.js +1 -0
  23. khoj/interface/compiled/_next/static/chunks/9259-27d1ff42af9a43e0.js +1 -0
  24. khoj/interface/compiled/_next/static/chunks/94ca1967.1d9b42d929a1ee8c.js +1 -0
  25. khoj/interface/compiled/_next/static/chunks/{1210.ef7a0f9a7e43da1d.js → 9597.83583248dfbf6e73.js} +1 -1
  26. khoj/interface/compiled/_next/static/chunks/964ecbae.51d6faf8801d15e6.js +1 -0
  27. khoj/interface/compiled/_next/static/chunks/9665-1ab5c8c667b74dca.js +1 -0
  28. khoj/interface/compiled/_next/static/chunks/app/_not-found/{page-cfba071f5a657256.js → page-a834eddae3e235df.js} +1 -1
  29. khoj/interface/compiled/_next/static/chunks/app/agents/layout-e00fb81dca656a10.js +1 -0
  30. khoj/interface/compiled/_next/static/chunks/app/agents/page-ab5ebe4efba9b582.js +1 -0
  31. khoj/interface/compiled/_next/static/chunks/app/automations/{layout-7f1b79a2c67af0b4.js → layout-1fe1537449f43496.js} +1 -1
  32. khoj/interface/compiled/_next/static/chunks/app/automations/page-37d56a7bbfd307df.js +1 -0
  33. khoj/interface/compiled/_next/static/chunks/app/chat/layout-33934fc2d6ae6838.js +1 -0
  34. khoj/interface/compiled/_next/static/chunks/app/chat/page-a0b61f10b0bf6dd5.js +1 -0
  35. khoj/interface/compiled/_next/static/chunks/app/layout-30e7fda7262713ce.js +1 -0
  36. khoj/interface/compiled/_next/static/chunks/app/page-33a3375b1414d1bd.js +1 -0
  37. khoj/interface/compiled/_next/static/chunks/app/search/layout-c02531d586972d7d.js +1 -0
  38. khoj/interface/compiled/_next/static/chunks/app/search/page-bbbfda90fa03c5be.js +1 -0
  39. khoj/interface/compiled/_next/static/chunks/app/settings/layout-d09d6510a45cd4bd.js +1 -0
  40. khoj/interface/compiled/_next/static/chunks/app/settings/page-430db6215e48aea2.js +1 -0
  41. khoj/interface/compiled/_next/static/chunks/app/share/chat/layout-e8e5db7830bf3f47.js +1 -0
  42. khoj/interface/compiled/_next/static/chunks/app/share/chat/page-02dc1f2e2a41e522.js +1 -0
  43. khoj/interface/compiled/_next/static/chunks/d3ac728e-44ebd2a0c99b12a0.js +1 -0
  44. khoj/interface/compiled/_next/static/chunks/{fd9d1056-2e6c8140e79afc3b.js → fd9d1056-4482b99a36fd1673.js} +1 -1
  45. khoj/interface/compiled/_next/static/chunks/main-app-de1f09df97a3cfc7.js +1 -0
  46. khoj/interface/compiled/_next/static/chunks/main-db4bfac6b0a8d00b.js +1 -0
  47. khoj/interface/compiled/_next/static/chunks/pages/{_app-f870474a17b7f2fd.js → _app-3c9ca398d360b709.js} +1 -1
  48. khoj/interface/compiled/_next/static/chunks/pages/{_error-c66a4e8afc46f17b.js → _error-cf5ca766ac8f493f.js} +1 -1
  49. khoj/interface/compiled/_next/static/chunks/polyfills-42372ed130431b0a.js +1 -0
  50. khoj/interface/compiled/_next/static/chunks/webpack-b0a1b08bb62bdc15.js +1 -0
  51. khoj/interface/compiled/_next/static/css/0f04760e76bba6c1.css +25 -0
  52. khoj/interface/compiled/_next/static/css/37a73b87f02df402.css +1 -0
  53. khoj/interface/compiled/_next/static/css/8e6a3ca11a60b189.css +1 -0
  54. khoj/interface/compiled/_next/static/css/9c164d9727dd8092.css +1 -0
  55. khoj/interface/compiled/_next/static/css/c3acbadc30537d04.css +1 -0
  56. khoj/interface/compiled/_next/static/css/dac88c17aaee5fcf.css +1 -0
  57. khoj/interface/compiled/_next/static/css/df4b47a2d0d85eae.css +1 -0
  58. khoj/interface/compiled/_next/static/css/e546bf5cc4914244.css +1 -0
  59. khoj/interface/compiled/_next/static/mqcIHpVqVWkmBuN0npYHA/_buildManifest.js +1 -0
  60. khoj/interface/compiled/agents/index.html +1 -1
  61. khoj/interface/compiled/agents/index.txt +6 -6
  62. khoj/interface/compiled/automations/index.html +1 -1
  63. khoj/interface/compiled/automations/index.txt +7 -7
  64. khoj/interface/compiled/chat/index.html +1 -1
  65. khoj/interface/compiled/chat/index.txt +6 -6
  66. khoj/interface/compiled/index.html +1 -1
  67. khoj/interface/compiled/index.txt +6 -6
  68. khoj/interface/compiled/search/index.html +1 -1
  69. khoj/interface/compiled/search/index.txt +6 -6
  70. khoj/interface/compiled/settings/index.html +1 -1
  71. khoj/interface/compiled/settings/index.txt +8 -8
  72. khoj/interface/compiled/share/chat/index.html +1 -1
  73. khoj/interface/compiled/share/chat/index.txt +6 -6
  74. khoj/interface/email/magic_link.html +36 -13
  75. khoj/main.py +1 -1
  76. khoj/migrations/migrate_server_pg.py +7 -7
  77. khoj/processor/conversation/anthropic/anthropic_chat.py +5 -7
  78. khoj/processor/conversation/google/gemini_chat.py +5 -7
  79. khoj/processor/conversation/google/utils.py +0 -1
  80. khoj/processor/conversation/offline/chat_model.py +15 -14
  81. khoj/processor/conversation/openai/gpt.py +7 -9
  82. khoj/processor/conversation/openai/utils.py +31 -17
  83. khoj/processor/conversation/prompts.py +65 -49
  84. khoj/processor/conversation/utils.py +46 -44
  85. khoj/processor/tools/online_search.py +49 -2
  86. khoj/routers/api.py +22 -27
  87. khoj/routers/api_agents.py +4 -4
  88. khoj/routers/api_chat.py +33 -13
  89. khoj/routers/api_model.py +4 -4
  90. khoj/routers/auth.py +108 -7
  91. khoj/routers/email.py +10 -14
  92. khoj/routers/helpers.py +187 -143
  93. khoj/routers/web_client.py +1 -1
  94. khoj/utils/constants.py +1 -1
  95. khoj/utils/helpers.py +5 -3
  96. khoj/utils/initialization.py +28 -26
  97. {khoj-1.30.11.dev64.dist-info → khoj-1.32.3.dev34.dist-info}/METADATA +7 -7
  98. {khoj-1.30.11.dev64.dist-info → khoj-1.32.3.dev34.dist-info}/RECORD +102 -99
  99. {khoj-1.30.11.dev64.dist-info → khoj-1.32.3.dev34.dist-info}/WHEEL +1 -1
  100. khoj/interface/compiled/_next/static/67DcUiU9MqkM1fhksWunh/_buildManifest.js +0 -1
  101. khoj/interface/compiled/_next/static/chunks/1459.690bf20e7d7b7090.js +0 -1
  102. khoj/interface/compiled/_next/static/chunks/1603-13cef426e0e650ec.js +0 -1
  103. khoj/interface/compiled/_next/static/chunks/1970-1b63ac1497b03a10.js +0 -1
  104. khoj/interface/compiled/_next/static/chunks/2646-92ba433951d02d52.js +0 -20
  105. khoj/interface/compiled/_next/static/chunks/3072-be830e4f8412b9d2.js +0 -1
  106. khoj/interface/compiled/_next/static/chunks/3463-081c031e873b7966.js +0 -3
  107. khoj/interface/compiled/_next/static/chunks/3690-51312931ba1eae30.js +0 -1
  108. khoj/interface/compiled/_next/static/chunks/3717-b46079dbe9f55694.js +0 -1
  109. khoj/interface/compiled/_next/static/chunks/4504-62ac13e7d94c52f9.js +0 -1
  110. khoj/interface/compiled/_next/static/chunks/4602-460621c3241e0d13.js +0 -1
  111. khoj/interface/compiled/_next/static/chunks/4752-554a3db270186ce3.js +0 -1
  112. khoj/interface/compiled/_next/static/chunks/5512-7cc62049bbe60e11.js +0 -1
  113. khoj/interface/compiled/_next/static/chunks/5538-0ea2d3944ca051e1.js +0 -1
  114. khoj/interface/compiled/_next/static/chunks/7023-e8de2bded4df6539.js +0 -2
  115. khoj/interface/compiled/_next/static/chunks/7592-a09c39a38e60634b.js +0 -1
  116. khoj/interface/compiled/_next/static/chunks/8423-1dda16bc56236523.js +0 -1
  117. khoj/interface/compiled/_next/static/chunks/94ca1967.5584df65931cfe83.js +0 -1
  118. khoj/interface/compiled/_next/static/chunks/964ecbae.ea4eab2a3a835ffe.js +0 -1
  119. khoj/interface/compiled/_next/static/chunks/app/agents/layout-1878cc328ea380bd.js +0 -1
  120. khoj/interface/compiled/_next/static/chunks/app/agents/page-8eead7920b0ff92a.js +0 -1
  121. khoj/interface/compiled/_next/static/chunks/app/automations/page-b5800b5286306140.js +0 -1
  122. khoj/interface/compiled/_next/static/chunks/app/chat/layout-9219a85f3477e722.js +0 -1
  123. khoj/interface/compiled/_next/static/chunks/app/chat/page-d7d2ab93e519f0b2.js +0 -1
  124. khoj/interface/compiled/_next/static/chunks/app/layout-6310c57b674dd6f5.js +0 -1
  125. khoj/interface/compiled/_next/static/chunks/app/page-3c32ad5472f75965.js +0 -1
  126. khoj/interface/compiled/_next/static/chunks/app/search/layout-2ca475462c0b2176.js +0 -1
  127. khoj/interface/compiled/_next/static/chunks/app/search/page-faa998c71eb7ca8e.js +0 -1
  128. khoj/interface/compiled/_next/static/chunks/app/settings/layout-f285795bc3154b8c.js +0 -1
  129. khoj/interface/compiled/_next/static/chunks/app/settings/page-cbe7f56b1f87d77a.js +0 -1
  130. khoj/interface/compiled/_next/static/chunks/app/share/chat/layout-592e8c470f2c2084.js +0 -1
  131. khoj/interface/compiled/_next/static/chunks/app/share/chat/page-cd5757199539bbf2.js +0 -1
  132. khoj/interface/compiled/_next/static/chunks/d3ac728e-a9e3522eef9b6b28.js +0 -1
  133. khoj/interface/compiled/_next/static/chunks/main-1ea5c2e0fdef4626.js +0 -1
  134. khoj/interface/compiled/_next/static/chunks/main-app-6d6ee3495efe03d4.js +0 -1
  135. khoj/interface/compiled/_next/static/chunks/polyfills-78c92fac7aa8fdd8.js +0 -1
  136. khoj/interface/compiled/_next/static/chunks/webpack-616f0694bfe6f6c1.js +0 -1
  137. khoj/interface/compiled/_next/static/css/1f293605f2871853.css +0 -1
  138. khoj/interface/compiled/_next/static/css/3c34171b174cc381.css +0 -25
  139. khoj/interface/compiled/_next/static/css/3cf13271869a4aeb.css +0 -1
  140. khoj/interface/compiled/_next/static/css/592ca99f5122e75a.css +0 -1
  141. khoj/interface/compiled/_next/static/css/5a400c87d295e68a.css +0 -1
  142. khoj/interface/compiled/_next/static/css/80bd6301fc657983.css +0 -1
  143. khoj/interface/compiled/_next/static/css/9c4221ae0779cc04.css +0 -1
  144. /khoj/interface/compiled/_next/static/{67DcUiU9MqkM1fhksWunh → mqcIHpVqVWkmBuN0npYHA}/_ssgManifest.js +0 -0
  145. {khoj-1.30.11.dev64.dist-info → khoj-1.32.3.dev34.dist-info}/entry_points.txt +0 -0
  146. {khoj-1.30.11.dev64.dist-info → khoj-1.32.3.dev34.dist-info}/licenses/LICENSE +0 -0
@@ -1 +1 @@
1
- "use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1210],{51210:function(e,t,i){i.r(t),i.d(t,{default:function(){return f}});var n=i(57437),a=i(2265),l=i(57818),d=i(60266),r=i(50495),s=i(10077),o=i(46613);let c=(0,l.default)(async()=>(await Promise.resolve().then(i.t.bind(i,60266,23))).Excalidraw,{loadableGenerated:{webpack:()=>[60266]},ssr:!1});function f(e){let[t,i]=(0,a.useState)([]),[l,f]=(0,a.useState)(!1),u=e=>void 0!==e.x&&void 0!==e.y&&void 0!==e.id&&void 0!==e.type;return(0,a.useEffect)(()=>{onkeydown=l?e=>{"Escape"===e.key&&(f(!1),window.dispatchEvent(new Event("resize")))}:null},[l]),(0,a.useEffect)(()=>{let t=[];for(let i of e.data)u(i)&&t.push(i);let n=[];for(let e of t)if("frame"!==e.type){if("arrow"===e.type){if(e.start&&!t.find(t=>{var i;return t.id===(null===(i=e.start)||void 0===i?void 0:i.id)})||e.end&&!t.find(t=>{var i;return t.id===(null===(i=e.end)||void 0===i?void 0:i.id)}))continue;n.push(e)}else n.push(e)}for(let e of t)if("frame"===e.type){var a;let t=null===(a=e.children)||void 0===a?void 0:a.map(e=>n.find(t=>t.id===e)),i=null==t?void 0:t.map(e=>null==e?void 0:e.id).filter(e=>void 0!==e);if(void 0===i||0===i.length)continue;n.push({...e,children:i})}i((0,d.convertToExcalidrawElements)(n))},[]),(0,n.jsx)("div",{className:"relative",children:(0,n.jsxs)("div",{className:"".concat(l?"fixed inset-0 bg-black bg-opacity-50 backdrop-blur-sm z-50 flex items-center justify-center":""),children:[(0,n.jsx)(r.z,{onClick:()=>{f(!l),window.dispatchEvent(new Event("resize"))},variant:"outline",className:"".concat(l?"absolute top-2 left-2 z-[60]":""),children:l?(0,n.jsx)(s.f,{className:"h-4 w-4"}):(0,n.jsx)(o.t,{className:"h-4 w-4"})}),(0,n.jsx)("div",{className:"\n ".concat(l?"w-[80vw] h-[80vh]":"w-full h-[500px]","\n bg-white overflow-hidden rounded-lg relative\n "),children:(0,n.jsx)(c,{initialData:{elements:t,appState:{zenModeEnabled:!0},scrollToContent:!0},theme:"dark"===localStorage.getItem("theme")?"dark":"light",validateEmbeddable:!0,renderTopRightUI:(e,t)=>(0,n.jsx)(n.Fragment,{})})})]})})}}}]);
1
+ "use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9597],{99597:function(e,t,i){i.r(t),i.d(t,{default:function(){return f}});var n=i(57437),a=i(2265),l=i(30166),d=i(74473),r=i(62869),s=i(25283),o=i(70362);let c=(0,l.default)(async()=>(await Promise.resolve().then(i.t.bind(i,74473,23))).Excalidraw,{loadableGenerated:{webpack:()=>[74473]},ssr:!1});function f(e){let[t,i]=(0,a.useState)([]),[l,f]=(0,a.useState)(!1),u=e=>void 0!==e.x&&void 0!==e.y&&void 0!==e.id&&void 0!==e.type;return(0,a.useEffect)(()=>{onkeydown=l?e=>{"Escape"===e.key&&(f(!1),window.dispatchEvent(new Event("resize")))}:null},[l]),(0,a.useEffect)(()=>{let t=[];for(let i of e.data)u(i)&&t.push(i);let n=[];for(let e of t)if("frame"!==e.type){if("arrow"===e.type){if(e.start&&!t.find(t=>{var i;return t.id===(null===(i=e.start)||void 0===i?void 0:i.id)})||e.end&&!t.find(t=>{var i;return t.id===(null===(i=e.end)||void 0===i?void 0:i.id)}))continue;n.push(e)}else n.push(e)}for(let e of t)if("frame"===e.type){var a;let t=null===(a=e.children)||void 0===a?void 0:a.map(e=>n.find(t=>t.id===e)),i=null==t?void 0:t.map(e=>null==e?void 0:e.id).filter(e=>void 0!==e);if(void 0===i||0===i.length)continue;n.push({...e,children:i})}i((0,d.convertToExcalidrawElements)(n))},[]),(0,n.jsx)("div",{className:"relative",children:(0,n.jsxs)("div",{className:"".concat(l?"fixed inset-0 bg-black bg-opacity-50 backdrop-blur-sm z-50 flex items-center justify-center":""),children:[(0,n.jsx)(r.z,{onClick:()=>{f(!l),window.dispatchEvent(new Event("resize"))},variant:"outline",className:"".concat(l?"absolute top-2 left-2 z-[60]":""),children:l?(0,n.jsx)(s.f,{className:"h-4 w-4"}):(0,n.jsx)(o.t,{className:"h-4 w-4"})}),(0,n.jsx)("div",{className:"\n ".concat(l?"w-[80vw] h-[80vh]":"w-full h-[500px]","\n bg-white overflow-hidden rounded-lg relative\n "),children:(0,n.jsx)(c,{initialData:{elements:t,appState:{zenModeEnabled:!0},scrollToContent:!0},theme:"dark"===localStorage.getItem("theme")?"dark":"light",validateEmbeddable:!0,renderTopRightUI:(e,t)=>(0,n.jsx)(n.Fragment,{})})})]})})}}}]);