khoj 1.30.2.dev22__py3-none-any.whl → 1.30.8.dev17__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.
- khoj/database/adapters/__init__.py +1 -1
- khoj/database/admin.py +39 -0
- khoj/interface/compiled/404/index.html +1 -1
- khoj/interface/compiled/_next/static/chunks/1603-c68d44bc4ae6039a.js +1 -0
- khoj/interface/compiled/_next/static/chunks/{6901-e3dc0d315e3f6033.js → 2646-92ba433951d02d52.js} +2 -2
- khoj/interface/compiled/_next/static/chunks/3463-081c031e873b7966.js +3 -0
- khoj/interface/compiled/_next/static/chunks/{6297-55f82537bb7068dd.js → 3717-b46079dbe9f55694.js} +1 -1
- khoj/interface/compiled/_next/static/chunks/4752-554a3db270186ce3.js +1 -0
- khoj/interface/compiled/_next/static/chunks/app/agents/layout-1878cc328ea380bd.js +1 -0
- khoj/interface/compiled/_next/static/chunks/app/agents/{page-5f6e0dacc34e33ad.js → page-2ffa7560aebff9a1.js} +1 -1
- khoj/interface/compiled/_next/static/chunks/app/automations/layout-f1050c1f20a3af67.js +1 -0
- khoj/interface/compiled/_next/static/chunks/app/automations/{page-60bc7454bc3ea881.js → page-b0a6a6ed2267c1a2.js} +1 -1
- khoj/interface/compiled/_next/static/chunks/app/chat/layout-9219a85f3477e722.js +1 -0
- khoj/interface/compiled/_next/static/chunks/app/chat/page-02f8616bba3e449e.js +1 -0
- khoj/interface/compiled/_next/static/chunks/app/layout-72ec1be8afd0b1ab.js +1 -0
- khoj/interface/compiled/_next/static/chunks/app/{page-358154a4436ef316.js → page-3ffd8f0934b896f3.js} +1 -1
- khoj/interface/compiled/_next/static/chunks/app/search/layout-2ca475462c0b2176.js +1 -0
- khoj/interface/compiled/_next/static/chunks/app/search/{page-64ea1717528979af.js → page-059f237514f77628.js} +1 -1
- khoj/interface/compiled/_next/static/chunks/app/settings/layout-fe8a2f65ccafd142.js +1 -0
- khoj/interface/compiled/_next/static/chunks/app/settings/{page-17a538580c65e7fe.js → page-32e9423bede5b4a1.js} +1 -1
- khoj/interface/compiled/_next/static/chunks/app/share/chat/layout-592e8c470f2c2084.js +1 -0
- khoj/interface/compiled/_next/static/chunks/app/share/chat/{page-47641b3691fb0856.js → page-0b8d90dc57dbc1d8.js} +1 -1
- khoj/interface/compiled/_next/static/chunks/{webpack-2389f756cfc04602.js → webpack-64477b5a1e621214.js} +1 -1
- khoj/interface/compiled/_next/static/css/3c34171b174cc381.css +25 -0
- khoj/interface/compiled/_next/static/css/{2ff098d0815fdbc1.css → 9d45de78fba367c1.css} +1 -1
- khoj/interface/compiled/_next/static/css/bedf49fbfc598358.css +1 -0
- khoj/interface/compiled/_next/static/media/e098aaaecc9cfbb2-s.p.woff2 +0 -0
- khoj/interface/compiled/agents/index.html +1 -1
- khoj/interface/compiled/agents/index.txt +2 -2
- khoj/interface/compiled/automations/index.html +1 -1
- khoj/interface/compiled/automations/index.txt +3 -3
- khoj/interface/compiled/chat/index.html +1 -1
- khoj/interface/compiled/chat/index.txt +2 -2
- khoj/interface/compiled/index.html +1 -1
- khoj/interface/compiled/index.txt +2 -2
- khoj/interface/compiled/search/index.html +1 -1
- khoj/interface/compiled/search/index.txt +2 -2
- khoj/interface/compiled/settings/index.html +1 -1
- khoj/interface/compiled/settings/index.txt +3 -3
- khoj/interface/compiled/share/chat/index.html +1 -1
- khoj/interface/compiled/share/chat/index.txt +2 -2
- khoj/interface/web/.well-known/assetlinks.json +11 -0
- khoj/main.py +4 -0
- khoj/processor/conversation/anthropic/anthropic_chat.py +8 -2
- khoj/processor/conversation/anthropic/utils.py +8 -3
- khoj/processor/conversation/google/gemini_chat.py +8 -2
- khoj/processor/conversation/google/utils.py +8 -3
- khoj/processor/conversation/offline/chat_model.py +12 -4
- khoj/processor/conversation/openai/gpt.py +9 -2
- khoj/processor/conversation/openai/utils.py +7 -3
- khoj/processor/conversation/prompts.py +4 -4
- khoj/processor/conversation/utils.py +7 -4
- khoj/processor/tools/run_code.py +1 -25
- khoj/routers/api_chat.py +12 -2
- khoj/routers/api_subscription.py +9 -2
- khoj/routers/auth.py +2 -2
- khoj/routers/research.py +2 -1
- khoj/routers/web_client.py +5 -0
- khoj/utils/cli.py +2 -0
- khoj/utils/constants.py +1 -0
- khoj/utils/helpers.py +34 -4
- khoj/utils/state.py +1 -0
- {khoj-1.30.2.dev22.dist-info → khoj-1.30.8.dev17.dist-info}/METADATA +9 -4
- {khoj-1.30.2.dev22.dist-info → khoj-1.30.8.dev17.dist-info}/RECORD +74 -74
- khoj/interface/compiled/_next/static/chunks/1603-1407afe510f0145a.js +0 -1
- khoj/interface/compiled/_next/static/chunks/216-b2e4344315b88832.js +0 -1
- khoj/interface/compiled/_next/static/chunks/3124-e8410bbd01f6f188.js +0 -1
- khoj/interface/compiled/_next/static/chunks/796-36ee2d6829448c6d.js +0 -3
- khoj/interface/compiled/_next/static/chunks/9417-06236cd650f1abcd.js +0 -1
- khoj/interface/compiled/_next/static/chunks/app/agents/layout-e9838b642913a071.js +0 -1
- khoj/interface/compiled/_next/static/chunks/app/automations/layout-7f1b79a2c67af0b4.js +0 -1
- khoj/interface/compiled/_next/static/chunks/app/chat/layout-b0e7ff4baa3b5265.js +0 -1
- khoj/interface/compiled/_next/static/chunks/app/chat/page-ac366c9111374312.js +0 -1
- khoj/interface/compiled/_next/static/chunks/app/layout-86561d2fac35a91a.js +0 -1
- khoj/interface/compiled/_next/static/chunks/app/search/layout-ea6b73fdaf9b24ca.js +0 -1
- khoj/interface/compiled/_next/static/chunks/app/settings/layout-1f4d76a8b09517b1.js +0 -1
- khoj/interface/compiled/_next/static/chunks/app/share/chat/layout-cf7445cf0326bda3.js +0 -1
- khoj/interface/compiled/_next/static/css/0e9d53dcd7f11342.css +0 -1
- khoj/interface/compiled/_next/static/css/1a4038cc4acc8ee4.css +0 -25
- /khoj/interface/compiled/_next/static/{Tua1S1yzYQvGP_toWnaaz → X8lPgmtHPY-a6sH5qx8z9}/_buildManifest.js +0 -0
- /khoj/interface/compiled/_next/static/{Tua1S1yzYQvGP_toWnaaz → X8lPgmtHPY-a6sH5qx8z9}/_ssgManifest.js +0 -0
- /khoj/interface/compiled/_next/static/media/{5984b96ba4822821-s.woff2 → 5984b96ba4822821-s.p.woff2} +0 -0
- /khoj/interface/compiled/_next/static/media/{684adc3dde1b03f1-s.woff2 → 684adc3dde1b03f1-s.p.woff2} +0 -0
- /khoj/interface/compiled/_next/static/media/{82e3b9a1bdaf0c26-s.woff2 → 82e3b9a1bdaf0c26-s.p.woff2} +0 -0
- /khoj/interface/compiled/_next/static/media/{8d1ea331386a0db8-s.woff2 → 8d1ea331386a0db8-s.p.woff2} +0 -0
- /khoj/interface/compiled/_next/static/media/{b98b13dbc1c3b59c-s.woff2 → b98b13dbc1c3b59c-s.p.woff2} +0 -0
- {khoj-1.30.2.dev22.dist-info → khoj-1.30.8.dev17.dist-info}/WHEEL +0 -0
- {khoj-1.30.2.dev22.dist-info → khoj-1.30.8.dev17.dist-info}/entry_points.txt +0 -0
- {khoj-1.30.2.dev22.dist-info → khoj-1.30.8.dev17.dist-info}/licenses/LICENSE +0 -0
@@ -1 +1 @@
|
|
1
|
-
<!DOCTYPE html><html lang="en"><head><meta charSet="utf-8"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="preload" href="/_next/static/media/5455839c73f146e7-s.p.woff2" as="font" crossorigin="" type="font/woff2"/><link rel="stylesheet" href="/_next/static/css/0e9d53dcd7f11342.css" data-precedence="next"/><link rel="stylesheet" href="/_next/static/css/1a4038cc4acc8ee4.css" data-precedence="next"/><link rel="stylesheet" href="/_next/static/css/3cf13271869a4aeb.css" data-precedence="next"/><link rel="stylesheet" href="/_next/static/css/2ff098d0815fdbc1.css" data-precedence="next"/><link rel="stylesheet" href="/_next/static/css/1f293605f2871853.css" data-precedence="next"/><link rel="preload" as="script" fetchPriority="low" href="/_next/static/chunks/webpack-2389f756cfc04602.js"/><script src="/_next/static/chunks/fd9d1056-2e6c8140e79afc3b.js" async=""></script><script src="/_next/static/chunks/7023-e8de2bded4df6539.js" async=""></script><script src="/_next/static/chunks/main-app-6d6ee3495efe03d4.js" async=""></script><script src="/_next/static/chunks/d3ac728e-a9e3522eef9b6b28.js" async=""></script><script src="/_next/static/chunks/3072-be830e4f8412b9d2.js" async=""></script><script src="/_next/static/chunks/216-b2e4344315b88832.js" async=""></script><script src="/_next/static/chunks/3124-e8410bbd01f6f188.js" async=""></script><script src="/_next/static/chunks/7592-a09c39a38e60634b.js" async=""></script><script src="/_next/static/chunks/3690-51312931ba1eae30.js" async=""></script><script src="/_next/static/chunks/796-36ee2d6829448c6d.js" async=""></script><script src="/_next/static/chunks/1603-1407afe510f0145a.js" async=""></script><script src="/_next/static/chunks/9417-06236cd650f1abcd.js" async=""></script><script src="/_next/static/chunks/8423-1dda16bc56236523.js" async=""></script><script src="/_next/static/chunks/5538-e5f3c9f4d67a64b9.js" async=""></script><script src="/_next/static/chunks/app/share/chat/page-47641b3691fb0856.js" async=""></script><meta http-equiv="Content-Security-Policy" content="default-src 'self' https://assets.khoj.dev; media-src * blob:; script-src 'self' https://assets.khoj.dev 'unsafe-inline' 'unsafe-eval'; connect-src 'self' blob: https://ipapi.co/json ws://localhost:42110; style-src 'self' https://assets.khoj.dev 'unsafe-inline' https://fonts.googleapis.com; img-src 'self' data: blob: https://*.khoj.dev https://*.googleusercontent.com https://*.google.com/ https://*.gstatic.com; font-src 'self' https://assets.khoj.dev https://fonts.gstatic.com; child-src 'none'; object-src 'none';"/><meta http-equiv="Content-Security-Policy" content="default-src 'self' https://assets.khoj.dev; script-src 'self' https://assets.khoj.dev 'unsafe-inline' 'unsafe-eval'; connect-src 'self' blob: https://ipapi.co/json ws://localhost:42110; style-src 'self' https://assets.khoj.dev 'unsafe-inline' https://fonts.googleapis.com; img-src 'self' data: blob: https://*.khoj.dev https://*.googleusercontent.com https://*.google.com/ https://*.gstatic.com; font-src 'self' https://assets.khoj.dev https://fonts.gstatic.com; child-src 'none'; object-src 'none';"/><title>Khoj AI - Chat</title><meta name="description" content="Use this page to view a chat with Khoj AI."/><link rel="manifest" href="/static/khoj.webmanifest" crossorigin="use-credentials"/><meta property="og:title" content="Khoj AI"/><meta property="og:description" content="Your Second Brain."/><meta property="og:url" content="https://app.khoj.dev/"/><meta property="og:site_name" content="Khoj AI"/><meta property="og:image" content="https://assets.khoj.dev/khoj_lantern_256x256.png"/><meta property="og:image:width" content="256"/><meta property="og:image:height" content="256"/><meta property="og:image" content="https://assets.khoj.dev/khoj_lantern_logomarktype_1200x630.png"/><meta property="og:image:width" content="1200"/><meta property="og:image:height" content="630"/><meta property="og:type" content="website"/><meta name="twitter:card" content="summary_large_image"/><meta name="twitter:title" content="Khoj AI"/><meta name="twitter:description" content="Your Second Brain."/><meta name="twitter:image" content="https://assets.khoj.dev/khoj_lantern_256x256.png"/><meta name="twitter:image:width" content="256"/><meta name="twitter:image:height" content="256"/><meta name="twitter:image" content="https://assets.khoj.dev/khoj_lantern_logomarktype_1200x630.png"/><meta name="twitter:image:width" content="1200"/><meta name="twitter:image:height" content="630"/><link rel="icon" href="/static/assets/icons/khoj_lantern.ico"/><link rel="apple-touch-icon" href="/static/assets/icons/khoj_lantern_256x256.png"/><meta name="next-size-adjust"/><script src="/_next/static/chunks/polyfills-78c92fac7aa8fdd8.js" noModule=""></script></head><body class="__className_af6c42"><html lang="en"><body class="__className_af6c42"><div class="bg-background opacity-50 flex items-center justify-center h-screen"><div>Loading<!-- --> <span><svg xmlns="http://www.w3.org/2000/svg" width="1em" height="1em" fill="currentColor" viewBox="0 0 256 256" class="inline animate-spin h-5 w-5"><path d="M232,128a104,104,0,0,1-208,0c0-41,23.81-78.36,60.66-95.27a8,8,0,0,1,6.68,14.54C60.15,61.59,40,93.27,40,128a88,88,0,0,0,176,0c0-34.73-20.15-66.41-51.34-80.73a8,8,0,0,1,6.68-14.54C208.19,49.64,232,87,232,128Z"></path></svg></span></div></div><script>window.EXCALIDRAW_ASSET_PATH = 'https://assets.khoj.dev/@excalidraw/excalidraw/dist/';</script><script src="/_next/static/chunks/webpack-2389f756cfc04602.js" async=""></script></body></html><script>(self.__next_f=self.__next_f||[]).push([0]);self.__next_f.push([2,null])</script><script>self.__next_f.push([1,"1:HL[\"/_next/static/media/5455839c73f146e7-s.p.woff2\",\"font\",{\"crossOrigin\":\"\",\"type\":\"font/woff2\"}]\n2:HL[\"/_next/static/css/0e9d53dcd7f11342.css\",\"style\"]\n3:HL[\"/_next/static/css/1a4038cc4acc8ee4.css\",\"style\"]\n4:HL[\"/_next/static/css/3cf13271869a4aeb.css\",\"style\"]\n5:HL[\"/_next/static/css/2ff098d0815fdbc1.css\",\"style\"]\n6:HL[\"/_next/static/css/1f293605f2871853.css\",\"style\"]\n"])</script><script>self.__next_f.push([1,"7:I[95751,[],\"\"]\n9:I[66513,[],\"ClientPageRoot\"]\na:I[5506,[\"3954\",\"static/chunks/d3ac728e-a9e3522eef9b6b28.js\",\"3072\",\"static/chunks/3072-be830e4f8412b9d2.js\",\"216\",\"static/chunks/216-b2e4344315b88832.js\",\"3124\",\"static/chunks/3124-e8410bbd01f6f188.js\",\"7592\",\"static/chunks/7592-a09c39a38e60634b.js\",\"3690\",\"static/chunks/3690-51312931ba1eae30.js\",\"796\",\"static/chunks/796-36ee2d6829448c6d.js\",\"1603\",\"static/chunks/1603-1407afe510f0145a.js\",\"9417\",\"static/chunks/9417-06236cd650f1abcd.js\",\"8423\",\"static/chunks/8423-1dda16bc56236523.js\",\"5538\",\"static/chunks/5538-e5f3c9f4d67a64b9.js\",\"3111\",\"static/chunks/app/share/chat/page-47641b3691fb0856.js\"],\"default\",1]\nb:I[39275,[],\"\"]\nc:I[61343,[],\"\"]\ne:I[76130,[],\"\"]\nf:[]\n"])</script><script>self.__next_f.push([1,"0:[\"$\",\"$L7\",null,{\"buildId\":\"Tua1S1yzYQvGP_toWnaaz\",\"assetPrefix\":\"\",\"urlParts\":[\"\",\"share\",\"chat\",\"\"],\"initialTree\":[\"\",{\"children\":[\"share\",{\"children\":[\"chat\",{\"children\":[\"__PAGE__\",{}]}]}]},\"$undefined\",\"$undefined\",true],\"initialSeedData\":[\"\",{\"children\":[\"share\",{\"children\":[\"chat\",{\"children\":[\"__PAGE__\",{},[[\"$L8\",[\"$\",\"$L9\",null,{\"props\":{\"params\":{},\"searchParams\":{}},\"Component\":\"$a\"}],[[\"$\",\"link\",\"0\",{\"rel\":\"stylesheet\",\"href\":\"/_next/static/css/3cf13271869a4aeb.css\",\"precedence\":\"next\",\"crossOrigin\":\"$undefined\"}],[\"$\",\"link\",\"1\",{\"rel\":\"stylesheet\",\"href\":\"/_next/static/css/2ff098d0815fdbc1.css\",\"precedence\":\"next\",\"crossOrigin\":\"$undefined\"}],[\"$\",\"link\",\"2\",{\"rel\":\"stylesheet\",\"href\":\"/_next/static/css/1f293605f2871853.css\",\"precedence\":\"next\",\"crossOrigin\":\"$undefined\"}]]],null],null]},[[null,[\"$\",\"html\",null,{\"lang\":\"en\",\"children\":[[\"$\",\"meta\",null,{\"httpEquiv\":\"Content-Security-Policy\",\"content\":\"default-src 'self' https://assets.khoj.dev; script-src 'self' https://assets.khoj.dev 'unsafe-inline' 'unsafe-eval'; connect-src 'self' blob: https://ipapi.co/json ws://localhost:42110; style-src 'self' https://assets.khoj.dev 'unsafe-inline' https://fonts.googleapis.com; img-src 'self' data: blob: https://*.khoj.dev https://*.googleusercontent.com https://*.google.com/ https://*.gstatic.com; font-src 'self' https://assets.khoj.dev https://fonts.gstatic.com; child-src 'none'; object-src 'none';\"}],[\"$\",\"body\",null,{\"className\":\"__className_af6c42\",\"children\":[[\"$\",\"$Lb\",null,{\"parallelRouterKey\":\"children\",\"segmentPath\":[\"children\",\"share\",\"children\",\"chat\",\"children\"],\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"errorScripts\":\"$undefined\",\"template\":[\"$\",\"$Lc\",null,{}],\"templateStyles\":\"$undefined\",\"templateScripts\":\"$undefined\",\"notFound\":\"$undefined\",\"notFoundStyles\":\"$undefined\"}],[\"$\",\"script\",null,{\"dangerouslySetInnerHTML\":{\"__html\":\"window.EXCALIDRAW_ASSET_PATH = 'https://assets.khoj.dev/@excalidraw/excalidraw/dist/';\"}}]]}]]}]],null],null]},[null,[\"$\",\"$Lb\",null,{\"parallelRouterKey\":\"children\",\"segmentPath\":[\"children\",\"share\",\"children\"],\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"errorScripts\":\"$undefined\",\"template\":[\"$\",\"$Lc\",null,{}],\"templateStyles\":\"$undefined\",\"templateScripts\":\"$undefined\",\"notFound\":\"$undefined\",\"notFoundStyles\":\"$undefined\"}]],null]},[[[[\"$\",\"link\",\"0\",{\"rel\":\"stylesheet\",\"href\":\"/_next/static/css/0e9d53dcd7f11342.css\",\"precedence\":\"next\",\"crossOrigin\":\"$undefined\"}],[\"$\",\"link\",\"1\",{\"rel\":\"stylesheet\",\"href\":\"/_next/static/css/1a4038cc4acc8ee4.css\",\"precedence\":\"next\",\"crossOrigin\":\"$undefined\"}]],[\"$\",\"html\",null,{\"lang\":\"en\",\"children\":[[\"$\",\"meta\",null,{\"httpEquiv\":\"Content-Security-Policy\",\"content\":\"default-src 'self' https://assets.khoj.dev; media-src * blob:; script-src 'self' https://assets.khoj.dev 'unsafe-inline' 'unsafe-eval'; connect-src 'self' blob: https://ipapi.co/json ws://localhost:42110; style-src 'self' https://assets.khoj.dev 'unsafe-inline' https://fonts.googleapis.com; img-src 'self' data: blob: https://*.khoj.dev https://*.googleusercontent.com https://*.google.com/ https://*.gstatic.com; font-src 'self' https://assets.khoj.dev https://fonts.gstatic.com; child-src 'none'; object-src 'none';\"}],[\"$\",\"body\",null,{\"className\":\"__className_af6c42\",\"children\":[\"$\",\"$Lb\",null,{\"parallelRouterKey\":\"children\",\"segmentPath\":[\"children\"],\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"errorScripts\":\"$undefined\",\"template\":[\"$\",\"$Lc\",null,{}],\"templateStyles\":\"$undefined\",\"templateScripts\":\"$undefined\",\"notFound\":[[\"$\",\"title\",null,{\"children\":\"404: This page could not be found.\"}],[\"$\",\"div\",null,{\"style\":{\"fontFamily\":\"system-ui,\\\"Segoe UI\\\",Roboto,Helvetica,Arial,sans-serif,\\\"Apple Color Emoji\\\",\\\"Segoe UI Emoji\\\"\",\"height\":\"100vh\",\"textAlign\":\"center\",\"display\":\"flex\",\"flexDirection\":\"column\",\"alignItems\":\"center\",\"justifyContent\":\"center\"},\"children\":[\"$\",\"div\",null,{\"children\":[[\"$\",\"style\",null,{\"dangerouslySetInnerHTML\":{\"__html\":\"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}\"}}],[\"$\",\"h1\",null,{\"className\":\"next-error-h1\",\"style\":{\"display\":\"inline-block\",\"margin\":\"0 20px 0 0\",\"padding\":\"0 23px 0 0\",\"fontSize\":24,\"fontWeight\":500,\"verticalAlign\":\"top\",\"lineHeight\":\"49px\"},\"children\":\"404\"}],[\"$\",\"div\",null,{\"style\":{\"display\":\"inline-block\"},\"children\":[\"$\",\"h2\",null,{\"style\":{\"fontSize\":14,\"fontWeight\":400,\"lineHeight\":\"49px\",\"margin\":0},\"children\":\"This page could not be found.\"}]}]]}]}]],\"notFoundStyles\":[]}]}]]}]],null],null],\"couldBeIntercepted\":false,\"initialHead\":[null,\"$Ld\"],\"globalErrorComponent\":\"$e\",\"missingSlots\":\"$Wf\"}]\n"])</script><script>self.__next_f.push([1,"d:[[\"$\",\"meta\",\"0\",{\"name\":\"viewport\",\"content\":\"width=device-width, initial-scale=1\"}],[\"$\",\"meta\",\"1\",{\"charSet\":\"utf-8\"}],[\"$\",\"title\",\"2\",{\"children\":\"Khoj AI - Chat\"}],[\"$\",\"meta\",\"3\",{\"name\":\"description\",\"content\":\"Use this page to view a chat with Khoj AI.\"}],[\"$\",\"link\",\"4\",{\"rel\":\"manifest\",\"href\":\"/static/khoj.webmanifest\",\"crossOrigin\":\"use-credentials\"}],[\"$\",\"meta\",\"5\",{\"property\":\"og:title\",\"content\":\"Khoj AI\"}],[\"$\",\"meta\",\"6\",{\"property\":\"og:description\",\"content\":\"Your Second Brain.\"}],[\"$\",\"meta\",\"7\",{\"property\":\"og:url\",\"content\":\"https://app.khoj.dev/\"}],[\"$\",\"meta\",\"8\",{\"property\":\"og:site_name\",\"content\":\"Khoj AI\"}],[\"$\",\"meta\",\"9\",{\"property\":\"og:image\",\"content\":\"https://assets.khoj.dev/khoj_lantern_256x256.png\"}],[\"$\",\"meta\",\"10\",{\"property\":\"og:image:width\",\"content\":\"256\"}],[\"$\",\"meta\",\"11\",{\"property\":\"og:image:height\",\"content\":\"256\"}],[\"$\",\"meta\",\"12\",{\"property\":\"og:image\",\"content\":\"https://assets.khoj.dev/khoj_lantern_logomarktype_1200x630.png\"}],[\"$\",\"meta\",\"13\",{\"property\":\"og:image:width\",\"content\":\"1200\"}],[\"$\",\"meta\",\"14\",{\"property\":\"og:image:height\",\"content\":\"630\"}],[\"$\",\"meta\",\"15\",{\"property\":\"og:type\",\"content\":\"website\"}],[\"$\",\"meta\",\"16\",{\"name\":\"twitter:card\",\"content\":\"summary_large_image\"}],[\"$\",\"meta\",\"17\",{\"name\":\"twitter:title\",\"content\":\"Khoj AI\"}],[\"$\",\"meta\",\"18\",{\"name\":\"twitter:description\",\"content\":\"Your Second Brain.\"}],[\"$\",\"meta\",\"19\",{\"name\":\"twitter:image\",\"content\":\"https://assets.khoj.dev/khoj_lantern_256x256.png\"}],[\"$\",\"meta\",\"20\",{\"name\":\"twitter:image:width\",\"content\":\"256\"}],[\"$\",\"meta\",\"21\",{\"name\":\"twitter:image:height\",\"content\":\"256\"}],[\"$\",\"meta\",\"22\",{\"name\":\"twitter:image\",\"content\":\"https://assets.khoj.dev/khoj_lantern_logomarktype_1200x630.png\"}],[\"$\",\"meta\",\"23\",{\"name\":\"twitter:image:width\",\"content\":\"1200\"}],[\"$\",\"meta\",\"24\",{\"name\":\"twitter:image:height\",\"content\":\"630\"}],[\"$\",\"link\",\"25\",{\"rel\":\"icon\",\"href\":\"/static/assets/icons/khoj_lantern.ico\"}],[\"$\",\"link\",\"26\",{\"rel\":\"apple-touch-icon\",\"href\":\"/static/assets/icons/khoj_lantern_256x256.png\"}],[\"$\",\"meta\",\"27\",{\"name\":\"next-size-adjust\"}]]\n"])</script><script>self.__next_f.push([1,"8:null\n"])</script></body></html>
|
1
|
+
<!DOCTYPE html><html lang="en" class="__variable_a693a0 __variable_702545"><head><meta charSet="utf-8"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="preload" href="/_next/static/media/5455839c73f146e7-s.p.woff2" as="font" crossorigin="" type="font/woff2"/><link rel="preload" href="/_next/static/media/5984b96ba4822821-s.p.woff2" as="font" crossorigin="" type="font/woff2"/><link rel="preload" href="/_next/static/media/684adc3dde1b03f1-s.p.woff2" as="font" crossorigin="" type="font/woff2"/><link rel="preload" href="/_next/static/media/82e3b9a1bdaf0c26-s.p.woff2" as="font" crossorigin="" type="font/woff2"/><link rel="preload" href="/_next/static/media/8d1ea331386a0db8-s.p.woff2" as="font" crossorigin="" type="font/woff2"/><link rel="preload" href="/_next/static/media/b98b13dbc1c3b59c-s.p.woff2" as="font" crossorigin="" type="font/woff2"/><link rel="preload" href="/_next/static/media/e098aaaecc9cfbb2-s.p.woff2" as="font" crossorigin="" type="font/woff2"/><link rel="stylesheet" href="/_next/static/css/bedf49fbfc598358.css" data-precedence="next"/><link rel="stylesheet" href="/_next/static/css/3c34171b174cc381.css" data-precedence="next"/><link rel="stylesheet" href="/_next/static/css/3cf13271869a4aeb.css" data-precedence="next"/><link rel="stylesheet" href="/_next/static/css/9d45de78fba367c1.css" data-precedence="next"/><link rel="stylesheet" href="/_next/static/css/1f293605f2871853.css" data-precedence="next"/><link rel="preload" as="script" fetchPriority="low" href="/_next/static/chunks/webpack-64477b5a1e621214.js"/><script src="/_next/static/chunks/fd9d1056-2e6c8140e79afc3b.js" async=""></script><script src="/_next/static/chunks/7023-e8de2bded4df6539.js" async=""></script><script src="/_next/static/chunks/main-app-6d6ee3495efe03d4.js" async=""></script><script src="/_next/static/chunks/d3ac728e-a9e3522eef9b6b28.js" async=""></script><script src="/_next/static/chunks/3072-be830e4f8412b9d2.js" async=""></script><script src="/_next/static/chunks/4752-554a3db270186ce3.js" async=""></script><script src="/_next/static/chunks/7592-a09c39a38e60634b.js" async=""></script><script src="/_next/static/chunks/3690-51312931ba1eae30.js" async=""></script><script src="/_next/static/chunks/3463-081c031e873b7966.js" async=""></script><script src="/_next/static/chunks/1603-c68d44bc4ae6039a.js" async=""></script><script src="/_next/static/chunks/8423-1dda16bc56236523.js" async=""></script><script src="/_next/static/chunks/5538-e5f3c9f4d67a64b9.js" async=""></script><script src="/_next/static/chunks/app/share/chat/page-0b8d90dc57dbc1d8.js" async=""></script><meta http-equiv="Content-Security-Policy" content="default-src 'self' https://assets.khoj.dev; media-src * blob:; script-src 'self' https://assets.khoj.dev 'unsafe-inline' 'unsafe-eval'; connect-src 'self' blob: https://ipapi.co/json ws://localhost:42110; style-src 'self' https://assets.khoj.dev 'unsafe-inline' https://fonts.googleapis.com; img-src 'self' data: blob: https://*.khoj.dev https://*.googleusercontent.com https://*.google.com/ https://*.gstatic.com; font-src 'self' https://assets.khoj.dev https://fonts.gstatic.com; child-src 'none'; object-src 'none';"/><meta http-equiv="Content-Security-Policy" content="default-src 'self' https://assets.khoj.dev; script-src 'self' https://assets.khoj.dev 'unsafe-inline' 'unsafe-eval'; connect-src 'self' blob: https://ipapi.co/json ws://localhost:42110; style-src 'self' https://assets.khoj.dev 'unsafe-inline' https://fonts.googleapis.com; img-src 'self' data: blob: https://*.khoj.dev https://*.googleusercontent.com https://*.google.com/ https://*.gstatic.com; font-src 'self' https://assets.khoj.dev https://fonts.gstatic.com; child-src 'none'; object-src 'none';"/><title>Khoj AI - Chat</title><meta name="description" content="Use this page to view a chat with Khoj AI."/><link rel="manifest" href="/static/khoj.webmanifest" crossorigin="use-credentials"/><meta property="og:title" content="Khoj AI"/><meta property="og:description" content="Your Second Brain."/><meta property="og:url" content="https://app.khoj.dev/"/><meta property="og:site_name" content="Khoj AI"/><meta property="og:image" content="https://assets.khoj.dev/khoj_lantern_256x256.png"/><meta property="og:image:width" content="256"/><meta property="og:image:height" content="256"/><meta property="og:image" content="https://assets.khoj.dev/khoj_lantern_logomarktype_1200x630.png"/><meta property="og:image:width" content="1200"/><meta property="og:image:height" content="630"/><meta property="og:type" content="website"/><meta name="twitter:card" content="summary_large_image"/><meta name="twitter:title" content="Khoj AI"/><meta name="twitter:description" content="Your Second Brain."/><meta name="twitter:image" content="https://assets.khoj.dev/khoj_lantern_256x256.png"/><meta name="twitter:image:width" content="256"/><meta name="twitter:image:height" content="256"/><meta name="twitter:image" content="https://assets.khoj.dev/khoj_lantern_logomarktype_1200x630.png"/><meta name="twitter:image:width" content="1200"/><meta name="twitter:image:height" content="630"/><link rel="icon" href="/static/assets/icons/khoj_lantern.ico"/><link rel="apple-touch-icon" href="/static/assets/icons/khoj_lantern_256x256.png"/><meta name="next-size-adjust"/><script src="/_next/static/chunks/polyfills-78c92fac7aa8fdd8.js" noModule=""></script></head><body><html lang="en" class="__variable_a693a0 __variable_702545"><body><div class="bg-background opacity-50 flex items-center justify-center h-screen"><div>Loading<!-- --> <span><svg xmlns="http://www.w3.org/2000/svg" width="1em" height="1em" fill="currentColor" viewBox="0 0 256 256" class="inline animate-spin h-5 w-5"><path d="M232,128a104,104,0,0,1-208,0c0-41,23.81-78.36,60.66-95.27a8,8,0,0,1,6.68,14.54C60.15,61.59,40,93.27,40,128a88,88,0,0,0,176,0c0-34.73-20.15-66.41-51.34-80.73a8,8,0,0,1,6.68-14.54C208.19,49.64,232,87,232,128Z"></path></svg></span></div></div><script>window.EXCALIDRAW_ASSET_PATH = 'https://assets.khoj.dev/@excalidraw/excalidraw/dist/';</script><script src="/_next/static/chunks/webpack-64477b5a1e621214.js" async=""></script></body></html><script>(self.__next_f=self.__next_f||[]).push([0]);self.__next_f.push([2,null])</script><script>self.__next_f.push([1,"1:HL[\"/_next/static/media/5455839c73f146e7-s.p.woff2\",\"font\",{\"crossOrigin\":\"\",\"type\":\"font/woff2\"}]\n2:HL[\"/_next/static/media/5984b96ba4822821-s.p.woff2\",\"font\",{\"crossOrigin\":\"\",\"type\":\"font/woff2\"}]\n3:HL[\"/_next/static/media/684adc3dde1b03f1-s.p.woff2\",\"font\",{\"crossOrigin\":\"\",\"type\":\"font/woff2\"}]\n4:HL[\"/_next/static/media/82e3b9a1bdaf0c26-s.p.woff2\",\"font\",{\"crossOrigin\":\"\",\"type\":\"font/woff2\"}]\n5:HL[\"/_next/static/media/8d1ea331386a0db8-s.p.woff2\",\"font\",{\"crossOrigin\":\"\",\"type\":\"font/woff2\"}]\n6:HL[\"/_next/static/media/b98b13dbc1c3b59c-s.p.woff2\",\"font\",{\"crossOrigin\":\"\",\"type\":\"font/woff2\"}]\n7:HL[\"/_next/static/media/e098aaaecc9cfbb2-s.p.woff2\",\"font\",{\"crossOrigin\":\"\",\"type\":\"font/woff2\"}]\n8:HL[\"/_next/static/css/bedf49fbfc598358.css\",\"style\"]\n9:HL[\"/_next/static/css/3c34171b174cc381.css\",\"style\"]\na:HL[\"/_next/static/css/3cf13271869a4aeb.css\",\"style\"]\nb:HL[\"/_next/static/css/9d45de78fba367c1.css\",\"style\"]\nc:HL[\"/_next/static/css/1f293605f2871853.css\",\"style\"]\n"])</script><script>self.__next_f.push([1,"d:I[95751,[],\"\"]\nf:I[66513,[],\"ClientPageRoot\"]\n10:I[5506,[\"3954\",\"static/chunks/d3ac728e-a9e3522eef9b6b28.js\",\"3072\",\"static/chunks/3072-be830e4f8412b9d2.js\",\"4752\",\"static/chunks/4752-554a3db270186ce3.js\",\"7592\",\"static/chunks/7592-a09c39a38e60634b.js\",\"3690\",\"static/chunks/3690-51312931ba1eae30.js\",\"3463\",\"static/chunks/3463-081c031e873b7966.js\",\"1603\",\"static/chunks/1603-c68d44bc4ae6039a.js\",\"8423\",\"static/chunks/8423-1dda16bc56236523.js\",\"5538\",\"static/chunks/5538-e5f3c9f4d67a64b9.js\",\"3111\",\"static/chunks/app/share/chat/page-0b8d90dc57dbc1d8.js\"],\"default\",1]\n11:I[39275,[],\"\"]\n12:I[61343,[],\"\"]\n14:I[76130,[],\"\"]\n15:[]\n"])</script><script>self.__next_f.push([1,"0:[\"$\",\"$Ld\",null,{\"buildId\":\"X8lPgmtHPY-a6sH5qx8z9\",\"assetPrefix\":\"\",\"urlParts\":[\"\",\"share\",\"chat\",\"\"],\"initialTree\":[\"\",{\"children\":[\"share\",{\"children\":[\"chat\",{\"children\":[\"__PAGE__\",{}]}]}]},\"$undefined\",\"$undefined\",true],\"initialSeedData\":[\"\",{\"children\":[\"share\",{\"children\":[\"chat\",{\"children\":[\"__PAGE__\",{},[[\"$Le\",[\"$\",\"$Lf\",null,{\"props\":{\"params\":{},\"searchParams\":{}},\"Component\":\"$10\"}],[[\"$\",\"link\",\"0\",{\"rel\":\"stylesheet\",\"href\":\"/_next/static/css/3cf13271869a4aeb.css\",\"precedence\":\"next\",\"crossOrigin\":\"$undefined\"}],[\"$\",\"link\",\"1\",{\"rel\":\"stylesheet\",\"href\":\"/_next/static/css/9d45de78fba367c1.css\",\"precedence\":\"next\",\"crossOrigin\":\"$undefined\"}],[\"$\",\"link\",\"2\",{\"rel\":\"stylesheet\",\"href\":\"/_next/static/css/1f293605f2871853.css\",\"precedence\":\"next\",\"crossOrigin\":\"$undefined\"}]]],null],null]},[[null,[\"$\",\"html\",null,{\"lang\":\"en\",\"className\":\"__variable_a693a0 __variable_702545\",\"children\":[[\"$\",\"meta\",null,{\"httpEquiv\":\"Content-Security-Policy\",\"content\":\"default-src 'self' https://assets.khoj.dev; script-src 'self' https://assets.khoj.dev 'unsafe-inline' 'unsafe-eval'; connect-src 'self' blob: https://ipapi.co/json ws://localhost:42110; style-src 'self' https://assets.khoj.dev 'unsafe-inline' https://fonts.googleapis.com; img-src 'self' data: blob: https://*.khoj.dev https://*.googleusercontent.com https://*.google.com/ https://*.gstatic.com; font-src 'self' https://assets.khoj.dev https://fonts.gstatic.com; child-src 'none'; object-src 'none';\"}],[\"$\",\"body\",null,{\"children\":[[\"$\",\"$L11\",null,{\"parallelRouterKey\":\"children\",\"segmentPath\":[\"children\",\"share\",\"children\",\"chat\",\"children\"],\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"errorScripts\":\"$undefined\",\"template\":[\"$\",\"$L12\",null,{}],\"templateStyles\":\"$undefined\",\"templateScripts\":\"$undefined\",\"notFound\":\"$undefined\",\"notFoundStyles\":\"$undefined\"}],[\"$\",\"script\",null,{\"dangerouslySetInnerHTML\":{\"__html\":\"window.EXCALIDRAW_ASSET_PATH = 'https://assets.khoj.dev/@excalidraw/excalidraw/dist/';\"}}]]}]]}]],null],null]},[null,[\"$\",\"$L11\",null,{\"parallelRouterKey\":\"children\",\"segmentPath\":[\"children\",\"share\",\"children\"],\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"errorScripts\":\"$undefined\",\"template\":[\"$\",\"$L12\",null,{}],\"templateStyles\":\"$undefined\",\"templateScripts\":\"$undefined\",\"notFound\":\"$undefined\",\"notFoundStyles\":\"$undefined\"}]],null]},[[[[\"$\",\"link\",\"0\",{\"rel\":\"stylesheet\",\"href\":\"/_next/static/css/bedf49fbfc598358.css\",\"precedence\":\"next\",\"crossOrigin\":\"$undefined\"}],[\"$\",\"link\",\"1\",{\"rel\":\"stylesheet\",\"href\":\"/_next/static/css/3c34171b174cc381.css\",\"precedence\":\"next\",\"crossOrigin\":\"$undefined\"}]],[\"$\",\"html\",null,{\"lang\":\"en\",\"className\":\"__variable_a693a0 __variable_702545\",\"children\":[[\"$\",\"meta\",null,{\"httpEquiv\":\"Content-Security-Policy\",\"content\":\"default-src 'self' https://assets.khoj.dev; media-src * blob:; script-src 'self' https://assets.khoj.dev 'unsafe-inline' 'unsafe-eval'; connect-src 'self' blob: https://ipapi.co/json ws://localhost:42110; style-src 'self' https://assets.khoj.dev 'unsafe-inline' https://fonts.googleapis.com; img-src 'self' data: blob: https://*.khoj.dev https://*.googleusercontent.com https://*.google.com/ https://*.gstatic.com; font-src 'self' https://assets.khoj.dev https://fonts.gstatic.com; child-src 'none'; object-src 'none';\"}],[\"$\",\"body\",null,{\"children\":[\"$\",\"$L11\",null,{\"parallelRouterKey\":\"children\",\"segmentPath\":[\"children\"],\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"errorScripts\":\"$undefined\",\"template\":[\"$\",\"$L12\",null,{}],\"templateStyles\":\"$undefined\",\"templateScripts\":\"$undefined\",\"notFound\":[[\"$\",\"title\",null,{\"children\":\"404: This page could not be found.\"}],[\"$\",\"div\",null,{\"style\":{\"fontFamily\":\"system-ui,\\\"Segoe UI\\\",Roboto,Helvetica,Arial,sans-serif,\\\"Apple Color Emoji\\\",\\\"Segoe UI Emoji\\\"\",\"height\":\"100vh\",\"textAlign\":\"center\",\"display\":\"flex\",\"flexDirection\":\"column\",\"alignItems\":\"center\",\"justifyContent\":\"center\"},\"children\":[\"$\",\"div\",null,{\"children\":[[\"$\",\"style\",null,{\"dangerouslySetInnerHTML\":{\"__html\":\"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}\"}}],[\"$\",\"h1\",null,{\"className\":\"next-error-h1\",\"style\":{\"display\":\"inline-block\",\"margin\":\"0 20px 0 0\",\"padding\":\"0 23px 0 0\",\"fontSize\":24,\"fontWeight\":500,\"verticalAlign\":\"top\",\"lineHeight\":\"49px\"},\"children\":\"404\"}],[\"$\",\"div\",null,{\"style\":{\"display\":\"inline-block\"},\"children\":[\"$\",\"h2\",null,{\"style\":{\"fontSize\":14,\"fontWeight\":400,\"lineHeight\":\"49px\",\"margin\":0},\"children\":\"This page could not be found.\"}]}]]}]}]],\"notFoundStyles\":[]}]}]]}]],null],null],\"couldBeIntercepted\":false,\"initialHead\":[null,\"$L13\"],\"globalErrorComponent\":\"$14\",\"missingSlots\":\"$W15\"}]\n"])</script><script>self.__next_f.push([1,"13:[[\"$\",\"meta\",\"0\",{\"name\":\"viewport\",\"content\":\"width=device-width, initial-scale=1\"}],[\"$\",\"meta\",\"1\",{\"charSet\":\"utf-8\"}],[\"$\",\"title\",\"2\",{\"children\":\"Khoj AI - Chat\"}],[\"$\",\"meta\",\"3\",{\"name\":\"description\",\"content\":\"Use this page to view a chat with Khoj AI.\"}],[\"$\",\"link\",\"4\",{\"rel\":\"manifest\",\"href\":\"/static/khoj.webmanifest\",\"crossOrigin\":\"use-credentials\"}],[\"$\",\"meta\",\"5\",{\"property\":\"og:title\",\"content\":\"Khoj AI\"}],[\"$\",\"meta\",\"6\",{\"property\":\"og:description\",\"content\":\"Your Second Brain.\"}],[\"$\",\"meta\",\"7\",{\"property\":\"og:url\",\"content\":\"https://app.khoj.dev/\"}],[\"$\",\"meta\",\"8\",{\"property\":\"og:site_name\",\"content\":\"Khoj AI\"}],[\"$\",\"meta\",\"9\",{\"property\":\"og:image\",\"content\":\"https://assets.khoj.dev/khoj_lantern_256x256.png\"}],[\"$\",\"meta\",\"10\",{\"property\":\"og:image:width\",\"content\":\"256\"}],[\"$\",\"meta\",\"11\",{\"property\":\"og:image:height\",\"content\":\"256\"}],[\"$\",\"meta\",\"12\",{\"property\":\"og:image\",\"content\":\"https://assets.khoj.dev/khoj_lantern_logomarktype_1200x630.png\"}],[\"$\",\"meta\",\"13\",{\"property\":\"og:image:width\",\"content\":\"1200\"}],[\"$\",\"meta\",\"14\",{\"property\":\"og:image:height\",\"content\":\"630\"}],[\"$\",\"meta\",\"15\",{\"property\":\"og:type\",\"content\":\"website\"}],[\"$\",\"meta\",\"16\",{\"name\":\"twitter:card\",\"content\":\"summary_large_image\"}],[\"$\",\"meta\",\"17\",{\"name\":\"twitter:title\",\"content\":\"Khoj AI\"}],[\"$\",\"meta\",\"18\",{\"name\":\"twitter:description\",\"content\":\"Your Second Brain.\"}],[\"$\",\"meta\",\"19\",{\"name\":\"twitter:image\",\"content\":\"https://assets.khoj.dev/khoj_lantern_256x256.png\"}],[\"$\",\"meta\",\"20\",{\"name\":\"twitter:image:width\",\"content\":\"256\"}],[\"$\",\"meta\",\"21\",{\"name\":\"twitter:image:height\",\"content\":\"256\"}],[\"$\",\"meta\",\"22\",{\"name\":\"twitter:image\",\"content\":\"https://assets.khoj.dev/khoj_lantern_logomarktype_1200x630.png\"}],[\"$\",\"meta\",\"23\",{\"name\":\"twitter:image:width\",\"content\":\"1200\"}],[\"$\",\"meta\",\"24\",{\"name\":\"twitter:image:height\",\"content\":\"630\"}],[\"$\",\"link\",\"25\",{\"rel\":\"icon\",\"href\":\"/static/assets/icons/khoj_lantern.ico\"}],[\"$\",\"link\",\"26\",{\"rel\":\"apple-touch-icon\",\"href\":\"/static/assets/icons/khoj_lantern_256x256.png\"}],[\"$\",\"meta\",\"27\",{\"name\":\"next-size-adjust\"}]]\n"])</script><script>self.__next_f.push([1,"e:null\n"])</script></body></html>
|
@@ -1,7 +1,7 @@
|
|
1
1
|
2:I[66513,[],"ClientPageRoot"]
|
2
|
-
3:I[5506,["3954","static/chunks/d3ac728e-a9e3522eef9b6b28.js","3072","static/chunks/3072-be830e4f8412b9d2.js","
|
2
|
+
3:I[5506,["3954","static/chunks/d3ac728e-a9e3522eef9b6b28.js","3072","static/chunks/3072-be830e4f8412b9d2.js","4752","static/chunks/4752-554a3db270186ce3.js","7592","static/chunks/7592-a09c39a38e60634b.js","3690","static/chunks/3690-51312931ba1eae30.js","3463","static/chunks/3463-081c031e873b7966.js","1603","static/chunks/1603-c68d44bc4ae6039a.js","8423","static/chunks/8423-1dda16bc56236523.js","5538","static/chunks/5538-e5f3c9f4d67a64b9.js","3111","static/chunks/app/share/chat/page-0b8d90dc57dbc1d8.js"],"default",1]
|
3
3
|
4:I[39275,[],""]
|
4
4
|
5:I[61343,[],""]
|
5
|
-
0:["
|
5
|
+
0:["X8lPgmtHPY-a6sH5qx8z9",[[["",{"children":["share",{"children":["chat",{"children":["__PAGE__",{}]}]}]},"$undefined","$undefined",true],["",{"children":["share",{"children":["chat",{"children":["__PAGE__",{},[["$L1",["$","$L2",null,{"props":{"params":{},"searchParams":{}},"Component":"$3"}],[["$","link","0",{"rel":"stylesheet","href":"/_next/static/css/3cf13271869a4aeb.css","precedence":"next","crossOrigin":"$undefined"}],["$","link","1",{"rel":"stylesheet","href":"/_next/static/css/9d45de78fba367c1.css","precedence":"next","crossOrigin":"$undefined"}],["$","link","2",{"rel":"stylesheet","href":"/_next/static/css/1f293605f2871853.css","precedence":"next","crossOrigin":"$undefined"}]]],null],null]},[[null,["$","html",null,{"lang":"en","className":"__variable_a693a0 __variable_702545","children":[["$","meta",null,{"httpEquiv":"Content-Security-Policy","content":"default-src 'self' https://assets.khoj.dev; script-src 'self' https://assets.khoj.dev 'unsafe-inline' 'unsafe-eval'; connect-src 'self' blob: https://ipapi.co/json ws://localhost:42110; style-src 'self' https://assets.khoj.dev 'unsafe-inline' https://fonts.googleapis.com; img-src 'self' data: blob: https://*.khoj.dev https://*.googleusercontent.com https://*.google.com/ https://*.gstatic.com; font-src 'self' https://assets.khoj.dev https://fonts.gstatic.com; child-src 'none'; object-src 'none';"}],["$","body",null,{"children":[["$","$L4",null,{"parallelRouterKey":"children","segmentPath":["children","share","children","chat","children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","notFoundStyles":"$undefined"}],["$","script",null,{"dangerouslySetInnerHTML":{"__html":"window.EXCALIDRAW_ASSET_PATH = 'https://assets.khoj.dev/@excalidraw/excalidraw/dist/';"}}]]}]]}]],null],null]},[null,["$","$L4",null,{"parallelRouterKey":"children","segmentPath":["children","share","children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","notFoundStyles":"$undefined"}]],null]},[[[["$","link","0",{"rel":"stylesheet","href":"/_next/static/css/bedf49fbfc598358.css","precedence":"next","crossOrigin":"$undefined"}],["$","link","1",{"rel":"stylesheet","href":"/_next/static/css/3c34171b174cc381.css","precedence":"next","crossOrigin":"$undefined"}]],["$","html",null,{"lang":"en","className":"__variable_a693a0 __variable_702545","children":[["$","meta",null,{"httpEquiv":"Content-Security-Policy","content":"default-src 'self' https://assets.khoj.dev; media-src * blob:; script-src 'self' https://assets.khoj.dev 'unsafe-inline' 'unsafe-eval'; connect-src 'self' blob: https://ipapi.co/json ws://localhost:42110; style-src 'self' https://assets.khoj.dev 'unsafe-inline' https://fonts.googleapis.com; img-src 'self' data: blob: https://*.khoj.dev https://*.googleusercontent.com https://*.google.com/ https://*.gstatic.com; font-src 'self' https://assets.khoj.dev https://fonts.gstatic.com; child-src 'none'; object-src 'none';"}],["$","body",null,{"children":["$","$L4",null,{"parallelRouterKey":"children","segmentPath":["children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":[["$","title",null,{"children":"404: This page could not be found."}],["$","div",null,{"style":{"fontFamily":"system-ui,\"Segoe UI\",Roboto,Helvetica,Arial,sans-serif,\"Apple Color Emoji\",\"Segoe UI Emoji\"","height":"100vh","textAlign":"center","display":"flex","flexDirection":"column","alignItems":"center","justifyContent":"center"},"children":["$","div",null,{"children":[["$","style",null,{"dangerouslySetInnerHTML":{"__html":"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}"}}],["$","h1",null,{"className":"next-error-h1","style":{"display":"inline-block","margin":"0 20px 0 0","padding":"0 23px 0 0","fontSize":24,"fontWeight":500,"verticalAlign":"top","lineHeight":"49px"},"children":"404"}],["$","div",null,{"style":{"display":"inline-block"},"children":["$","h2",null,{"style":{"fontSize":14,"fontWeight":400,"lineHeight":"49px","margin":0},"children":"This page could not be found."}]}]]}]}]],"notFoundStyles":[]}]}]]}]],null],null],["$L6",null]]]]
|
6
6
|
6:[["$","meta","0",{"name":"viewport","content":"width=device-width, initial-scale=1"}],["$","meta","1",{"charSet":"utf-8"}],["$","title","2",{"children":"Khoj AI - Chat"}],["$","meta","3",{"name":"description","content":"Use this page to view a chat with Khoj AI."}],["$","link","4",{"rel":"manifest","href":"/static/khoj.webmanifest","crossOrigin":"use-credentials"}],["$","meta","5",{"property":"og:title","content":"Khoj AI"}],["$","meta","6",{"property":"og:description","content":"Your Second Brain."}],["$","meta","7",{"property":"og:url","content":"https://app.khoj.dev/"}],["$","meta","8",{"property":"og:site_name","content":"Khoj AI"}],["$","meta","9",{"property":"og:image","content":"https://assets.khoj.dev/khoj_lantern_256x256.png"}],["$","meta","10",{"property":"og:image:width","content":"256"}],["$","meta","11",{"property":"og:image:height","content":"256"}],["$","meta","12",{"property":"og:image","content":"https://assets.khoj.dev/khoj_lantern_logomarktype_1200x630.png"}],["$","meta","13",{"property":"og:image:width","content":"1200"}],["$","meta","14",{"property":"og:image:height","content":"630"}],["$","meta","15",{"property":"og:type","content":"website"}],["$","meta","16",{"name":"twitter:card","content":"summary_large_image"}],["$","meta","17",{"name":"twitter:title","content":"Khoj AI"}],["$","meta","18",{"name":"twitter:description","content":"Your Second Brain."}],["$","meta","19",{"name":"twitter:image","content":"https://assets.khoj.dev/khoj_lantern_256x256.png"}],["$","meta","20",{"name":"twitter:image:width","content":"256"}],["$","meta","21",{"name":"twitter:image:height","content":"256"}],["$","meta","22",{"name":"twitter:image","content":"https://assets.khoj.dev/khoj_lantern_logomarktype_1200x630.png"}],["$","meta","23",{"name":"twitter:image:width","content":"1200"}],["$","meta","24",{"name":"twitter:image:height","content":"630"}],["$","link","25",{"rel":"icon","href":"/static/assets/icons/khoj_lantern.ico"}],["$","link","26",{"rel":"apple-touch-icon","href":"/static/assets/icons/khoj_lantern_256x256.png"}],["$","meta","27",{"name":"next-size-adjust"}]]
|
7
7
|
1:null
|
@@ -0,0 +1,11 @@
|
|
1
|
+
[{
|
2
|
+
"relation": ["delegate_permission/common.handle_all_urls"],
|
3
|
+
"target": {
|
4
|
+
"namespace": "android_app",
|
5
|
+
"package_name": "dev.khoj.app",
|
6
|
+
"sha256_cert_fingerprints": [
|
7
|
+
"CC:98:4A:0A:F1:CC:84:26:AC:02:86:49:AA:69:64:B9:5E:63:A3:EF:18:56:EA:CA:13:C1:3A:15:CA:49:77:46",
|
8
|
+
"D4:5A:6F:6C:18:28:D2:1C:78:27:92:C6:AC:DB:4C:12:C4:52:A1:88:9B:A1:F5:67:D1:22:FE:A0:0F:B1:AE:92"
|
9
|
+
]
|
10
|
+
}
|
11
|
+
}]
|
khoj/main.py
CHANGED
@@ -208,6 +208,9 @@ def set_state(args):
|
|
208
208
|
state.verbose = args.verbose
|
209
209
|
state.host = args.host
|
210
210
|
state.port = args.port
|
211
|
+
state.ssl_config = (
|
212
|
+
{"ssl_certfile": args.sslcert, "ssl_keyfile": args.sslkey} if args.sslcert and args.sslkey else None
|
213
|
+
)
|
211
214
|
state.anonymous_mode = args.anonymous_mode
|
212
215
|
state.khoj_version = version("khoj")
|
213
216
|
state.chat_on_gpu = args.chat_on_gpu
|
@@ -226,6 +229,7 @@ def start_server(app, host=None, port=None, socket=None):
|
|
226
229
|
use_colors=True,
|
227
230
|
log_config=None,
|
228
231
|
timeout_keep_alive=60,
|
232
|
+
**state.ssl_config if state.ssl_config else {},
|
229
233
|
)
|
230
234
|
logger.info("🌒 Stopping Khoj")
|
231
235
|
|
@@ -19,7 +19,11 @@ from khoj.processor.conversation.utils import (
|
|
19
19
|
generate_chatml_messages_with_context,
|
20
20
|
messages_to_print,
|
21
21
|
)
|
22
|
-
from khoj.utils.helpers import
|
22
|
+
from khoj.utils.helpers import (
|
23
|
+
ConversationCommand,
|
24
|
+
is_none_or_empty,
|
25
|
+
truncate_code_context,
|
26
|
+
)
|
23
27
|
from khoj.utils.rawconfig import LocationData
|
24
28
|
from khoj.utils.yaml import yaml_dump
|
25
29
|
|
@@ -197,7 +201,9 @@ def converse_anthropic(
|
|
197
201
|
if ConversationCommand.Online in conversation_commands or ConversationCommand.Webpage in conversation_commands:
|
198
202
|
context_message += f"{prompts.online_search_conversation.format(online_results=yaml_dump(online_results))}\n\n"
|
199
203
|
if ConversationCommand.Code in conversation_commands and not is_none_or_empty(code_results):
|
200
|
-
context_message +=
|
204
|
+
context_message += (
|
205
|
+
f"{prompts.code_executed_context.format(code_results=truncate_code_context(code_results))}\n\n"
|
206
|
+
)
|
201
207
|
context_message = context_message.strip()
|
202
208
|
|
203
209
|
# Setup Prompt with Primer or Conversation History
|
@@ -18,7 +18,12 @@ from khoj.processor.conversation.utils import (
|
|
18
18
|
get_image_from_url,
|
19
19
|
)
|
20
20
|
from khoj.utils import state
|
21
|
-
from khoj.utils.helpers import
|
21
|
+
from khoj.utils.helpers import (
|
22
|
+
get_chat_usage_metrics,
|
23
|
+
in_debug_mode,
|
24
|
+
is_none_or_empty,
|
25
|
+
is_promptrace_enabled,
|
26
|
+
)
|
22
27
|
|
23
28
|
logger = logging.getLogger(__name__)
|
24
29
|
|
@@ -84,7 +89,7 @@ def anthropic_completion_with_backoff(
|
|
84
89
|
# Save conversation trace
|
85
90
|
tracer["chat_model"] = model_name
|
86
91
|
tracer["temperature"] = temperature
|
87
|
-
if
|
92
|
+
if is_promptrace_enabled():
|
88
93
|
commit_conversation_trace(messages, aggregated_response, tracer)
|
89
94
|
|
90
95
|
return aggregated_response
|
@@ -156,7 +161,7 @@ def anthropic_llm_thread(
|
|
156
161
|
# Save conversation trace
|
157
162
|
tracer["chat_model"] = model_name
|
158
163
|
tracer["temperature"] = temperature
|
159
|
-
if
|
164
|
+
if is_promptrace_enabled():
|
160
165
|
commit_conversation_trace(messages, aggregated_response, tracer)
|
161
166
|
except Exception as e:
|
162
167
|
logger.error(f"Error in anthropic_llm_thread: {e}", exc_info=True)
|
@@ -19,7 +19,11 @@ from khoj.processor.conversation.utils import (
|
|
19
19
|
generate_chatml_messages_with_context,
|
20
20
|
messages_to_print,
|
21
21
|
)
|
22
|
-
from khoj.utils.helpers import
|
22
|
+
from khoj.utils.helpers import (
|
23
|
+
ConversationCommand,
|
24
|
+
is_none_or_empty,
|
25
|
+
truncate_code_context,
|
26
|
+
)
|
23
27
|
from khoj.utils.rawconfig import LocationData
|
24
28
|
from khoj.utils.yaml import yaml_dump
|
25
29
|
|
@@ -208,7 +212,9 @@ def converse_gemini(
|
|
208
212
|
if ConversationCommand.Online in conversation_commands or ConversationCommand.Webpage in conversation_commands:
|
209
213
|
context_message += f"{prompts.online_search_conversation.format(online_results=yaml_dump(online_results))}\n\n"
|
210
214
|
if ConversationCommand.Code in conversation_commands and not is_none_or_empty(code_results):
|
211
|
-
context_message +=
|
215
|
+
context_message += (
|
216
|
+
f"{prompts.code_executed_context.format(code_results=truncate_code_context(code_results))}\n\n"
|
217
|
+
)
|
212
218
|
context_message = context_message.strip()
|
213
219
|
|
214
220
|
# Setup Prompt with Primer or Conversation History
|
@@ -25,7 +25,12 @@ from khoj.processor.conversation.utils import (
|
|
25
25
|
get_image_from_url,
|
26
26
|
)
|
27
27
|
from khoj.utils import state
|
28
|
-
from khoj.utils.helpers import
|
28
|
+
from khoj.utils.helpers import (
|
29
|
+
get_chat_usage_metrics,
|
30
|
+
in_debug_mode,
|
31
|
+
is_none_or_empty,
|
32
|
+
is_promptrace_enabled,
|
33
|
+
)
|
29
34
|
|
30
35
|
logger = logging.getLogger(__name__)
|
31
36
|
|
@@ -84,7 +89,7 @@ def gemini_completion_with_backoff(
|
|
84
89
|
# Save conversation trace
|
85
90
|
tracer["chat_model"] = model_name
|
86
91
|
tracer["temperature"] = temperature
|
87
|
-
if
|
92
|
+
if is_promptrace_enabled():
|
88
93
|
commit_conversation_trace(messages, response_text, tracer)
|
89
94
|
|
90
95
|
return response_text
|
@@ -160,7 +165,7 @@ def gemini_llm_thread(
|
|
160
165
|
# Save conversation trace
|
161
166
|
tracer["chat_model"] = model_name
|
162
167
|
tracer["temperature"] = temperature
|
163
|
-
if
|
168
|
+
if is_promptrace_enabled():
|
164
169
|
commit_conversation_trace(messages, aggregated_response, tracer)
|
165
170
|
except StopCandidateException as e:
|
166
171
|
logger.warning(
|
@@ -19,7 +19,13 @@ from khoj.processor.conversation.utils import (
|
|
19
19
|
)
|
20
20
|
from khoj.utils import state
|
21
21
|
from khoj.utils.constants import empty_escape_sequences
|
22
|
-
from khoj.utils.helpers import
|
22
|
+
from khoj.utils.helpers import (
|
23
|
+
ConversationCommand,
|
24
|
+
in_debug_mode,
|
25
|
+
is_none_or_empty,
|
26
|
+
is_promptrace_enabled,
|
27
|
+
truncate_code_context,
|
28
|
+
)
|
23
29
|
from khoj.utils.rawconfig import LocationData
|
24
30
|
from khoj.utils.yaml import yaml_dump
|
25
31
|
|
@@ -206,7 +212,9 @@ def converse_offline(
|
|
206
212
|
|
207
213
|
context_message += f"{prompts.online_search_conversation_offline.format(online_results=yaml_dump(simplified_online_results))}\n\n"
|
208
214
|
if ConversationCommand.Code in conversation_commands and not is_none_or_empty(code_results):
|
209
|
-
context_message +=
|
215
|
+
context_message += (
|
216
|
+
f"{prompts.code_executed_context.format(code_results=truncate_code_context(code_results))}\n\n"
|
217
|
+
)
|
210
218
|
context_message = context_message.strip()
|
211
219
|
|
212
220
|
# Setup Prompt with Primer or Conversation History
|
@@ -246,7 +254,7 @@ def llm_thread(g, messages: List[ChatMessage], model: Any, max_prompt_size: int
|
|
246
254
|
g.send(response_delta)
|
247
255
|
|
248
256
|
# Save conversation trace
|
249
|
-
if
|
257
|
+
if is_promptrace_enabled():
|
250
258
|
commit_conversation_trace(messages, aggregated_response, tracer)
|
251
259
|
|
252
260
|
finally:
|
@@ -287,7 +295,7 @@ def send_message_to_model_offline(
|
|
287
295
|
# Streamed responses need to be saved by the calling function
|
288
296
|
tracer["chat_model"] = model
|
289
297
|
tracer["temperature"] = temperature
|
290
|
-
if
|
298
|
+
if is_promptrace_enabled():
|
291
299
|
commit_conversation_trace(messages, response_text, tracer)
|
292
300
|
|
293
301
|
return response_text
|
@@ -17,7 +17,11 @@ from khoj.processor.conversation.utils import (
|
|
17
17
|
generate_chatml_messages_with_context,
|
18
18
|
messages_to_print,
|
19
19
|
)
|
20
|
-
from khoj.utils.helpers import
|
20
|
+
from khoj.utils.helpers import (
|
21
|
+
ConversationCommand,
|
22
|
+
is_none_or_empty,
|
23
|
+
truncate_code_context,
|
24
|
+
)
|
21
25
|
from khoj.utils.rawconfig import LocationData
|
22
26
|
from khoj.utils.yaml import yaml_dump
|
23
27
|
|
@@ -196,7 +200,10 @@ def converse(
|
|
196
200
|
if not is_none_or_empty(online_results):
|
197
201
|
context_message += f"{prompts.online_search_conversation.format(online_results=yaml_dump(online_results))}\n\n"
|
198
202
|
if not is_none_or_empty(code_results):
|
199
|
-
context_message +=
|
203
|
+
context_message += (
|
204
|
+
f"{prompts.code_executed_context.format(code_results=truncate_code_context(code_results))}\n\n"
|
205
|
+
)
|
206
|
+
|
200
207
|
context_message = context_message.strip()
|
201
208
|
|
202
209
|
# Setup Prompt with Primer or Conversation History
|
@@ -20,7 +20,11 @@ from khoj.processor.conversation.utils import (
|
|
20
20
|
commit_conversation_trace,
|
21
21
|
)
|
22
22
|
from khoj.utils import state
|
23
|
-
from khoj.utils.helpers import
|
23
|
+
from khoj.utils.helpers import (
|
24
|
+
get_chat_usage_metrics,
|
25
|
+
in_debug_mode,
|
26
|
+
is_promptrace_enabled,
|
27
|
+
)
|
24
28
|
|
25
29
|
logger = logging.getLogger(__name__)
|
26
30
|
|
@@ -97,7 +101,7 @@ def completion_with_backoff(
|
|
97
101
|
# Save conversation trace
|
98
102
|
tracer["chat_model"] = model
|
99
103
|
tracer["temperature"] = temperature
|
100
|
-
if
|
104
|
+
if is_promptrace_enabled():
|
101
105
|
commit_conversation_trace(messages, aggregated_response, tracer)
|
102
106
|
|
103
107
|
return aggregated_response
|
@@ -208,7 +212,7 @@ def llm_thread(
|
|
208
212
|
# Save conversation trace
|
209
213
|
tracer["chat_model"] = model_name
|
210
214
|
tracer["temperature"] = temperature
|
211
|
-
if
|
215
|
+
if is_promptrace_enabled():
|
212
216
|
commit_conversation_trace(messages, aggregated_response, tracer)
|
213
217
|
except Exception as e:
|
214
218
|
logger.error(f"Error in llm_thread: {e}", exc_info=True)
|
@@ -11,11 +11,9 @@ You were created by Khoj Inc. with the following capabilities:
|
|
11
11
|
- You *CAN REMEMBER ALL NOTES and PERSONAL INFORMATION FOREVER* that the user ever shares with you.
|
12
12
|
- Users can share files and other information with you using the Khoj Desktop, Obsidian or Emacs app. They can also drag and drop their files into the chat window.
|
13
13
|
- You *CAN* generate images, look-up real-time information from the internet, set reminders and answer questions based on the user's notes.
|
14
|
-
- Say "I don't know" or "I don't understand" if you don't know what to say or if you don't know the answer to a question.
|
15
14
|
- Make sure to use the specific LaTeX math mode delimiters for your response. LaTex math mode specific delimiters as following
|
16
15
|
- inline math mode : \\( and \\)
|
17
16
|
- display math mode: insert linebreak after opening $$, \\[ and before closing $$, \\]
|
18
|
-
- Ask crisp follow-up questions to get additional context, when the answer cannot be inferred from the provided notes or past conversations.
|
19
17
|
- Sometimes the user will share personal information that needs to be remembered, like an account ID or a residential address. These can be acknowledged with a simple "Got it" or "Okay".
|
20
18
|
- Provide inline references to quotes from the user's notes or any web pages you refer to in your responses in markdown format. For example, "The farmer had ten sheep. [1](https://example.com)". *ALWAYS CITE YOUR SOURCES AND PROVIDE REFERENCES*. Add them inline to directly support your claim.
|
21
19
|
|
@@ -32,11 +30,9 @@ You were created by Khoj Inc. with the following capabilities:
|
|
32
30
|
|
33
31
|
- You *CAN REMEMBER ALL NOTES and PERSONAL INFORMATION FOREVER* that the user ever shares with you.
|
34
32
|
- Users can share files and other information with you using the Khoj Desktop, Obsidian or Emacs app. They can also drag and drop their files into the chat window.
|
35
|
-
- Say "I don't know" or "I don't understand" if you don't know what to say or if you don't know the answer to a question.
|
36
33
|
- Make sure to use the specific LaTeX math mode delimiters for your response. LaTex math mode specific delimiters as following
|
37
34
|
- inline math mode : `\\(` and `\\)`
|
38
35
|
- display math mode: insert linebreak after opening `$$`, `\\[` and before closing `$$`, `\\]`
|
39
|
-
- Ask crisp follow-up questions to get additional context, when the answer cannot be inferred from the provided notes or past conversations.
|
40
36
|
- Sometimes the user will share personal information that needs to be remembered, like an account ID or a residential address. These can be acknowledged with a simple "Got it" or "Okay".
|
41
37
|
|
42
38
|
Today is {day_of_week}, {current_date} in UTC.
|
@@ -50,6 +46,10 @@ Instructions:\n{bio}
|
|
50
46
|
gemini_verbose_language_personality = """
|
51
47
|
All questions should be answered comprehensively with details, unless the user requests a concise response specifically.
|
52
48
|
Respond in the same language as the query. Use markdown to format your responses.
|
49
|
+
|
50
|
+
You *must* always make a best effort, helpful response to answer the user's question with the information you have. You may ask necessary, limited follow-up questions to clarify the user's intent.
|
51
|
+
|
52
|
+
You must always provide a response to the user's query, even if imperfect. Do the best with the information you have, without relying on follow-up questions.
|
53
53
|
""".strip()
|
54
54
|
|
55
55
|
## General Conversation
|
@@ -34,6 +34,7 @@ from khoj.utils.helpers import (
|
|
34
34
|
ConversationCommand,
|
35
35
|
in_debug_mode,
|
36
36
|
is_none_or_empty,
|
37
|
+
is_promptrace_enabled,
|
37
38
|
merge_dicts,
|
38
39
|
)
|
39
40
|
from khoj.utils.rawconfig import FileAttachment
|
@@ -292,7 +293,7 @@ def save_to_conversation_log(
|
|
292
293
|
user_message=q,
|
293
294
|
)
|
294
295
|
|
295
|
-
if
|
296
|
+
if is_promptrace_enabled():
|
296
297
|
merge_message_into_conversation_trace(q, chat_response, tracer)
|
297
298
|
|
298
299
|
logger.info(
|
@@ -591,7 +592,7 @@ def commit_conversation_trace(
|
|
591
592
|
return None
|
592
593
|
|
593
594
|
# Infer repository path from environment variable or provided path
|
594
|
-
repo_path = repo_path
|
595
|
+
repo_path = repo_path if not is_none_or_empty(repo_path) else os.getenv("PROMPTRACE_DIR")
|
595
596
|
if not repo_path:
|
596
597
|
return None
|
597
598
|
|
@@ -686,7 +687,7 @@ Metadata
|
|
686
687
|
return None
|
687
688
|
|
688
689
|
|
689
|
-
def merge_message_into_conversation_trace(query: str, response: str, tracer: dict, repo_path=
|
690
|
+
def merge_message_into_conversation_trace(query: str, response: str, tracer: dict, repo_path=None) -> bool:
|
690
691
|
"""
|
691
692
|
Merge the message branch into its parent conversation branch.
|
692
693
|
|
@@ -709,7 +710,9 @@ def merge_message_into_conversation_trace(query: str, response: str, tracer: dic
|
|
709
710
|
conv_branch = f"c_{tracer['cid']}"
|
710
711
|
|
711
712
|
# Infer repository path from environment variable or provided path
|
712
|
-
repo_path = os.getenv("PROMPTRACE_DIR"
|
713
|
+
repo_path = repo_path if not is_none_or_empty(repo_path) else os.getenv("PROMPTRACE_DIR")
|
714
|
+
if not repo_path:
|
715
|
+
return None
|
713
716
|
repo = Repo(repo_path)
|
714
717
|
|
715
718
|
# Checkout conversation branch
|
khoj/processor/tools/run_code.py
CHANGED
@@ -1,5 +1,4 @@
|
|
1
1
|
import base64
|
2
|
-
import copy
|
3
2
|
import datetime
|
4
3
|
import json
|
5
4
|
import logging
|
@@ -20,7 +19,7 @@ from khoj.processor.conversation.utils import (
|
|
20
19
|
construct_chat_history,
|
21
20
|
)
|
22
21
|
from khoj.routers.helpers import send_message_to_model_wrapper
|
23
|
-
from khoj.utils.helpers import is_none_or_empty, timer
|
22
|
+
from khoj.utils.helpers import is_none_or_empty, timer, truncate_code_context
|
24
23
|
from khoj.utils.rawconfig import LocationData
|
25
24
|
|
26
25
|
logger = logging.getLogger(__name__)
|
@@ -180,26 +179,3 @@ async def execute_sandboxed_python(code: str, input_data: list[dict], sandbox_ur
|
|
180
179
|
"std_err": f"Failed to execute code with {response.status}",
|
181
180
|
"output_files": [],
|
182
181
|
}
|
183
|
-
|
184
|
-
|
185
|
-
def truncate_code_context(original_code_results: dict[str, Any], max_chars=10000) -> dict[str, Any]:
|
186
|
-
"""
|
187
|
-
Truncate large output files and drop image file data from code results.
|
188
|
-
"""
|
189
|
-
# Create a deep copy of the code results to avoid modifying the original data
|
190
|
-
code_results = copy.deepcopy(original_code_results)
|
191
|
-
for code_result in code_results.values():
|
192
|
-
for idx, output_file in enumerate(code_result["results"]["output_files"]):
|
193
|
-
# Drop image files from code results
|
194
|
-
if Path(output_file["filename"]).suffix in {".png", ".jpg", ".jpeg", ".webp"}:
|
195
|
-
code_result["results"]["output_files"][idx] = {
|
196
|
-
"filename": output_file["filename"],
|
197
|
-
"b64_data": "[placeholder for generated image data for brevity]",
|
198
|
-
}
|
199
|
-
# Truncate large output files
|
200
|
-
elif len(output_file["b64_data"]) > max_chars:
|
201
|
-
code_result["results"]["output_files"][idx] = {
|
202
|
-
"filename": output_file["filename"],
|
203
|
-
"b64_data": output_file["b64_data"][:max_chars] + "...",
|
204
|
-
}
|
205
|
-
return code_results
|
khoj/routers/api_chat.py
CHANGED
@@ -432,7 +432,15 @@ def chat_sessions(
|
|
432
432
|
conversations = conversations[:8]
|
433
433
|
|
434
434
|
sessions = conversations.values_list(
|
435
|
-
"id",
|
435
|
+
"id",
|
436
|
+
"slug",
|
437
|
+
"title",
|
438
|
+
"agent__slug",
|
439
|
+
"agent__name",
|
440
|
+
"created_at",
|
441
|
+
"updated_at",
|
442
|
+
"agent__style_icon",
|
443
|
+
"agent__style_color",
|
436
444
|
)
|
437
445
|
|
438
446
|
session_values = [
|
@@ -442,6 +450,8 @@ def chat_sessions(
|
|
442
450
|
"agent_name": session[4],
|
443
451
|
"created": session[5].strftime("%Y-%m-%d %H:%M:%S"),
|
444
452
|
"updated": session[6].strftime("%Y-%m-%d %H:%M:%S"),
|
453
|
+
"agent_icon": session[7],
|
454
|
+
"agent_color": session[8],
|
445
455
|
}
|
446
456
|
for session in sessions
|
447
457
|
]
|
@@ -693,7 +703,7 @@ async def chat(
|
|
693
703
|
chat_metadata["agent"] = conversation.agent.slug if conversation and conversation.agent else None
|
694
704
|
chat_metadata["latency"] = f"{latency:.3f}"
|
695
705
|
chat_metadata["ttft_latency"] = f"{ttft:.3f}"
|
696
|
-
chat_metadata["
|
706
|
+
chat_metadata["cost"] = f"{cost:.5f}"
|
697
707
|
|
698
708
|
logger.info(f"Chat response time to first token: {ttft:.3f} seconds")
|
699
709
|
logger.info(f"Chat response total time: {latency:.3f} seconds")
|
khoj/routers/api_subscription.py
CHANGED
@@ -66,16 +66,23 @@ async def subscribe(request: Request):
|
|
66
66
|
success = user is not None
|
67
67
|
elif event_type in {"customer.subscription.updated"}:
|
68
68
|
user_subscription = await sync_to_async(adapters.get_user_subscription)(customer_email)
|
69
|
+
|
70
|
+
renewal_date = None
|
71
|
+
if subscription["current_period_end"]:
|
72
|
+
renewal_date = datetime.fromtimestamp(subscription["current_period_end"], tz=timezone.utc)
|
73
|
+
|
69
74
|
# Allow updating subscription status if paid user
|
70
75
|
if user_subscription and user_subscription.renewal_date:
|
71
76
|
# Mark user as unsubscribed or resubscribed
|
72
77
|
is_recurring = not subscription["cancel_at_period_end"]
|
73
|
-
user, is_new = await adapters.set_user_subscription(
|
78
|
+
user, is_new = await adapters.set_user_subscription(
|
79
|
+
customer_email, is_recurring=is_recurring, renewal_date=renewal_date
|
80
|
+
)
|
74
81
|
success = user is not None
|
75
82
|
elif event_type in {"customer.subscription.deleted"}:
|
76
83
|
# Reset the user to trial state
|
77
84
|
user, is_new = await adapters.set_user_subscription(
|
78
|
-
customer_email, is_recurring=False, renewal_date=
|
85
|
+
customer_email, is_recurring=False, renewal_date=None, type=Subscription.Type.TRIAL
|
79
86
|
)
|
80
87
|
success = user is not None
|
81
88
|
|
khoj/routers/auth.py
CHANGED
@@ -89,7 +89,7 @@ async def login_magic_link(request: Request, form: MagicLinkForm):
|
|
89
89
|
update_telemetry_state(
|
90
90
|
request=request,
|
91
91
|
telemetry_type="api",
|
92
|
-
api="
|
92
|
+
api="create_user__email",
|
93
93
|
metadata={"server_id": str(user.uuid)},
|
94
94
|
)
|
95
95
|
logger.log(logging.INFO, f"🥳 New User Created: {user.uuid}")
|
@@ -174,7 +174,7 @@ async def auth(request: Request):
|
|
174
174
|
update_telemetry_state(
|
175
175
|
request=request,
|
176
176
|
telemetry_type="api",
|
177
|
-
api="
|
177
|
+
api="create_user__google",
|
178
178
|
metadata={"server_id": str(khoj_user.uuid)},
|
179
179
|
)
|
180
180
|
logger.log(logging.INFO, f"🥳 New User Created: {khoj_user.uuid}")
|