khoj 1.36.7.dev7__py3-none-any.whl → 1.36.7.dev18__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 (52) hide show
  1. khoj/database/adapters/__init__.py +15 -0
  2. khoj/interface/compiled/404/index.html +2 -2
  3. khoj/interface/compiled/_next/static/chunks/app/agents/{layout-64b81f8eeac13427.js → layout-4a0e32561d6b1e27.js} +1 -1
  4. khoj/interface/compiled/_next/static/chunks/app/agents/{page-2f55f9d0da49bf31.js → page-fbe2c1c661cd14ac.js} +1 -1
  5. khoj/interface/compiled/_next/static/chunks/app/automations/{page-d0a630a2b4ecc41d.js → page-ad620b194fd508fe.js} +1 -1
  6. khoj/interface/compiled/_next/static/chunks/app/chat/{page-53ba9f1424043383.js → page-24bf7a5c917dbaff.js} +1 -1
  7. khoj/interface/compiled/_next/static/chunks/app/{page-642bd02fc4f16606.js → page-528e96d17e520304.js} +1 -1
  8. khoj/interface/compiled/_next/static/chunks/app/search/{layout-ff081947c70ea9b7.js → layout-66f736b858b38c2c.js} +1 -1
  9. khoj/interface/compiled/_next/static/chunks/app/search/{page-7c80e369ee1cdfad.js → page-30e231665f1f3796.js} +1 -1
  10. khoj/interface/compiled/_next/static/chunks/app/settings/{page-c961681e308a334b.js → page-c580520d59d92267.js} +1 -1
  11. khoj/interface/compiled/_next/static/chunks/app/share/chat/{layout-94a33aa0eae034fc.js → layout-2ce0cb95b1219d97.js} +1 -1
  12. khoj/interface/compiled/_next/static/chunks/app/share/chat/{page-6253896a84300e9b.js → page-975934b12916f3d4.js} +1 -1
  13. khoj/interface/compiled/_next/static/chunks/{webpack-f813971dd4615afd.js → webpack-32b7cc428f0d015b.js} +1 -1
  14. khoj/interface/compiled/_next/static/css/017016e6eff88fdc.css +1 -0
  15. khoj/interface/compiled/_next/static/css/440ae0f0f650dc35.css +1 -0
  16. khoj/interface/compiled/_next/static/css/f29752d6e1be7624.css +1 -0
  17. khoj/interface/compiled/agents/index.html +2 -2
  18. khoj/interface/compiled/agents/index.txt +3 -3
  19. khoj/interface/compiled/automations/index.html +2 -2
  20. khoj/interface/compiled/automations/index.txt +3 -3
  21. khoj/interface/compiled/chat/index.html +2 -2
  22. khoj/interface/compiled/chat/index.txt +2 -2
  23. khoj/interface/compiled/index.html +2 -2
  24. khoj/interface/compiled/index.txt +2 -2
  25. khoj/interface/compiled/search/index.html +2 -2
  26. khoj/interface/compiled/search/index.txt +3 -3
  27. khoj/interface/compiled/settings/index.html +2 -2
  28. khoj/interface/compiled/settings/index.txt +5 -5
  29. khoj/interface/compiled/share/chat/index.html +2 -2
  30. khoj/interface/compiled/share/chat/index.txt +3 -3
  31. khoj/processor/conversation/google/gemini_chat.py +7 -7
  32. khoj/processor/conversation/prompts.py +100 -19
  33. khoj/processor/tools/run_code.py +163 -21
  34. khoj/utils/constants.py +2 -1
  35. khoj/utils/helpers.py +11 -2
  36. khoj/utils/initialization.py +24 -7
  37. {khoj-1.36.7.dev7.dist-info → khoj-1.36.7.dev18.dist-info}/METADATA +3 -2
  38. {khoj-1.36.7.dev7.dist-info → khoj-1.36.7.dev18.dist-info}/RECORD +49 -49
  39. khoj/interface/compiled/_next/static/css/55d4a822f8d94b67.css +0 -1
  40. khoj/interface/compiled/_next/static/css/804ceddd6c935d4a.css +0 -1
  41. khoj/interface/compiled/_next/static/css/b15666ef52060cd0.css +0 -1
  42. /khoj/interface/compiled/_next/static/{bzWTm19u6qe1y98Xfrqoo → SaAC14w_LNITF1YZanO67}/_buildManifest.js +0 -0
  43. /khoj/interface/compiled/_next/static/{bzWTm19u6qe1y98Xfrqoo → SaAC14w_LNITF1YZanO67}/_ssgManifest.js +0 -0
  44. /khoj/interface/compiled/_next/static/chunks/{1915-233ac8a122732d6b.js → 1915-4b7980a58fb630d6.js} +0 -0
  45. /khoj/interface/compiled/_next/static/chunks/{2117-ce1f0a4598f5e4fe.js → 2117-f99825f0a867a42d.js} +0 -0
  46. /khoj/interface/compiled/_next/static/chunks/{4363-9870bda67c2cf031.js → 4363-ac51bce40b6fc313.js} +0 -0
  47. /khoj/interface/compiled/_next/static/chunks/{4447-6e47461d1100c3cc.js → 4447-30959771ff58d99d.js} +0 -0
  48. /khoj/interface/compiled/_next/static/chunks/{8667-8136f74e9a086fca.js → 8667-adbe6017a66cef10.js} +0 -0
  49. /khoj/interface/compiled/_next/static/chunks/{9259-fa40e7cf2ca28e04.js → 9259-5be50737cfe989bc.js} +0 -0
  50. {khoj-1.36.7.dev7.dist-info → khoj-1.36.7.dev18.dist-info}/WHEEL +0 -0
  51. {khoj-1.36.7.dev7.dist-info → khoj-1.36.7.dev18.dist-info}/entry_points.txt +0 -0
  52. {khoj-1.36.7.dev7.dist-info → khoj-1.36.7.dev18.dist-info}/licenses/LICENSE +0 -0
@@ -1,12 +1,23 @@
1
+ import asyncio
1
2
  import base64
2
3
  import datetime
3
4
  import logging
4
5
  import mimetypes
5
6
  import os
7
+ import re
6
8
  from pathlib import Path
7
9
  from typing import Any, Callable, List, NamedTuple, Optional
8
10
 
9
11
  import aiohttp
12
+ from asgiref.sync import sync_to_async
13
+ from httpx import RemoteProtocolError
14
+ from tenacity import (
15
+ before_sleep_log,
16
+ retry,
17
+ retry_if_exception_type,
18
+ stop_after_attempt,
19
+ wait_random_exponential,
20
+ )
10
21
 
11
22
  from khoj.database.adapters import FileObjectAdapters
12
23
  from khoj.database.models import Agent, FileObject, KhojUser
@@ -15,22 +26,26 @@ from khoj.processor.conversation.utils import (
15
26
  ChatEvent,
16
27
  clean_code_python,
17
28
  construct_chat_history,
18
- load_complex_json,
19
29
  )
20
30
  from khoj.routers.helpers import send_message_to_model_wrapper
21
- from khoj.utils.helpers import is_none_or_empty, timer, truncate_code_context
31
+ from khoj.utils.helpers import (
32
+ is_e2b_code_sandbox_enabled,
33
+ is_none_or_empty,
34
+ timer,
35
+ truncate_code_context,
36
+ )
22
37
  from khoj.utils.rawconfig import LocationData
23
38
 
24
39
  logger = logging.getLogger(__name__)
25
40
 
26
41
 
27
42
  SANDBOX_URL = os.getenv("KHOJ_TERRARIUM_URL", "http://localhost:8080")
43
+ DEFAULT_E2B_TEMPLATE = "pmt2o0ghpang8gbiys57"
28
44
 
29
45
 
30
46
  class GeneratedCode(NamedTuple):
31
47
  code: str
32
- input_files: List[str]
33
- input_links: List[str]
48
+ input_files: List[FileObject]
34
49
 
35
50
 
36
51
  async def run_code(
@@ -68,13 +83,10 @@ async def run_code(
68
83
 
69
84
  # Prepare Input Data
70
85
  input_data = []
71
- user_input_files: List[FileObject] = []
72
- for input_file in generated_code.input_files:
73
- user_input_files += await FileObjectAdapters.aget_file_objects_by_name(user, input_file)
74
- for f in user_input_files:
86
+ for f in generated_code.input_files:
75
87
  input_data.append(
76
88
  {
77
- "filename": os.path.basename(f.file_name),
89
+ "filename": f.file_name,
78
90
  "b64_data": base64.b64encode(f.raw_text.encode("utf-8")).decode("utf-8"),
79
91
  }
80
92
  )
@@ -90,6 +102,14 @@ async def run_code(
90
102
  cleaned_result = truncate_code_context({"cleaned": {"results": result}})["cleaned"]["results"]
91
103
  logger.info(f"Executed Code\n----\n{code}\n----\nResult\n----\n{cleaned_result}\n----")
92
104
  yield {query: {"code": code, "results": result}}
105
+ except asyncio.TimeoutError as e:
106
+ # Call the sandbox_url/stop GET API endpoint to stop the code sandbox
107
+ error = f"Failed to run code for {query} with Timeout error: {e}"
108
+ try:
109
+ await aiohttp.ClientSession().get(f"{sandbox_url}/stop", timeout=5)
110
+ except Exception as e:
111
+ error += f"\n\nFailed to stop code sandbox with error: {e}"
112
+ raise ValueError(error)
93
113
  except Exception as e:
94
114
  raise ValueError(f"Failed to run code for {query} with error: {e}")
95
115
 
@@ -114,6 +134,12 @@ async def generate_python_code(
114
134
  prompts.personality_context.format(personality=agent.personality) if agent and agent.personality else ""
115
135
  )
116
136
 
137
+ # add sandbox specific context like available packages
138
+ sandbox_context = (
139
+ prompts.e2b_sandbox_context if is_e2b_code_sandbox_enabled() else prompts.terrarium_sandbox_context
140
+ )
141
+ personality_context = f"{sandbox_context}\n{personality_context}"
142
+
117
143
  code_generation_prompt = prompts.python_code_generation_prompt.format(
118
144
  current_date=utc_date,
119
145
  query=q,
@@ -127,23 +153,50 @@ async def generate_python_code(
127
153
  response = await send_message_to_model_wrapper(
128
154
  code_generation_prompt,
129
155
  query_images=query_images,
130
- response_type="json_object",
131
156
  user=user,
132
157
  tracer=tracer,
133
158
  query_files=query_files,
134
159
  )
135
160
 
136
- # Validate that the response is a non-empty, JSON-serializable list
137
- response = load_complex_json(response)
138
- code = response.get("code", "").strip()
139
- input_files = response.get("input_files", [])
140
- input_links = response.get("input_links", [])
161
+ # Extract python code wrapped in markdown code blocks from the response
162
+ code_blocks = re.findall(r"```(?:python)?\n(.*?)\n```", response, re.DOTALL)
163
+
164
+ if not code_blocks:
165
+ raise ValueError("No Python code blocks found in response")
166
+
167
+ # Join multiple code blocks with newlines and strip any leading/trailing whitespace
168
+ code = "\n".join(code_blocks).strip()
141
169
 
142
170
  if not isinstance(code, str) or is_none_or_empty(code):
143
171
  raise ValueError
144
- return GeneratedCode(code, input_files, input_links)
145
172
 
173
+ # Infer user files required in sandbox based on user file paths mentioned in code
174
+ input_files: List[FileObject] = []
175
+ user_files = await sync_to_async(set)(FileObjectAdapters.get_all_file_objects(user))
176
+ for user_file in user_files:
177
+ if user_file.file_name in code:
178
+ # Replace references to full file path used in code with just the file basename to ease reference in sandbox
179
+ file_basename = os.path.basename(user_file.file_name)
180
+ code = code.replace(user_file.file_name, file_basename)
181
+ user_file.file_name = file_basename
182
+ input_files.append(user_file)
183
+
184
+ return GeneratedCode(code, input_files)
146
185
 
186
+
187
+ @retry(
188
+ retry=(
189
+ retry_if_exception_type(aiohttp.ClientError)
190
+ | retry_if_exception_type(aiohttp.ClientTimeout)
191
+ | retry_if_exception_type(asyncio.TimeoutError)
192
+ | retry_if_exception_type(ConnectionError)
193
+ | retry_if_exception_type(RemoteProtocolError)
194
+ ),
195
+ wait=wait_random_exponential(min=1, max=5),
196
+ stop=stop_after_attempt(3),
197
+ before_sleep=before_sleep_log(logger, logging.DEBUG),
198
+ reraise=True,
199
+ )
147
200
  async def execute_sandboxed_python(code: str, input_data: list[dict], sandbox_url: str = SANDBOX_URL) -> dict[str, Any]:
148
201
  """
149
202
  Takes code to run as a string and calls the terrarium API to execute it.
@@ -152,15 +205,104 @@ async def execute_sandboxed_python(code: str, input_data: list[dict], sandbox_ur
152
205
  Reference data i/o format based on Terrarium example client code at:
153
206
  https://github.com/cohere-ai/cohere-terrarium/blob/main/example-clients/python/terrarium_client.py
154
207
  """
155
- headers = {"Content-Type": "application/json"}
156
208
  cleaned_code = clean_code_python(code)
157
- data = {"code": cleaned_code, "files": input_data}
209
+ if is_e2b_code_sandbox_enabled():
210
+ try:
211
+ return await execute_e2b(cleaned_code, input_data)
212
+ except ImportError:
213
+ pass
214
+ return await execute_terrarium(cleaned_code, input_data, sandbox_url)
215
+
216
+
217
+ async def execute_e2b(code: str, input_files: list[dict]) -> dict[str, Any]:
218
+ """Execute code and handle file I/O in e2b sandbox"""
219
+ from e2b_code_interpreter import AsyncSandbox
220
+
221
+ sandbox = await AsyncSandbox.create(
222
+ api_key=os.getenv("E2B_API_KEY"),
223
+ template=os.getenv("E2B_TEMPLATE", DEFAULT_E2B_TEMPLATE),
224
+ timeout=120,
225
+ request_timeout=30,
226
+ )
158
227
 
228
+ try:
229
+ # Upload input files in parallel
230
+ upload_tasks = [
231
+ sandbox.files.write(path=file["filename"], data=base64.b64decode(file["b64_data"]), request_timeout=30)
232
+ for file in input_files
233
+ ]
234
+ await asyncio.gather(*upload_tasks)
235
+
236
+ # Note stored files before execution to identify new files created during execution
237
+ E2bFile = NamedTuple("E2bFile", [("name", str), ("path", str)])
238
+ original_files = {E2bFile(f.name, f.path) for f in await sandbox.files.list("~")}
239
+
240
+ # Execute code from main.py file
241
+ execution = await sandbox.run_code(code=code, timeout=60)
242
+
243
+ # Collect output files
244
+ output_files = []
245
+
246
+ # Identify new files created during execution
247
+ new_files = set(E2bFile(f.name, f.path) for f in await sandbox.files.list("~")) - original_files
248
+ # Read newly created files in parallel
249
+ download_tasks = [sandbox.files.read(f.path, request_timeout=30) for f in new_files]
250
+ downloaded_files = await asyncio.gather(*download_tasks)
251
+ for f, content in zip(new_files, downloaded_files):
252
+ if isinstance(content, bytes):
253
+ # Binary files like PNG - encode as base64
254
+ b64_data = base64.b64encode(content).decode("utf-8")
255
+ elif Path(f.name).suffix in [".png", ".jpeg", ".jpg", ".svg"]:
256
+ # Ignore image files as they are extracted from execution results below for inline display
257
+ continue
258
+ else:
259
+ # Text files - encode utf-8 string as base64
260
+ b64_data = base64.b64encode(content.encode("utf-8")).decode("utf-8")
261
+ output_files.append({"filename": f.name, "b64_data": b64_data})
262
+
263
+ # Collect output files from execution results
264
+ for idx, result in enumerate(execution.results):
265
+ for result_type in {"png", "jpeg", "svg", "text", "markdown", "json"}:
266
+ if b64_data := getattr(result, result_type, None):
267
+ output_files.append({"filename": f"{idx}.{result_type}", "b64_data": b64_data})
268
+ break
269
+
270
+ # collect logs
271
+ success = not execution.error and not execution.logs.stderr
272
+ stdout = "\n".join(execution.logs.stdout)
273
+ errors = "\n".join(execution.logs.stderr)
274
+ if execution.error:
275
+ errors = f"{execution.error}\n{errors}"
276
+
277
+ return {
278
+ "code": code,
279
+ "success": success,
280
+ "std_out": stdout,
281
+ "std_err": errors,
282
+ "output_files": output_files,
283
+ }
284
+ except Exception as e:
285
+ return {
286
+ "code": code,
287
+ "success": False,
288
+ "std_err": f"Sandbox failed to execute code: {str(e)}",
289
+ "output_files": [],
290
+ }
291
+
292
+
293
+ async def execute_terrarium(
294
+ code: str,
295
+ input_data: list[dict],
296
+ sandbox_url: str,
297
+ ) -> dict[str, Any]:
298
+ """Execute code using Terrarium sandbox"""
299
+ headers = {"Content-Type": "application/json"}
300
+ data = {"code": code, "files": input_data}
159
301
  async with aiohttp.ClientSession() as session:
160
- async with session.post(sandbox_url, json=data, headers=headers) as response:
302
+ async with session.post(sandbox_url, json=data, headers=headers, timeout=30) as response:
161
303
  if response.status == 200:
162
304
  result: dict[str, Any] = await response.json()
163
- result["code"] = cleaned_code
305
+ result["code"] = code
164
306
  # Store decoded output files
165
307
  result["output_files"] = result.get("output_files", [])
166
308
  for output_file in result["output_files"]:
@@ -172,7 +314,7 @@ async def execute_sandboxed_python(code: str, input_data: list[dict], sandbox_ur
172
314
  return result
173
315
  else:
174
316
  return {
175
- "code": cleaned_code,
317
+ "code": code,
176
318
  "success": False,
177
319
  "std_err": f"Failed to execute code with {response.status}",
178
320
  "output_files": [],
khoj/utils/constants.py CHANGED
@@ -18,7 +18,7 @@ default_offline_chat_models = [
18
18
  "bartowski/Qwen2.5-14B-Instruct-GGUF",
19
19
  ]
20
20
  default_openai_chat_models = ["gpt-4o-mini", "gpt-4o"]
21
- default_gemini_chat_models = ["gemini-1.5-flash", "gemini-1.5-pro"]
21
+ default_gemini_chat_models = ["gemini-2.0-flash", "gemini-1.5-pro"]
22
22
  default_anthropic_chat_models = ["claude-3-5-sonnet-20241022", "claude-3-5-haiku-20241022"]
23
23
 
24
24
  empty_config = {
@@ -46,6 +46,7 @@ model_to_cost: Dict[str, Dict[str, float]] = {
46
46
  "gemini-1.5-flash-002": {"input": 0.075, "output": 0.30},
47
47
  "gemini-1.5-pro": {"input": 1.25, "output": 5.00},
48
48
  "gemini-1.5-pro-002": {"input": 1.25, "output": 5.00},
49
+ "gemini-2.0-flash": {"input": 0.10, "output": 0.40},
49
50
  # Anthropic Pricing: https://www.anthropic.com/pricing#anthropic-api_
50
51
  "claude-3-5-sonnet-20241022": {"input": 3.0, "output": 15.0},
51
52
  "claude-3-5-haiku-20241022": {"input": 1.0, "output": 5.0},
khoj/utils/helpers.py CHANGED
@@ -321,6 +321,12 @@ def get_device() -> torch.device:
321
321
  return torch.device("cpu")
322
322
 
323
323
 
324
+ def is_e2b_code_sandbox_enabled():
325
+ """Check if E2B code sandbox is enabled.
326
+ Set E2B_API_KEY environment variable to use it."""
327
+ return not is_none_or_empty(os.getenv("E2B_API_KEY"))
328
+
329
+
324
330
  class ConversationCommand(str, Enum):
325
331
  Default = "default"
326
332
  General = "general"
@@ -362,20 +368,23 @@ command_descriptions_for_agent = {
362
368
  ConversationCommand.Code: "Agent can run Python code to parse information, run complex calculations, create documents and charts.",
363
369
  }
364
370
 
371
+ e2b_tool_description = "To run Python code in a E2B sandbox with no network access. Helpful to parse complex information, run calculations, create text documents and create charts with quantitative data. Only matplotlib, pandas, numpy, scipy, bs4, sympy, einops, biopython, shapely and rdkit external packages are available."
372
+ terrarium_tool_description = "To run Python code in a Terrarium, Pyodide sandbox with no network access. Helpful to parse complex information, run complex calculations, create plaintext documents and create charts with quantitative data. Only matplotlib, panda, numpy, scipy, bs4 and sympy external packages are available."
373
+
365
374
  tool_descriptions_for_llm = {
366
375
  ConversationCommand.Default: "To use a mix of your internal knowledge and the user's personal knowledge, or if you don't entirely understand the query.",
367
376
  ConversationCommand.General: "To use when you can answer the question without any outside information or personal knowledge",
368
377
  ConversationCommand.Notes: "To search the user's personal knowledge base. Especially helpful if the question expects context from the user's notes or documents.",
369
378
  ConversationCommand.Online: "To search for the latest, up-to-date information from the internet. Note: **Questions about Khoj should always use this data source**",
370
379
  ConversationCommand.Webpage: "To use if the user has directly provided the webpage urls or you are certain of the webpage urls to read.",
371
- ConversationCommand.Code: "To run Python code in a Pyodide sandbox with no network access. Helpful when need to parse complex information, run complex calculations, create plaintext documents, and create charts with quantitative data. Only matplotlib, panda, numpy, scipy, bs4 and sympy external packages are available.",
380
+ ConversationCommand.Code: e2b_tool_description if is_e2b_code_sandbox_enabled() else terrarium_tool_description,
372
381
  }
373
382
 
374
383
  function_calling_description_for_llm = {
375
384
  ConversationCommand.Notes: "To search the user's personal knowledge base. Especially helpful if the question expects context from the user's notes or documents.",
376
385
  ConversationCommand.Online: "To search the internet for information. Useful to get a quick, broad overview from the internet. Provide all relevant context to ensure new searches, not in previous iterations, are performed.",
377
386
  ConversationCommand.Webpage: "To extract information from webpages. Useful for more detailed research from the internet. Usually used when you know the webpage links to refer to. Share the webpage links and information to extract in your query.",
378
- ConversationCommand.Code: "To run Python code in a Pyodide sandbox with no network access. Helpful when need to parse complex information, run complex calculations, create plaintext documents, and create charts with quantitative data. Only matplotlib, panda, numpy, scipy, bs4 and sympy external packages are available.",
387
+ ConversationCommand.Code: e2b_tool_description if is_e2b_code_sandbox_enabled() else terrarium_tool_description,
379
388
  }
380
389
 
381
390
  mode_descriptions_for_llm = {
@@ -185,16 +185,18 @@ def initialization(interactive: bool = True):
185
185
  )
186
186
  provider_name = provider_name or model_type.name.capitalize()
187
187
 
188
- default_use_model = {True: "y", False: "n"}[default_api_key is not None]
189
-
190
- # If not in interactive mode & in the offline setting, it's most likely that we're running in a containerized environment. This usually means there's not enough RAM to load offline models directly within the application. In such cases, we default to not using the model -- it's recommended to use another service like Ollama to host the model locally in that case.
191
- default_use_model = {True: "n", False: default_use_model}[is_offline]
188
+ default_use_model = default_api_key is not None
189
+ # If not in interactive mode & in the offline setting, it's most likely that we're running in a containerized environment.
190
+ # This usually means there's not enough RAM to load offline models directly within the application.
191
+ # In such cases, we default to not using the model -- it's recommended to use another service like Ollama to host the model locally in that case.
192
+ if is_offline:
193
+ default_use_model = False
192
194
 
193
195
  use_model_provider = (
194
- default_use_model if not interactive else input(f"Add {provider_name} chat models? (y/n): ")
196
+ default_use_model if not interactive else input(f"Add {provider_name} chat models? (y/n): ") == "y"
195
197
  )
196
198
 
197
- if use_model_provider != "y":
199
+ if not use_model_provider:
198
200
  return False, None
199
201
 
200
202
  logger.info(f"️💬 Setting up your {provider_name} chat configuration")
@@ -303,4 +305,19 @@ def initialization(interactive: bool = True):
303
305
  logger.error(f"🚨 Failed to create chat configuration: {e}", exc_info=True)
304
306
  else:
305
307
  _update_chat_model_options()
306
- logger.info("🗣️ Chat model configuration updated")
308
+ logger.info("🗣️ Chat model options updated")
309
+
310
+ # Update the default chat model if it doesn't match
311
+ chat_config = ConversationAdapters.get_default_chat_model()
312
+ env_default_chat_model = os.getenv("KHOJ_DEFAULT_CHAT_MODEL")
313
+ if not chat_config or not env_default_chat_model:
314
+ return
315
+ if chat_config.name != env_default_chat_model:
316
+ chat_model = ConversationAdapters.get_chat_model_by_name(env_default_chat_model)
317
+ if not chat_model:
318
+ logger.error(
319
+ f"🚨 Not setting default chat model. Chat model {env_default_chat_model} not found in existing chat model options."
320
+ )
321
+ return
322
+ ConversationAdapters.set_default_chat_model(chat_model)
323
+ logger.info(f"🗣️ Default chat model set to {chat_model.name}")
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: khoj
3
- Version: 1.36.7.dev7
3
+ Version: 1.36.7.dev18
4
4
  Summary: Your Second Brain
5
5
  Project-URL: Homepage, https://khoj.dev
6
6
  Project-URL: Documentation, https://docs.khoj.dev
@@ -35,11 +35,12 @@ Requires-Dist: django-phonenumber-field==7.3.0
35
35
  Requires-Dist: django-unfold==0.42.0
36
36
  Requires-Dist: django==5.0.10
37
37
  Requires-Dist: docx2txt==0.8
38
+ Requires-Dist: e2b-code-interpreter~=1.0.0
38
39
  Requires-Dist: einops==0.8.0
39
40
  Requires-Dist: email-validator==2.2.0
40
41
  Requires-Dist: fastapi>=0.110.0
41
42
  Requires-Dist: google-generativeai==0.8.3
42
- Requires-Dist: httpx==0.25.0
43
+ Requires-Dist: httpx==0.27.2
43
44
  Requires-Dist: huggingface-hub>=0.22.2
44
45
  Requires-Dist: itsdangerous==2.1.2
45
46
  Requires-Dist: jinja2==3.1.5
@@ -11,7 +11,7 @@ khoj/database/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
11
11
  khoj/database/admin.py,sha256=mpfBHaeRzzGRZwaKcvwlBW8v8Z90RMq0SmxJQXsHmW4,12907
12
12
  khoj/database/apps.py,sha256=pM4tkX5Odw4YW_hLLKK8Nd5kqGddf1en0oMCea44RZw,153
13
13
  khoj/database/tests.py,sha256=mrbGGRNg5jwbTJtWWa7zSKdDyeB4vmgZCRc2nk6VY-g,60
14
- khoj/database/adapters/__init__.py,sha256=gaxTPlAkM6guzk_LzrjalG2IzPZYeIWvzIs3FQ_CueY,72963
14
+ khoj/database/adapters/__init__.py,sha256=KJaO4N_yYjj1Sz06k-CcjT_W1c_0gyPebpX9dDof3GY,73636
15
15
  khoj/database/management/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
16
16
  khoj/database/management/commands/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
17
17
  khoj/database/management/commands/change_default_model.py,sha256=6QXJttG58gpU7vZApQEeEPVNAuhjU2xa6_BwJsfz320,4877
@@ -125,25 +125,25 @@ khoj/interface/compiled/chat.svg,sha256=l2JoYRRgk201adTTdvJ-buKUrc0WGfsudix5xEvt
125
125
  khoj/interface/compiled/close.svg,sha256=hQ2iFLkNzHk0_iyTrSbwnWAeXYlgA-c2Eof2Iqh76n4,417
126
126
  khoj/interface/compiled/copy-button-success.svg,sha256=byqWAYD3Pn9IOXRjOKudJ-TJbP2UESbQGvtLWazNGjY,829
127
127
  khoj/interface/compiled/copy-button.svg,sha256=05bKM2eRxksfBlAPT7yMaoNJEk85bZCxQg67EVrPeHo,669
128
- khoj/interface/compiled/index.html,sha256=cA5HITDKqc1ZubxWQQwFpcci2u1UmIs0-tCOYxpnwmY,53009
129
- khoj/interface/compiled/index.txt,sha256=WN0qhJqh-qiFWfu1M6amdeYGdLcHoiTlKFrxNdZ2BXM,7584
128
+ khoj/interface/compiled/index.html,sha256=1SvkguYen-Ueb2rAAQk9ZHA9GiizNFhKwpsR71OqYFU,53009
129
+ khoj/interface/compiled/index.txt,sha256=zk85FSEihsA8olC_RLzC-p-gKamOqNcrV2tXx23lQLc,7584
130
130
  khoj/interface/compiled/khoj.webmanifest,sha256=9wOK2BMS6xH5NKd2eaUgTLg9WepIxB2K2U33KU89LD8,2543
131
131
  khoj/interface/compiled/logo.svg,sha256=_QCKVYM4WT2Qhcf7aVFImjq_s5CwjynGXYAOgI7yf8w,8059
132
132
  khoj/interface/compiled/send.svg,sha256=VdavOWkVddcwcGcld6pdfmwfz7S91M-9O28cfeiKJkM,635
133
133
  khoj/interface/compiled/share.svg,sha256=91lwo75PvMDrgocuZQab6EQ62CxRbubh9Bhw7CWMKbg,1221
134
134
  khoj/interface/compiled/thumbs-down.svg,sha256=JGNl-DwoRmH2XFMPWwFFklmoYtKxaQbkLE3nuYKe8ZY,1019
135
135
  khoj/interface/compiled/thumbs-up.svg,sha256=yS1wxTRtiztkN-6nZciLoYQUB_KTYNPV8xFRwH2TQFw,1036
136
- khoj/interface/compiled/404/index.html,sha256=9P9D-fiW1d6dxqa74JgU7nBmherK_ulg4MFdlC7xAlk,17063
137
- khoj/interface/compiled/_next/static/bzWTm19u6qe1y98Xfrqoo/_buildManifest.js,sha256=f2_nYnw25hHWQJ-39Lf5OH1u6kgdbOInyfplqgjvAV4,224
138
- khoj/interface/compiled/_next/static/bzWTm19u6qe1y98Xfrqoo/_ssgManifest.js,sha256=Z49s4suAsf5y_GfnQSvm4qtq2ggxEbZPfEDTXjy6XgA,80
136
+ khoj/interface/compiled/404/index.html,sha256=KnrjphuTvxufhIyewflgzniGP54-FSET4gLat_IdjVk,17063
137
+ khoj/interface/compiled/_next/static/SaAC14w_LNITF1YZanO67/_buildManifest.js,sha256=f2_nYnw25hHWQJ-39Lf5OH1u6kgdbOInyfplqgjvAV4,224
138
+ khoj/interface/compiled/_next/static/SaAC14w_LNITF1YZanO67/_ssgManifest.js,sha256=Z49s4suAsf5y_GfnQSvm4qtq2ggxEbZPfEDTXjy6XgA,80
139
139
  khoj/interface/compiled/_next/static/chunks/0d8bff65.4b1018183a8be7c2.js,sha256=qp6JgPDl-9sVe9u6w1oloumr9QiTjRzcZAm19Ov1Yns,268308
140
140
  khoj/interface/compiled/_next/static/chunks/1199-80c79778c44ad4ec.js,sha256=3btqNHOBc7x2FZVh2IyCUN8uLjRH4eWVfmzdO4KYJqc,216338
141
141
  khoj/interface/compiled/_next/static/chunks/1243.ea2826fb35adb15a.js,sha256=Y6ceAwyTH4HSGDvBRoBB-RVXRCzGGr8NSPcspYF5OM8,182
142
142
  khoj/interface/compiled/_next/static/chunks/133.392ae90c3b2a67f2.js,sha256=IK-mb9ZlF6uJUdU8AuXsppc99tFL8svJvZtKNZGNtcY,411
143
143
  khoj/interface/compiled/_next/static/chunks/1592.b069bdb7aaddd2eb.js,sha256=VUaP2gjX3W9tA9pOH_VIPG_2BIg7Wk1AICrfU5iHgrk,71096
144
- khoj/interface/compiled/_next/static/chunks/1915-233ac8a122732d6b.js,sha256=qArqL3leavWRcZkX4ZuWgemtKnmV6c-_yrNtMu_8SeY,11277
144
+ khoj/interface/compiled/_next/static/chunks/1915-4b7980a58fb630d6.js,sha256=qArqL3leavWRcZkX4ZuWgemtKnmV6c-_yrNtMu_8SeY,11277
145
145
  khoj/interface/compiled/_next/static/chunks/2069.f060659791c0c484.js,sha256=C_oat_BkZcLOHsyJlNN_5I55fB7ee1zkkZ9FT5zOzn4,186
146
- khoj/interface/compiled/_next/static/chunks/2117-ce1f0a4598f5e4fe.js,sha256=vLJikd2wJoZNWopR64Y4ccsOU2TNfdkBxVyfrgTHk10,123994
146
+ khoj/interface/compiled/_next/static/chunks/2117-f99825f0a867a42d.js,sha256=vLJikd2wJoZNWopR64Y4ccsOU2TNfdkBxVyfrgTHk10,123994
147
147
  khoj/interface/compiled/_next/static/chunks/2170.45431769330fa5b7.js,sha256=C7Puu9x18DhdR5Sh8XXvTzPdP_HTK6WhsJDNW-NoB7o,24019
148
148
  khoj/interface/compiled/_next/static/chunks/2327-02e86a50c65e575a.js,sha256=f72kgtwEDLLbY1POl61TVUOso_nwA7LkIHHQQPSVN6c,127346
149
149
  khoj/interface/compiled/_next/static/chunks/2509-79b3ce8040bc0bcf.js,sha256=8TxAAoyq-sz9TuOnk_B1WeqmTh-tBo6XN7c-l-4QJxo,18613
@@ -157,9 +157,9 @@ khoj/interface/compiled/_next/static/chunks/3861-8662fce65c02717d.js,sha256=TuGM
157
157
  khoj/interface/compiled/_next/static/chunks/4299.2aaa569416cfc208.js,sha256=3HJ8OvB9BDJW0-qCBd1eUmChoBAxaCX6R81ftWZ1CHw,21659
158
158
  khoj/interface/compiled/_next/static/chunks/4327.238d15c09a039b8b.js,sha256=mZa4Oyltc9JrokqnalRTjzcvWgX4S3i3REXiHzRYH1o,296536
159
159
  khoj/interface/compiled/_next/static/chunks/4357-73c05a7c905ffc9f.js,sha256=5FPNF2yXaXxgumg4KfPWQQcOrqeF0RnsTTS0jsviAyQ,45294
160
- khoj/interface/compiled/_next/static/chunks/4363-9870bda67c2cf031.js,sha256=qU1gc45CPBR1YjIs5CFGVLPabPCBiWs72sQMA0A4Hu0,467907
160
+ khoj/interface/compiled/_next/static/chunks/4363-ac51bce40b6fc313.js,sha256=qU1gc45CPBR1YjIs5CFGVLPabPCBiWs72sQMA0A4Hu0,467907
161
161
  khoj/interface/compiled/_next/static/chunks/4415.e0c0da5eedae4dd7.js,sha256=DEf8HPEstDFvBflOU0j0ilYHlVJilGcGsLgUx524FZQ,25544
162
- khoj/interface/compiled/_next/static/chunks/4447-6e47461d1100c3cc.js,sha256=Uw8IrcKmVR3wba-FB9maP9i9l_kAYg59r8PN1T_ipQE,19621
162
+ khoj/interface/compiled/_next/static/chunks/4447-30959771ff58d99d.js,sha256=Uw8IrcKmVR3wba-FB9maP9i9l_kAYg59r8PN1T_ipQE,19621
163
163
  khoj/interface/compiled/_next/static/chunks/4610.a1e7f40a759ed2aa.js,sha256=b5JDRPyQv2MsibYoK2TDT76LMAoDTRzFM-fa81mJxow,14102
164
164
  khoj/interface/compiled/_next/static/chunks/4650.41f041da0ad365ad.js,sha256=EZeckNrMc3ZUX_LexPgaeusEq-dGBNEPm7nc5nvb4OM,33902
165
165
  khoj/interface/compiled/_next/static/chunks/4872.5422e8324272ab40.js,sha256=fXqb_gUYEnKRgeI3AJuAG6kKAOlVkVXyndmNkhetCyo,11176
@@ -184,12 +184,12 @@ khoj/interface/compiled/_next/static/chunks/7953.f6fc335a23efb959.js,sha256=8XIn
184
184
  khoj/interface/compiled/_next/static/chunks/8155-ad130153ddcc930f.js,sha256=BSWqUU63y8D2q0Pz-GpIcYOKSmdbg0M93c1oLn5IvzM,1616874
185
185
  khoj/interface/compiled/_next/static/chunks/8254.3145a4fbdcfdca46.js,sha256=sur8InabGfvh1HqNQhwBssc1tCPae_WKQ-efoYU1Q8A,412
186
186
  khoj/interface/compiled/_next/static/chunks/8400.c95e4e79bcd79a56.js,sha256=3SlFozKtF4DYQYPT3hB5M7VEm3e_W71kC19JgADz-3k,19864
187
- khoj/interface/compiled/_next/static/chunks/8667-8136f74e9a086fca.js,sha256=kyiAVJTylsiOPFTb63uZn_pMlk4pYhDYt_N7xL76PTM,7214
187
+ khoj/interface/compiled/_next/static/chunks/8667-adbe6017a66cef10.js,sha256=kyiAVJTylsiOPFTb63uZn_pMlk4pYhDYt_N7xL76PTM,7214
188
188
  khoj/interface/compiled/_next/static/chunks/8673.be44c4d9e4f1d084.js,sha256=jiE4xU-TbkVC4R60SIgxwdo31T9mbdVBVuhP4H60i94,18629
189
189
  khoj/interface/compiled/_next/static/chunks/8698.a088118fef40d302.js,sha256=mrK-3ZahVSF7sZij3l-PyXKxp-ccXU9orykXDc7YzsM,180
190
190
  khoj/interface/compiled/_next/static/chunks/9022.33974a513a281fd2.js,sha256=6NmDzRbI0NyTisUT04sq9M0czUqvlwZoV4E7Onp-55Q,57192
191
191
  khoj/interface/compiled/_next/static/chunks/90542734.fecd4dc1a89ed166.js,sha256=gurZjtKkwAEgw5rTMSeoufe1tvqfUjayaBuAOnrz0Ek,368873
192
- khoj/interface/compiled/_next/static/chunks/9259-fa40e7cf2ca28e04.js,sha256=VPDpPt7r_7xpFB-OxF6mnr2dvKuwFFZltMkpnc98dc8,34824
192
+ khoj/interface/compiled/_next/static/chunks/9259-5be50737cfe989bc.js,sha256=VPDpPt7r_7xpFB-OxF6mnr2dvKuwFFZltMkpnc98dc8,34824
193
193
  khoj/interface/compiled/_next/static/chunks/9334-3047e20b503f086b.js,sha256=_TPWqSCbf86Ig1vIEDRLXzloZujDoxpoEWhRPUf6b5U,29065
194
194
  khoj/interface/compiled/_next/static/chunks/9433.b1b5f5d050c43e3c.js,sha256=kMVC0Gg95UqjfQXpGvi-WUSg_kYp0SN7CTPTHxHxDBk,144858
195
195
  khoj/interface/compiled/_next/static/chunks/94ca1967.1d9b42d929a1ee8c.js,sha256=4NgDGkBrtrBndP5tKblKoLgi9xpn4aDpIRH4kDop9Q0,1174520
@@ -203,32 +203,32 @@ khoj/interface/compiled/_next/static/chunks/framework-8e0e0f4a6b83a956.js,sha256
203
203
  khoj/interface/compiled/_next/static/chunks/main-98eb5932d6b2e3fa.js,sha256=AawaSgw7Q3CVsGFBX7BuL4bBqqXkJ4DJdGs-2cif97I,111273
204
204
  khoj/interface/compiled/_next/static/chunks/main-app-de1f09df97a3cfc7.js,sha256=bqnztujKItXfFBzQlaBmDZyfJpQt_M93CXOuchJfpD0,471
205
205
  khoj/interface/compiled/_next/static/chunks/polyfills-42372ed130431b0a.js,sha256=CXPB1kyIrcjjyVBBDLWLKI9yEY1ZZbeASUON648vloM,112594
206
- khoj/interface/compiled/_next/static/chunks/webpack-f813971dd4615afd.js,sha256=BxfbXhhHseTjy3CiQjrugsUnQwotUA_ykKLuJlmrXVE,4905
206
+ khoj/interface/compiled/_next/static/chunks/webpack-32b7cc428f0d015b.js,sha256=R5hoiFfRuRdtLu6-n2al7DZogwTe_kWlGyb7Q_J-BBA,4902
207
207
  khoj/interface/compiled/_next/static/chunks/app/layout-26139159e500852a.js,sha256=Hde2KNhdgq6Ep56YPUN2BNsIF6ZeP_OaPExvRdbHzWY,3983
208
- khoj/interface/compiled/_next/static/chunks/app/page-642bd02fc4f16606.js,sha256=HfaYpMMaQb1lvglI28BUdURHyKJatVK9l0BmiGkxzbU,30989
208
+ khoj/interface/compiled/_next/static/chunks/app/page-528e96d17e520304.js,sha256=hxbiNf6J6mdV7k3UwrouUSyUXqno0FxAFHsdsJFCb10,30988
209
209
  khoj/interface/compiled/_next/static/chunks/app/_not-found/page-0ec97c4970898f2d.js,sha256=zElhiTkdu2JqrEvJ8Lrxh4HCyfLmPllBHHWOuDtrVlw,1755
210
- khoj/interface/compiled/_next/static/chunks/app/agents/layout-64b81f8eeac13427.js,sha256=7NVaT4qQJXeQeOo9B9BlzxnpPoXS6RVCyRbc_FuUW44,3455
211
- khoj/interface/compiled/_next/static/chunks/app/agents/page-2f55f9d0da49bf31.js,sha256=YfMfLZm-gCpN-RuY3k6d4MqC-z3OH5JUfboIAEGjKiE,18314
210
+ khoj/interface/compiled/_next/static/chunks/app/agents/layout-4a0e32561d6b1e27.js,sha256=9vCJlBy6g9Ua20oiaOWujkCNOEK6iCqFj_IF8Lg3gXs,3455
211
+ khoj/interface/compiled/_next/static/chunks/app/agents/page-fbe2c1c661cd14ac.js,sha256=kpUaCN_XXCQNxMy-JiLH1elhoJVEGCvS3BRCQVCF3fA,18314
212
212
  khoj/interface/compiled/_next/static/chunks/app/automations/layout-7f5c33a70e46b3af.js,sha256=s2wHeQ-ai9rKyU9EjOGY1Yo51L4ZEkjLtML85BqN3Zc,5143
213
- khoj/interface/compiled/_next/static/chunks/app/automations/page-d0a630a2b4ecc41d.js,sha256=y85e8MYfHrQamWV0RifbqbZS1e8ZgNIv4JLBFhjiE40,34831
213
+ khoj/interface/compiled/_next/static/chunks/app/automations/page-ad620b194fd508fe.js,sha256=gHDM4IUFZ3WlLNq38PNig-Bb8B8XqWSYyrY9VNfDhHE,34831
214
214
  khoj/interface/compiled/_next/static/chunks/app/chat/layout-9e151fb837f53026.js,sha256=ujqnyAx3O1ismASoR_VZ13aeYvgJCV4OzM388oXN4vw,3455
215
- khoj/interface/compiled/_next/static/chunks/app/chat/page-53ba9f1424043383.js,sha256=9CaQOIUwvdnXCcBQDvk2GFFY-zrPRZo7OqO_-hVAGh0,28278
216
- khoj/interface/compiled/_next/static/chunks/app/search/layout-ff081947c70ea9b7.js,sha256=d1Pm-ajEi75UE8Qr9fGFfWmVAUyN5TZOQmbqhxJN9TI,3455
217
- khoj/interface/compiled/_next/static/chunks/app/search/page-7c80e369ee1cdfad.js,sha256=AvKcJ5DB0716p6JybfYLuz0HQViORoCaLIhXCiHeOhw,19521
215
+ khoj/interface/compiled/_next/static/chunks/app/chat/page-24bf7a5c917dbaff.js,sha256=IpsIl1W9VB7pObcWYrgX87WNnutRlSkdIlUl0Qt9ElM,28282
216
+ khoj/interface/compiled/_next/static/chunks/app/search/layout-66f736b858b38c2c.js,sha256=opW46eRMRn2_0hTuczD8QlDVLggVaZlygHFph9DxiAQ,3455
217
+ khoj/interface/compiled/_next/static/chunks/app/search/page-30e231665f1f3796.js,sha256=OsAyWzr2FHME7caw7k2sslO7H5uzITOFvmJJVXAozgc,19521
218
218
  khoj/interface/compiled/_next/static/chunks/app/settings/layout-bef0e00bb3873a84.js,sha256=_2tVtyNj1Ko1OEDD6hQdeU1Qb0JUlLTlXANv2N_E2ds,9401
219
- khoj/interface/compiled/_next/static/chunks/app/settings/page-c961681e308a334b.js,sha256=VghBFxL6n10FU_mEVl7ed7EK9kjqMqEGpzlF6TftYE0,26582
220
- khoj/interface/compiled/_next/static/chunks/app/share/chat/layout-94a33aa0eae034fc.js,sha256=XL3LoKIkQTWSZJEcS1SXZYmaLrNUYnPvhH-BqecpQKo,3455
221
- khoj/interface/compiled/_next/static/chunks/app/share/chat/page-6253896a84300e9b.js,sha256=9NAZZ-zdpKasxO_vK9gZnDFbBZy_zsvmZifP2ZL2DYU,4826
219
+ khoj/interface/compiled/_next/static/chunks/app/settings/page-c580520d59d92267.js,sha256=pHDReKfTZqd1csGfKiJJrtjjz6MSs0iyEjh8RLRm7Gc,26582
220
+ khoj/interface/compiled/_next/static/chunks/app/share/chat/layout-2ce0cb95b1219d97.js,sha256=h2UtYzZC8mFH0WGj-sOq39ik8g2qiTGQ9bVQLDh0Urs,3455
221
+ khoj/interface/compiled/_next/static/chunks/app/share/chat/page-975934b12916f3d4.js,sha256=5BLiFwTOwwhrNLEh6iE-0GnU1--yWujJ54zK3gUilc4,4820
222
222
  khoj/interface/compiled/_next/static/chunks/pages/_app-3c9ca398d360b709.js,sha256=UqtikLsCsOWtDUJOW6Tuk9P-bV1V3MhYd3ghrQuEmfs,286
223
223
  khoj/interface/compiled/_next/static/chunks/pages/_error-cf5ca766ac8f493f.js,sha256=w_It3VzKT8O1M3CrJ_hZHsaU7M7dq3EAaVG8KvJ-fhU,253
224
+ khoj/interface/compiled/_next/static/css/017016e6eff88fdc.css,sha256=hFcafGpX35Y0WYtvdipI0RTenR9tMbUFO_KZ7Ps-zXI,30530
224
225
  khoj/interface/compiled/_next/static/css/089de1d8526b96e9.css,sha256=sjpmNlk7H2uKEYK9_DFccNq9J8V9uR799cS0yT-E7EI,4041
225
226
  khoj/interface/compiled/_next/static/css/37a73b87f02df402.css,sha256=hp0vlekKu0K2eITR5YIqFmLHQPqV3JETFnRd_-Uh0mk,165
226
- khoj/interface/compiled/_next/static/css/55d4a822f8d94b67.css,sha256=b-RKnqiBrS6JXlJlzLyBaduMx3mJEF8LLjNKyxUW9lA,6259
227
- khoj/interface/compiled/_next/static/css/804ceddd6c935d4a.css,sha256=mCG9Ub3obgXHyCMkyg8VNqQQbFJwkNqRJikvwmTkZmI,30562
227
+ khoj/interface/compiled/_next/static/css/440ae0f0f650dc35.css,sha256=FlGtVO8aI0FrkVFsPQdk1PO5ECGYJrF1tEmLXVuAIvk,1674
228
228
  khoj/interface/compiled/_next/static/css/a3411982c232c7be.css,sha256=UGadDOcJNH08WO3ZRsFaqiJKQPdECwhg7zKAcl886-U,3075405
229
- khoj/interface/compiled/_next/static/css/b15666ef52060cd0.css,sha256=JMH_WAG7ZoebkDxeKdDq1L4liB_nAh3ayim8JT6r1Js,1737
230
229
  khoj/interface/compiled/_next/static/css/e4eb883b5265d372.css,sha256=6LaW-lQ_ZpgOJNWYwU1Q1egXZ1aqJDEuRj66oRCIU_E,17748
231
230
  khoj/interface/compiled/_next/static/css/ea5485b3f3859a5a.css,sha256=tn6qi2xSLTWhtzDUE8UlC8iipH9QGV6A9oGj1ap-Sk4,1659
231
+ khoj/interface/compiled/_next/static/css/f29752d6e1be7624.css,sha256=mLPRnYpBFaVhTMJ3CFou5_lrwLJs2mhBlAjNY2lrRYs,6354
232
232
  khoj/interface/compiled/_next/static/media/1d8a05b60287ae6c-s.p.woff2,sha256=IzKBwB_bpSGvO7C9aRv29Js-jAbZPRDI-D-P4H2P918,14508
233
233
  khoj/interface/compiled/_next/static/media/6f22fce21a7c433c-s.woff2,sha256=T773llrgKNUxGlJzhaH0DUs2rcuRHU7bQpf0DTC4sSU,21812
234
234
  khoj/interface/compiled/_next/static/media/77c207b095007c34-s.p.woff2,sha256=vk9tBKB084h1U8mxwJ5WNHDz_pdUVqE_xb9-ILVhKXY,168144
@@ -302,8 +302,8 @@ khoj/interface/compiled/_next/static/media/flags.3afdda2f.webp,sha256=M2AW_HLpBn
302
302
  khoj/interface/compiled/_next/static/media/flags@2x.5fbe9fc1.webp,sha256=BBeRPBZkxY3-aKkMnYv5TSkxmbeMbyUH4VRIPfrWg1E,137406
303
303
  khoj/interface/compiled/_next/static/media/globe.98e105ca.webp,sha256=g3ofb8-W9GM75zIhlvQhaS8I2py9TtrovOKR3_7Jf04,514
304
304
  khoj/interface/compiled/_next/static/media/globe@2x.974df6f8.webp,sha256=I_N7Yke3IOoS-0CC6XD8o0IUWG8PdPbrHmf6lpgWlZY,1380
305
- khoj/interface/compiled/agents/index.html,sha256=uTk0hKEOP_MGOuWGTIcl4yzCoCI5dQq3jL0WWVXqeO0,19256
306
- khoj/interface/compiled/agents/index.txt,sha256=py0pYynqjKWzFQ3zP03sXCJwEXweJFwsb0KV6VMH1TM,8706
305
+ khoj/interface/compiled/agents/index.html,sha256=jgaVTvQMuPEsJDnzB6XKZ-RiM-GSEIRce7W581Hqp_I,19256
306
+ khoj/interface/compiled/agents/index.txt,sha256=nKzeu4eGI7vIjof9JfRAVP6rCzUd1s7qSn1ubIto-dU,8706
307
307
  khoj/interface/compiled/assets/icons/khoj_lantern.ico,sha256=eggu-B_v3z1R53EjOFhIqqPnICBGdoaw1xnc0NrzHck,174144
308
308
  khoj/interface/compiled/assets/icons/khoj_lantern.svg,sha256=I_8XP5X84gEOoCRhCRKOQn_GKZrz3SUBXct7WxHvY7c,8767
309
309
  khoj/interface/compiled/assets/icons/khoj_lantern_1200x1200.png,sha256=xDx0bbD-WMflgg8zck9oPIIuTIvywtuED2k7CjSQS4w,66194
@@ -318,16 +318,16 @@ khoj/interface/compiled/assets/samples/desktop-remember-plan-sample.png,sha256=i
318
318
  khoj/interface/compiled/assets/samples/phone-browse-draw-sample.png,sha256=Dd4fPwtFl6BWqnHjeb1mCK_ND0hhHsWtx8sNE7EiMuE,406179
319
319
  khoj/interface/compiled/assets/samples/phone-plain-chat-sample.png,sha256=DEDaNRCkfEWUeh3kYZWIQDTVK1a6KKnYdwj5ZWisN_Q,82985
320
320
  khoj/interface/compiled/assets/samples/phone-remember-plan-sample.png,sha256=Ma3blirRmq3X4oYSsDbbT7MDn29rymDrjwmUfA9BMuM,236285
321
- khoj/interface/compiled/automations/index.html,sha256=geDKAg9D_oopYlIZ9BTEJf61HGzz-yGPo3JsUYQcx-8,55923
322
- khoj/interface/compiled/automations/index.txt,sha256=XyeLdMQ3-w2xOQY-fg6wQj5LoK6vUCoBKgfdpWnd2q8,8303
323
- khoj/interface/compiled/chat/index.html,sha256=BmPXfkDWqOxUYf5ZAjDJd-3p7EwpopTetL_CgbvyBgs,56251
324
- khoj/interface/compiled/chat/index.txt,sha256=49h4Xdq2oPFkxIjfTC3E8MAN_GcDkirEfKa4CPnQRSw,9342
325
- khoj/interface/compiled/search/index.html,sha256=yc-UqFMaNu4UMXaAWjhOrvCzzVlL4Qtgif0iZORnH1o,58343
326
- khoj/interface/compiled/search/index.txt,sha256=PiNkjFLRFTIEIufP1ZOStfBHbs3CssiZM7jsVNv43Es,8038
327
- khoj/interface/compiled/settings/index.html,sha256=K9WEZhpb3GABR-us5olsHxaYK54U_3AmKYyrpwnKTOQ,55817
328
- khoj/interface/compiled/settings/index.txt,sha256=1aU2JMbDq29crQaQ7TQu6L2Uo_9m5-tEjQ7uWWn6sdQ,9383
329
- khoj/interface/compiled/share/chat/index.html,sha256=tqWYZU1vl-VoAQ8SJ2tijIWjEw6WcQ30ZtGH5rUeZFc,56843
330
- khoj/interface/compiled/share/chat/index.txt,sha256=T1OgEbaYqNHQl-6LwekVKXjon4L5lZt5a8PKT2I2gQc,9810
321
+ khoj/interface/compiled/automations/index.html,sha256=xyWH2uXQJC4lvZHPB5Iw_Vv5K__58YA0lRbt9nBR8-o,55923
322
+ khoj/interface/compiled/automations/index.txt,sha256=Y2D2QTPPVVp4oL8foGdOoXcsDH2L0KzeBy8Pb5nLLs4,8303
323
+ khoj/interface/compiled/chat/index.html,sha256=q-T5KRQQ3kjSm1ZfNNEnXo_zLPwOLL1BebYx8GCDjmA,56561
324
+ khoj/interface/compiled/chat/index.txt,sha256=7d0UcsVwZEkeciJGfMBN-5hP7VaPtTr4Q2vGm72xLeM,9475
325
+ khoj/interface/compiled/search/index.html,sha256=LfeWq-QI0nL1VJKjQY2tldFju12DCAKy5R8eUUToIUk,58343
326
+ khoj/interface/compiled/search/index.txt,sha256=id_4cxHrXDb-0_qOP3_hMCmV__6pbouhSkA7vz1-Q7I,8038
327
+ khoj/interface/compiled/settings/index.html,sha256=ycu1RiSgsJb_Aotlj-uGV-NkKaDHgj3j5zbsWshANkA,55817
328
+ khoj/interface/compiled/settings/index.txt,sha256=JhDhT9k5guIGLpQ4DTvDv8MhO6mDTyPNUDU0u_UOqpM,9383
329
+ khoj/interface/compiled/share/chat/index.html,sha256=yVtNWZ0ZJaLjUHTBXj54kQhXFZgN8-yk-ky2j8Dcj-s,56533
330
+ khoj/interface/compiled/share/chat/index.txt,sha256=9i8UNIvuZPIT7x6bXgmv-oF68pFbwcNNwIOKwvcVopM,9677
331
331
  khoj/interface/email/feedback.html,sha256=xksuPFamx4hGWyTTxZKRgX_eiYQQEuv-eK9Xmkt-nwU,1216
332
332
  khoj/interface/email/magic_link.html,sha256=372ESbTPKM9acekuZcOIKOw6kBl-KikFg_L9MOHqJkg,2094
333
333
  khoj/interface/email/task.html,sha256=tY7a0gzVeQ2lSQNu7WyXR_s7VYeWTrxWEj1iHVuoVE4,2813
@@ -379,13 +379,13 @@ khoj/processor/content/pdf/pdf_to_entries.py,sha256=GQUvab61okhV9_DK0g2MCrMq8wKp
379
379
  khoj/processor/content/plaintext/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
380
380
  khoj/processor/content/plaintext/plaintext_to_entries.py,sha256=wFZwK_zIc7gWbRtO9sOHo9KvfhGAzL9psX_nKWYFduo,4975
381
381
  khoj/processor/conversation/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
382
- khoj/processor/conversation/prompts.py,sha256=v6wvdqBSSjiCEWPM1kfmehRXItSJmmTNyxSgJRGerqE,55667
382
+ khoj/processor/conversation/prompts.py,sha256=hCzUjEno-TdTdq5fVo3s-B6l0KdpCmEoC4OYgooQ33s,57082
383
383
  khoj/processor/conversation/utils.py,sha256=v8OfwjTi0dyGdA4eSwf9BgeCquhLM3gvB72T7wWCBJY,33012
384
384
  khoj/processor/conversation/anthropic/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
385
385
  khoj/processor/conversation/anthropic/anthropic_chat.py,sha256=2jLTh-5WiGcsm1b5pla9UDjeTrPFfck2TOPPex5MN4c,8962
386
386
  khoj/processor/conversation/anthropic/utils.py,sha256=En5uBBsxDBWb6QTs5g8nH_f2FVBX1uYK40i13fDRAhc,7327
387
387
  khoj/processor/conversation/google/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
388
- khoj/processor/conversation/google/gemini_chat.py,sha256=dl5teYkosZzQxgbVaBfaXqMWXLX6dV__9T1z3p_wqlY,9153
388
+ khoj/processor/conversation/google/gemini_chat.py,sha256=vZbNqDncMmHhhuZDKjjQX7AJKdtbef9NHwNOKRhuGfM,9203
389
389
  khoj/processor/conversation/google/utils.py,sha256=1heNnuxYe2b6HVLYJke3XOenLhzltYPFoJl0nkbFuc4,10832
390
390
  khoj/processor/conversation/offline/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
391
391
  khoj/processor/conversation/offline/chat_model.py,sha256=Sr0VpCipeWdEnuOQjgBo89uPZzQkQRSdTo5fm0EZTpI,11326
@@ -400,7 +400,7 @@ khoj/processor/speech/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3h
400
400
  khoj/processor/speech/text_to_speech.py,sha256=Q7sapi5Hv6woXOumtrGqR0t6izZrFBkWXFOGrHM6dJ4,1929
401
401
  khoj/processor/tools/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
402
402
  khoj/processor/tools/online_search.py,sha256=2cK6e-AlHyrxDzXwEkEMOfe9BwdHf6FoB19O_uX59bA,21458
403
- khoj/processor/tools/run_code.py,sha256=pa8slKYU21yDxBxK2CoQTEwHxZIANA_-bI8GhEDjvxc,6547
403
+ khoj/processor/tools/run_code.py,sha256=PbUutXac_ahykkzlCwlDhFMXuz8HbAsqdmoB08dYjXA,12074
404
404
  khoj/routers/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
405
405
  khoj/routers/api.py,sha256=VbB38oU-dnaNpUhZPLlPmdksOH_l6z_F3Lza7NPSN6Q,29113
406
406
  khoj/routers/api_agents.py,sha256=Z0Ska8_KaE1N5Qx8L-Hdp-LctCl7e_yxkadF1d-BYKI,15291
@@ -427,17 +427,17 @@ khoj/search_type/text_search.py,sha256=PZzJVCXpeBM795SIqiAKXAxgnCp1NIRiVikm040r1
427
427
  khoj/utils/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
428
428
  khoj/utils/cli.py,sha256=IIZ2qH0v7Jmqw3JRH1K5EMp9TRze6en3GYsASnglMEM,3916
429
429
  khoj/utils/config.py,sha256=aiOkH0je8A30DAGYTHMRePrgJonFv_i07_7CdhhhcdA,1805
430
- khoj/utils/constants.py,sha256=HN66YgIAx7Kho3hn0JUDkTjLvUirnPbOrlAlYNVlBBI,2188
430
+ khoj/utils/constants.py,sha256=iElHsro665wglyDgVjIjJ2ovdcjDzLG_6RdG0Gd2XYs,2245
431
431
  khoj/utils/fs_syncer.py,sha256=5nqwAZqRk3Nwhkwd8y4IomTPZQmW32GwAqyMzal5KyY,9996
432
- khoj/utils/helpers.py,sha256=Z9IHxiAIZyVKs0wCGyrTrtUuRseouOFPWqxKSyhGgfg,23931
433
- khoj/utils/initialization.py,sha256=tnmNBIxYCqGV7UqXmnThedojN--ypiFyv1ST9kbWGYg,13992
432
+ khoj/utils/helpers.py,sha256=-r1_A8vgr6EGsYIRX-6mS9Xh23jbk_FRfL59UiHJPHc,24359
433
+ khoj/utils/initialization.py,sha256=wDBlLAmKWKYEpZKEyxbOo0Cos9_CrUoVLkiy9SwqzfY,14723
434
434
  khoj/utils/jsonl.py,sha256=0Ac_COqr8sLCXntzZtquxuCEVRM2c3yKeDRGhgOBRpQ,1192
435
435
  khoj/utils/models.py,sha256=Q5tcC9-z25sCiub048fLnvZ6_IIO1bcPNxt5payekk0,2009
436
436
  khoj/utils/rawconfig.py,sha256=wfZTk-Aifb-_q9Yh-NPfh9LlLTioYG-yBqrasgvo4pc,5045
437
437
  khoj/utils/state.py,sha256=axjZhnby8L3bY-N1VVoWgBH1RpFGK6U3_ZeNo1Kt7hs,1679
438
438
  khoj/utils/yaml.py,sha256=qy1Tkc61rDMesBw_Cyx2vOR6H-Hngcsm5kYfjwQBwkE,1543
439
- khoj-1.36.7.dev7.dist-info/METADATA,sha256=j06in9p0pzhlvnqCNITKJBpZXZJGi8o3NEHiW7h-hEk,7744
440
- khoj-1.36.7.dev7.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
441
- khoj-1.36.7.dev7.dist-info/entry_points.txt,sha256=KBIcez5N_jCgq_ER4Uxf-e1lxTBMTE_BBjMwwfeZyAg,39
442
- khoj-1.36.7.dev7.dist-info/licenses/LICENSE,sha256=hIahDEOTzuHCU5J2nd07LWwkLW7Hko4UFO__ffsvB-8,34523
443
- khoj-1.36.7.dev7.dist-info/RECORD,,
439
+ khoj-1.36.7.dev18.dist-info/METADATA,sha256=3LWJxdinFbKxxfYTRfnpJYiOpV9aSofYV-nFpSK_WoA,7788
440
+ khoj-1.36.7.dev18.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
441
+ khoj-1.36.7.dev18.dist-info/entry_points.txt,sha256=KBIcez5N_jCgq_ER4Uxf-e1lxTBMTE_BBjMwwfeZyAg,39
442
+ khoj-1.36.7.dev18.dist-info/licenses/LICENSE,sha256=hIahDEOTzuHCU5J2nd07LWwkLW7Hko4UFO__ffsvB-8,34523
443
+ khoj-1.36.7.dev18.dist-info/RECORD,,