khoj 1.16.1.dev15__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 (242) hide show
  1. khoj/__init__.py +0 -0
  2. khoj/app/README.md +94 -0
  3. khoj/app/__init__.py +0 -0
  4. khoj/app/asgi.py +16 -0
  5. khoj/app/settings.py +192 -0
  6. khoj/app/urls.py +25 -0
  7. khoj/configure.py +424 -0
  8. khoj/database/__init__.py +0 -0
  9. khoj/database/adapters/__init__.py +1234 -0
  10. khoj/database/admin.py +290 -0
  11. khoj/database/apps.py +6 -0
  12. khoj/database/management/__init__.py +0 -0
  13. khoj/database/management/commands/__init__.py +0 -0
  14. khoj/database/management/commands/change_generated_images_url.py +61 -0
  15. khoj/database/management/commands/convert_images_png_to_webp.py +99 -0
  16. khoj/database/migrations/0001_khojuser.py +98 -0
  17. khoj/database/migrations/0002_googleuser.py +32 -0
  18. khoj/database/migrations/0003_vector_extension.py +10 -0
  19. khoj/database/migrations/0004_content_types_and_more.py +181 -0
  20. khoj/database/migrations/0005_embeddings_corpus_id.py +19 -0
  21. khoj/database/migrations/0006_embeddingsdates.py +33 -0
  22. khoj/database/migrations/0007_add_conversation.py +27 -0
  23. khoj/database/migrations/0008_alter_conversation_conversation_log.py +17 -0
  24. khoj/database/migrations/0009_khojapiuser.py +24 -0
  25. khoj/database/migrations/0010_chatmodeloptions_and_more.py +83 -0
  26. khoj/database/migrations/0010_rename_embeddings_entry_and_more.py +30 -0
  27. khoj/database/migrations/0011_merge_20231102_0138.py +14 -0
  28. khoj/database/migrations/0012_entry_file_source.py +21 -0
  29. khoj/database/migrations/0013_subscription.py +37 -0
  30. khoj/database/migrations/0014_alter_googleuser_picture.py +17 -0
  31. khoj/database/migrations/0015_alter_subscription_user.py +21 -0
  32. khoj/database/migrations/0016_alter_subscription_renewal_date.py +17 -0
  33. khoj/database/migrations/0017_searchmodel.py +32 -0
  34. khoj/database/migrations/0018_searchmodelconfig_delete_searchmodel.py +30 -0
  35. khoj/database/migrations/0019_alter_googleuser_family_name_and_more.py +27 -0
  36. khoj/database/migrations/0020_reflectivequestion.py +36 -0
  37. khoj/database/migrations/0021_speechtotextmodeloptions_and_more.py +42 -0
  38. khoj/database/migrations/0022_texttoimagemodelconfig.py +25 -0
  39. khoj/database/migrations/0023_usersearchmodelconfig.py +33 -0
  40. khoj/database/migrations/0024_alter_entry_embeddings.py +18 -0
  41. khoj/database/migrations/0025_clientapplication_khojuser_phone_number_and_more.py +46 -0
  42. khoj/database/migrations/0025_searchmodelconfig_embeddings_inference_endpoint_and_more.py +22 -0
  43. khoj/database/migrations/0026_searchmodelconfig_cross_encoder_inference_endpoint_and_more.py +22 -0
  44. khoj/database/migrations/0027_merge_20240118_1324.py +13 -0
  45. khoj/database/migrations/0028_khojuser_verified_phone_number.py +17 -0
  46. khoj/database/migrations/0029_userrequests.py +27 -0
  47. khoj/database/migrations/0030_conversation_slug_and_title.py +38 -0
  48. khoj/database/migrations/0031_agent_conversation_agent.py +53 -0
  49. khoj/database/migrations/0031_alter_googleuser_locale.py +30 -0
  50. khoj/database/migrations/0032_merge_20240322_0427.py +14 -0
  51. khoj/database/migrations/0033_rename_tuning_agent_personality.py +17 -0
  52. khoj/database/migrations/0034_alter_chatmodeloptions_chat_model.py +32 -0
  53. khoj/database/migrations/0035_processlock.py +26 -0
  54. khoj/database/migrations/0036_alter_processlock_name.py +19 -0
  55. khoj/database/migrations/0036_delete_offlinechatprocessorconversationconfig.py +15 -0
  56. khoj/database/migrations/0036_publicconversation.py +42 -0
  57. khoj/database/migrations/0037_chatmodeloptions_openai_config_and_more.py +51 -0
  58. khoj/database/migrations/0037_searchmodelconfig_bi_encoder_docs_encode_config_and_more.py +32 -0
  59. khoj/database/migrations/0038_merge_20240425_0857.py +14 -0
  60. khoj/database/migrations/0038_merge_20240426_1640.py +12 -0
  61. khoj/database/migrations/0039_merge_20240501_0301.py +12 -0
  62. khoj/database/migrations/0040_alter_processlock_name.py +26 -0
  63. khoj/database/migrations/0040_merge_20240504_1010.py +14 -0
  64. khoj/database/migrations/0041_merge_20240505_1234.py +14 -0
  65. khoj/database/migrations/0042_serverchatsettings.py +46 -0
  66. khoj/database/migrations/0043_alter_chatmodeloptions_model_type.py +21 -0
  67. khoj/database/migrations/0044_conversation_file_filters.py +17 -0
  68. khoj/database/migrations/0045_fileobject.py +37 -0
  69. khoj/database/migrations/0046_khojuser_email_verification_code_and_more.py +22 -0
  70. khoj/database/migrations/0047_alter_entry_file_type.py +31 -0
  71. khoj/database/migrations/0048_voicemodeloption_uservoicemodelconfig.py +52 -0
  72. khoj/database/migrations/0049_datastore.py +38 -0
  73. khoj/database/migrations/0049_texttoimagemodelconfig_api_key_and_more.py +58 -0
  74. khoj/database/migrations/0050_alter_processlock_name.py +25 -0
  75. khoj/database/migrations/0051_merge_20240702_1220.py +14 -0
  76. khoj/database/migrations/0052_alter_searchmodelconfig_bi_encoder_docs_encode_config_and_more.py +27 -0
  77. khoj/database/migrations/__init__.py +0 -0
  78. khoj/database/models/__init__.py +402 -0
  79. khoj/database/tests.py +3 -0
  80. khoj/interface/email/feedback.html +34 -0
  81. khoj/interface/email/magic_link.html +17 -0
  82. khoj/interface/email/task.html +40 -0
  83. khoj/interface/email/welcome.html +61 -0
  84. khoj/interface/web/404.html +56 -0
  85. khoj/interface/web/agent.html +312 -0
  86. khoj/interface/web/agents.html +276 -0
  87. khoj/interface/web/assets/icons/agents.svg +6 -0
  88. khoj/interface/web/assets/icons/automation.svg +37 -0
  89. khoj/interface/web/assets/icons/cancel.svg +3 -0
  90. khoj/interface/web/assets/icons/chat.svg +24 -0
  91. khoj/interface/web/assets/icons/collapse.svg +17 -0
  92. khoj/interface/web/assets/icons/computer.png +0 -0
  93. khoj/interface/web/assets/icons/confirm-icon.svg +1 -0
  94. khoj/interface/web/assets/icons/copy-button-success.svg +6 -0
  95. khoj/interface/web/assets/icons/copy-button.svg +5 -0
  96. khoj/interface/web/assets/icons/credit-card.png +0 -0
  97. khoj/interface/web/assets/icons/delete.svg +26 -0
  98. khoj/interface/web/assets/icons/docx.svg +7 -0
  99. khoj/interface/web/assets/icons/edit.svg +4 -0
  100. khoj/interface/web/assets/icons/favicon-128x128.ico +0 -0
  101. khoj/interface/web/assets/icons/favicon-128x128.png +0 -0
  102. khoj/interface/web/assets/icons/favicon-256x256.png +0 -0
  103. khoj/interface/web/assets/icons/favicon.icns +0 -0
  104. khoj/interface/web/assets/icons/github.svg +1 -0
  105. khoj/interface/web/assets/icons/key.svg +4 -0
  106. khoj/interface/web/assets/icons/khoj-logo-sideways-200.png +0 -0
  107. khoj/interface/web/assets/icons/khoj-logo-sideways-500.png +0 -0
  108. khoj/interface/web/assets/icons/khoj-logo-sideways.svg +5385 -0
  109. khoj/interface/web/assets/icons/logotype.svg +1 -0
  110. khoj/interface/web/assets/icons/markdown.svg +1 -0
  111. khoj/interface/web/assets/icons/new.svg +23 -0
  112. khoj/interface/web/assets/icons/notion.svg +4 -0
  113. khoj/interface/web/assets/icons/openai-logomark.svg +1 -0
  114. khoj/interface/web/assets/icons/org.svg +1 -0
  115. khoj/interface/web/assets/icons/pdf.svg +23 -0
  116. khoj/interface/web/assets/icons/pencil-edit.svg +5 -0
  117. khoj/interface/web/assets/icons/plaintext.svg +1 -0
  118. khoj/interface/web/assets/icons/question-mark-icon.svg +1 -0
  119. khoj/interface/web/assets/icons/search.svg +25 -0
  120. khoj/interface/web/assets/icons/send.svg +1 -0
  121. khoj/interface/web/assets/icons/share.svg +8 -0
  122. khoj/interface/web/assets/icons/speaker.svg +4 -0
  123. khoj/interface/web/assets/icons/stop-solid.svg +37 -0
  124. khoj/interface/web/assets/icons/sync.svg +4 -0
  125. khoj/interface/web/assets/icons/thumbs-down-svgrepo-com.svg +6 -0
  126. khoj/interface/web/assets/icons/thumbs-up-svgrepo-com.svg +6 -0
  127. khoj/interface/web/assets/icons/user-silhouette.svg +4 -0
  128. khoj/interface/web/assets/icons/voice.svg +8 -0
  129. khoj/interface/web/assets/icons/web.svg +2 -0
  130. khoj/interface/web/assets/icons/whatsapp.svg +17 -0
  131. khoj/interface/web/assets/khoj.css +237 -0
  132. khoj/interface/web/assets/markdown-it.min.js +8476 -0
  133. khoj/interface/web/assets/natural-cron.min.js +1 -0
  134. khoj/interface/web/assets/org.min.js +1823 -0
  135. khoj/interface/web/assets/pico.min.css +5 -0
  136. khoj/interface/web/assets/purify.min.js +3 -0
  137. khoj/interface/web/assets/samples/desktop-browse-draw-sample.png +0 -0
  138. khoj/interface/web/assets/samples/desktop-plain-chat-sample.png +0 -0
  139. khoj/interface/web/assets/samples/desktop-remember-plan-sample.png +0 -0
  140. khoj/interface/web/assets/samples/phone-browse-draw-sample.png +0 -0
  141. khoj/interface/web/assets/samples/phone-plain-chat-sample.png +0 -0
  142. khoj/interface/web/assets/samples/phone-remember-plan-sample.png +0 -0
  143. khoj/interface/web/assets/utils.js +33 -0
  144. khoj/interface/web/base_config.html +445 -0
  145. khoj/interface/web/chat.html +3546 -0
  146. khoj/interface/web/config.html +1011 -0
  147. khoj/interface/web/config_automation.html +1103 -0
  148. khoj/interface/web/content_source_computer_input.html +139 -0
  149. khoj/interface/web/content_source_github_input.html +216 -0
  150. khoj/interface/web/content_source_notion_input.html +94 -0
  151. khoj/interface/web/khoj.webmanifest +51 -0
  152. khoj/interface/web/login.html +219 -0
  153. khoj/interface/web/public_conversation.html +2006 -0
  154. khoj/interface/web/search.html +470 -0
  155. khoj/interface/web/utils.html +48 -0
  156. khoj/main.py +241 -0
  157. khoj/manage.py +22 -0
  158. khoj/migrations/__init__.py +0 -0
  159. khoj/migrations/migrate_offline_chat_default_model.py +69 -0
  160. khoj/migrations/migrate_offline_chat_default_model_2.py +71 -0
  161. khoj/migrations/migrate_offline_chat_schema.py +83 -0
  162. khoj/migrations/migrate_offline_model.py +29 -0
  163. khoj/migrations/migrate_processor_config_openai.py +67 -0
  164. khoj/migrations/migrate_server_pg.py +138 -0
  165. khoj/migrations/migrate_version.py +17 -0
  166. khoj/processor/__init__.py +0 -0
  167. khoj/processor/content/__init__.py +0 -0
  168. khoj/processor/content/docx/__init__.py +0 -0
  169. khoj/processor/content/docx/docx_to_entries.py +110 -0
  170. khoj/processor/content/github/__init__.py +0 -0
  171. khoj/processor/content/github/github_to_entries.py +224 -0
  172. khoj/processor/content/images/__init__.py +0 -0
  173. khoj/processor/content/images/image_to_entries.py +118 -0
  174. khoj/processor/content/markdown/__init__.py +0 -0
  175. khoj/processor/content/markdown/markdown_to_entries.py +165 -0
  176. khoj/processor/content/notion/notion_to_entries.py +260 -0
  177. khoj/processor/content/org_mode/__init__.py +0 -0
  178. khoj/processor/content/org_mode/org_to_entries.py +231 -0
  179. khoj/processor/content/org_mode/orgnode.py +532 -0
  180. khoj/processor/content/pdf/__init__.py +0 -0
  181. khoj/processor/content/pdf/pdf_to_entries.py +116 -0
  182. khoj/processor/content/plaintext/__init__.py +0 -0
  183. khoj/processor/content/plaintext/plaintext_to_entries.py +122 -0
  184. khoj/processor/content/text_to_entries.py +297 -0
  185. khoj/processor/conversation/__init__.py +0 -0
  186. khoj/processor/conversation/anthropic/__init__.py +0 -0
  187. khoj/processor/conversation/anthropic/anthropic_chat.py +206 -0
  188. khoj/processor/conversation/anthropic/utils.py +114 -0
  189. khoj/processor/conversation/offline/__init__.py +0 -0
  190. khoj/processor/conversation/offline/chat_model.py +231 -0
  191. khoj/processor/conversation/offline/utils.py +78 -0
  192. khoj/processor/conversation/offline/whisper.py +15 -0
  193. khoj/processor/conversation/openai/__init__.py +0 -0
  194. khoj/processor/conversation/openai/gpt.py +187 -0
  195. khoj/processor/conversation/openai/utils.py +129 -0
  196. khoj/processor/conversation/openai/whisper.py +13 -0
  197. khoj/processor/conversation/prompts.py +758 -0
  198. khoj/processor/conversation/utils.py +262 -0
  199. khoj/processor/embeddings.py +117 -0
  200. khoj/processor/speech/__init__.py +0 -0
  201. khoj/processor/speech/text_to_speech.py +51 -0
  202. khoj/processor/tools/__init__.py +0 -0
  203. khoj/processor/tools/online_search.py +225 -0
  204. khoj/routers/__init__.py +0 -0
  205. khoj/routers/api.py +626 -0
  206. khoj/routers/api_agents.py +43 -0
  207. khoj/routers/api_chat.py +1180 -0
  208. khoj/routers/api_config.py +434 -0
  209. khoj/routers/api_phone.py +86 -0
  210. khoj/routers/auth.py +181 -0
  211. khoj/routers/email.py +133 -0
  212. khoj/routers/helpers.py +1188 -0
  213. khoj/routers/indexer.py +349 -0
  214. khoj/routers/notion.py +91 -0
  215. khoj/routers/storage.py +35 -0
  216. khoj/routers/subscription.py +104 -0
  217. khoj/routers/twilio.py +36 -0
  218. khoj/routers/web_client.py +471 -0
  219. khoj/search_filter/__init__.py +0 -0
  220. khoj/search_filter/base_filter.py +15 -0
  221. khoj/search_filter/date_filter.py +217 -0
  222. khoj/search_filter/file_filter.py +30 -0
  223. khoj/search_filter/word_filter.py +29 -0
  224. khoj/search_type/__init__.py +0 -0
  225. khoj/search_type/text_search.py +241 -0
  226. khoj/utils/__init__.py +0 -0
  227. khoj/utils/cli.py +93 -0
  228. khoj/utils/config.py +81 -0
  229. khoj/utils/constants.py +24 -0
  230. khoj/utils/fs_syncer.py +249 -0
  231. khoj/utils/helpers.py +418 -0
  232. khoj/utils/initialization.py +146 -0
  233. khoj/utils/jsonl.py +43 -0
  234. khoj/utils/models.py +47 -0
  235. khoj/utils/rawconfig.py +160 -0
  236. khoj/utils/state.py +46 -0
  237. khoj/utils/yaml.py +43 -0
  238. khoj-1.16.1.dev15.dist-info/METADATA +178 -0
  239. khoj-1.16.1.dev15.dist-info/RECORD +242 -0
  240. khoj-1.16.1.dev15.dist-info/WHEEL +4 -0
  241. khoj-1.16.1.dev15.dist-info/entry_points.txt +2 -0
  242. khoj-1.16.1.dev15.dist-info/licenses/LICENSE +661 -0
@@ -0,0 +1,32 @@
1
+ # Generated by Django 4.2.10 on 2024-04-24 04:19
2
+
3
+ from django.db import migrations, models
4
+
5
+
6
+ class Migration(migrations.Migration):
7
+ dependencies = [
8
+ ("database", "0036_delete_offlinechatprocessorconversationconfig"),
9
+ ]
10
+
11
+ operations = [
12
+ migrations.AddField(
13
+ model_name="searchmodelconfig",
14
+ name="bi_encoder_docs_encode_config",
15
+ field=models.JSONField(default=dict),
16
+ ),
17
+ migrations.AddField(
18
+ model_name="searchmodelconfig",
19
+ name="bi_encoder_model_config",
20
+ field=models.JSONField(default=dict),
21
+ ),
22
+ migrations.AddField(
23
+ model_name="searchmodelconfig",
24
+ name="bi_encoder_query_encode_config",
25
+ field=models.JSONField(default=dict),
26
+ ),
27
+ migrations.AlterField(
28
+ model_name="searchmodelconfig",
29
+ name="cross_encoder",
30
+ field=models.CharField(default="mixedbread-ai/mxbai-rerank-xsmall-v1", max_length=200),
31
+ ),
32
+ ]
@@ -0,0 +1,14 @@
1
+ # Generated by Django 4.2.10 on 2024-04-25 08:57
2
+
3
+ from typing import List
4
+
5
+ from django.db import migrations
6
+
7
+
8
+ class Migration(migrations.Migration):
9
+ dependencies = [
10
+ ("database", "0037_chatmodeloptions_openai_config_and_more"),
11
+ ("database", "0037_searchmodelconfig_bi_encoder_docs_encode_config_and_more"),
12
+ ]
13
+
14
+ operations: List[str] = []
@@ -0,0 +1,12 @@
1
+ # Generated by Django 4.2.10 on 2024-04-26 16:40
2
+
3
+ from django.db import migrations
4
+
5
+
6
+ class Migration(migrations.Migration):
7
+ dependencies = [
8
+ ("database", "0036_alter_processlock_name"),
9
+ ("database", "0037_searchmodelconfig_bi_encoder_docs_encode_config_and_more"),
10
+ ]
11
+
12
+ operations: list = []
@@ -0,0 +1,12 @@
1
+ # Generated by Django 4.2.10 on 2024-05-01 03:01
2
+
3
+ from django.db import migrations
4
+
5
+
6
+ class Migration(migrations.Migration):
7
+ dependencies = [
8
+ ("database", "0038_merge_20240425_0857"),
9
+ ("database", "0038_merge_20240426_1640"),
10
+ ]
11
+
12
+ operations: list = []
@@ -0,0 +1,26 @@
1
+ # Generated by Django 4.2.10 on 2024-05-04 13:12
2
+
3
+ from django.db import migrations, models
4
+
5
+
6
+ class Migration(migrations.Migration):
7
+ def delete_all_existing_process_locks(apps, schema_editor):
8
+ ProcessLock = apps.get_model("database", "ProcessLock")
9
+ ProcessLock.objects.all().delete()
10
+
11
+ dependencies = [
12
+ ("database", "0039_merge_20240501_0301"),
13
+ ]
14
+
15
+ operations = [
16
+ migrations.AlterField(
17
+ model_name="processlock",
18
+ name="name",
19
+ field=models.CharField(
20
+ choices=[("index_content", "Index Content"), ("scheduled_job", "Scheduled Job")],
21
+ max_length=200,
22
+ unique=True,
23
+ ),
24
+ ),
25
+ migrations.RunPython(delete_all_existing_process_locks, reverse_code=migrations.RunPython.noop),
26
+ ]
@@ -0,0 +1,14 @@
1
+ # Generated by Django 4.2.10 on 2024-05-04 10:10
2
+
3
+ from typing import List
4
+
5
+ from django.db import migrations
6
+
7
+
8
+ class Migration(migrations.Migration):
9
+ dependencies = [
10
+ ("database", "0036_publicconversation"),
11
+ ("database", "0039_merge_20240501_0301"),
12
+ ]
13
+
14
+ operations: List[str] = []
@@ -0,0 +1,14 @@
1
+ # Generated by Django 4.2.10 on 2024-05-05 12:34
2
+
3
+ from typing import List
4
+
5
+ from django.db import migrations
6
+
7
+
8
+ class Migration(migrations.Migration):
9
+ dependencies = [
10
+ ("database", "0040_alter_processlock_name"),
11
+ ("database", "0040_merge_20240504_1010"),
12
+ ]
13
+
14
+ operations: List[str] = []
@@ -0,0 +1,46 @@
1
+ # Generated by Django 4.2.10 on 2024-04-29 11:04
2
+
3
+ import django.db.models.deletion
4
+ from django.db import migrations, models
5
+
6
+
7
+ class Migration(migrations.Migration):
8
+ dependencies = [
9
+ ("database", "0041_merge_20240505_1234"),
10
+ ]
11
+
12
+ operations = [
13
+ migrations.CreateModel(
14
+ name="ServerChatSettings",
15
+ fields=[
16
+ ("id", models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name="ID")),
17
+ ("created_at", models.DateTimeField(auto_now_add=True)),
18
+ ("updated_at", models.DateTimeField(auto_now=True)),
19
+ (
20
+ "default_model",
21
+ models.ForeignKey(
22
+ blank=True,
23
+ default=None,
24
+ null=True,
25
+ on_delete=django.db.models.deletion.CASCADE,
26
+ related_name="default_model",
27
+ to="database.chatmodeloptions",
28
+ ),
29
+ ),
30
+ (
31
+ "summarizer_model",
32
+ models.ForeignKey(
33
+ blank=True,
34
+ default=None,
35
+ null=True,
36
+ on_delete=django.db.models.deletion.CASCADE,
37
+ related_name="summarizer_model",
38
+ to="database.chatmodeloptions",
39
+ ),
40
+ ),
41
+ ],
42
+ options={
43
+ "abstract": False,
44
+ },
45
+ ),
46
+ ]
@@ -0,0 +1,21 @@
1
+ # Generated by Django 4.2.10 on 2024-05-26 12:35
2
+
3
+ from django.db import migrations, models
4
+
5
+
6
+ class Migration(migrations.Migration):
7
+ dependencies = [
8
+ ("database", "0042_serverchatsettings"),
9
+ ]
10
+
11
+ operations = [
12
+ migrations.AlterField(
13
+ model_name="chatmodeloptions",
14
+ name="model_type",
15
+ field=models.CharField(
16
+ choices=[("openai", "Openai"), ("offline", "Offline"), ("anthropic", "Anthropic")],
17
+ default="offline",
18
+ max_length=200,
19
+ ),
20
+ ),
21
+ ]
@@ -0,0 +1,17 @@
1
+ # Generated by Django 4.2.11 on 2024-06-14 04:36
2
+
3
+ from django.db import migrations, models
4
+
5
+
6
+ class Migration(migrations.Migration):
7
+ dependencies = [
8
+ ("database", "0043_alter_chatmodeloptions_model_type"),
9
+ ]
10
+
11
+ operations = [
12
+ migrations.AddField(
13
+ model_name="conversation",
14
+ name="file_filters",
15
+ field=models.JSONField(default=list),
16
+ ),
17
+ ]
@@ -0,0 +1,37 @@
1
+ # Generated by Django 4.2.11 on 2024-06-14 06:13
2
+
3
+ import django.db.models.deletion
4
+ from django.conf import settings
5
+ from django.db import migrations, models
6
+
7
+
8
+ class Migration(migrations.Migration):
9
+ dependencies = [
10
+ ("database", "0044_conversation_file_filters"),
11
+ ]
12
+
13
+ operations = [
14
+ migrations.CreateModel(
15
+ name="FileObject",
16
+ fields=[
17
+ ("id", models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name="ID")),
18
+ ("created_at", models.DateTimeField(auto_now_add=True)),
19
+ ("updated_at", models.DateTimeField(auto_now=True)),
20
+ ("file_name", models.CharField(blank=True, default=None, max_length=400, null=True)),
21
+ ("raw_text", models.TextField()),
22
+ (
23
+ "user",
24
+ models.ForeignKey(
25
+ blank=True,
26
+ default=None,
27
+ null=True,
28
+ on_delete=django.db.models.deletion.CASCADE,
29
+ to=settings.AUTH_USER_MODEL,
30
+ ),
31
+ ),
32
+ ],
33
+ options={
34
+ "abstract": False,
35
+ },
36
+ ),
37
+ ]
@@ -0,0 +1,22 @@
1
+ # Generated by Django 4.2.11 on 2024-06-17 08:23
2
+
3
+ from django.db import migrations, models
4
+
5
+
6
+ class Migration(migrations.Migration):
7
+ dependencies = [
8
+ ("database", "0045_fileobject"),
9
+ ]
10
+
11
+ operations = [
12
+ migrations.AddField(
13
+ model_name="khojuser",
14
+ name="email_verification_code",
15
+ field=models.CharField(blank=True, default=None, max_length=200, null=True),
16
+ ),
17
+ migrations.AddField(
18
+ model_name="khojuser",
19
+ name="verified_email",
20
+ field=models.BooleanField(default=False),
21
+ ),
22
+ ]
@@ -0,0 +1,31 @@
1
+ # Generated by Django 4.2.11 on 2024-06-21 04:17
2
+
3
+ from django.db import migrations, models
4
+
5
+
6
+ class Migration(migrations.Migration):
7
+ dependencies = [
8
+ ("database", "0046_khojuser_email_verification_code_and_more"),
9
+ ]
10
+
11
+ operations = [
12
+ migrations.AlterField(
13
+ model_name="entry",
14
+ name="file_type",
15
+ field=models.CharField(
16
+ choices=[
17
+ ("image", "Image"),
18
+ ("pdf", "Pdf"),
19
+ ("plaintext", "Plaintext"),
20
+ ("markdown", "Markdown"),
21
+ ("org", "Org"),
22
+ ("notion", "Notion"),
23
+ ("github", "Github"),
24
+ ("conversation", "Conversation"),
25
+ ("docx", "Docx"),
26
+ ],
27
+ default="plaintext",
28
+ max_length=30,
29
+ ),
30
+ ),
31
+ ]
@@ -0,0 +1,52 @@
1
+ # Generated by Django 4.2.11 on 2024-06-21 04:18
2
+
3
+ import django.db.models.deletion
4
+ from django.conf import settings
5
+ from django.db import migrations, models
6
+
7
+
8
+ class Migration(migrations.Migration):
9
+ dependencies = [
10
+ ("database", "0047_alter_entry_file_type"),
11
+ ]
12
+
13
+ operations = [
14
+ migrations.CreateModel(
15
+ name="VoiceModelOption",
16
+ fields=[
17
+ ("id", models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name="ID")),
18
+ ("created_at", models.DateTimeField(auto_now_add=True)),
19
+ ("updated_at", models.DateTimeField(auto_now=True)),
20
+ ("model_id", models.CharField(max_length=200)),
21
+ ("name", models.CharField(max_length=200)),
22
+ ],
23
+ options={
24
+ "abstract": False,
25
+ },
26
+ ),
27
+ migrations.CreateModel(
28
+ name="UserVoiceModelConfig",
29
+ fields=[
30
+ ("id", models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name="ID")),
31
+ ("created_at", models.DateTimeField(auto_now_add=True)),
32
+ ("updated_at", models.DateTimeField(auto_now=True)),
33
+ (
34
+ "setting",
35
+ models.ForeignKey(
36
+ blank=True,
37
+ default=None,
38
+ null=True,
39
+ on_delete=django.db.models.deletion.CASCADE,
40
+ to="database.voicemodeloption",
41
+ ),
42
+ ),
43
+ (
44
+ "user",
45
+ models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL),
46
+ ),
47
+ ],
48
+ options={
49
+ "abstract": False,
50
+ },
51
+ ),
52
+ ]
@@ -0,0 +1,38 @@
1
+ # Generated by Django 4.2.11 on 2024-06-26 17:58
2
+
3
+ import django.db.models.deletion
4
+ from django.conf import settings
5
+ from django.db import migrations, models
6
+
7
+
8
+ class Migration(migrations.Migration):
9
+ dependencies = [
10
+ ("database", "0048_voicemodeloption_uservoicemodelconfig"),
11
+ ]
12
+
13
+ operations = [
14
+ migrations.CreateModel(
15
+ name="DataStore",
16
+ fields=[
17
+ ("id", models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name="ID")),
18
+ ("created_at", models.DateTimeField(auto_now_add=True)),
19
+ ("updated_at", models.DateTimeField(auto_now=True)),
20
+ ("key", models.CharField(max_length=200, unique=True)),
21
+ ("value", models.JSONField(default=dict)),
22
+ ("private", models.BooleanField(default=False)),
23
+ (
24
+ "owner",
25
+ models.ForeignKey(
26
+ blank=True,
27
+ default=None,
28
+ null=True,
29
+ on_delete=django.db.models.deletion.CASCADE,
30
+ to=settings.AUTH_USER_MODEL,
31
+ ),
32
+ ),
33
+ ],
34
+ options={
35
+ "abstract": False,
36
+ },
37
+ ),
38
+ ]
@@ -0,0 +1,58 @@
1
+ # Generated by Django 4.2.11 on 2024-06-26 03:27
2
+
3
+ import django.db.models.deletion
4
+ from django.conf import settings
5
+ from django.db import migrations, models
6
+
7
+
8
+ class Migration(migrations.Migration):
9
+ dependencies = [
10
+ ("database", "0048_voicemodeloption_uservoicemodelconfig"),
11
+ ]
12
+
13
+ operations = [
14
+ migrations.AddField(
15
+ model_name="texttoimagemodelconfig",
16
+ name="api_key",
17
+ field=models.CharField(blank=True, default=None, max_length=200, null=True),
18
+ ),
19
+ migrations.AddField(
20
+ model_name="texttoimagemodelconfig",
21
+ name="openai_config",
22
+ field=models.ForeignKey(
23
+ blank=True,
24
+ default=None,
25
+ null=True,
26
+ on_delete=django.db.models.deletion.CASCADE,
27
+ to="database.openaiprocessorconversationconfig",
28
+ ),
29
+ ),
30
+ migrations.AlterField(
31
+ model_name="texttoimagemodelconfig",
32
+ name="model_type",
33
+ field=models.CharField(
34
+ choices=[("openai", "Openai"), ("stability-ai", "Stabilityai")], default="openai", max_length=200
35
+ ),
36
+ ),
37
+ migrations.CreateModel(
38
+ name="UserTextToImageModelConfig",
39
+ fields=[
40
+ ("id", models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name="ID")),
41
+ ("created_at", models.DateTimeField(auto_now_add=True)),
42
+ ("updated_at", models.DateTimeField(auto_now=True)),
43
+ (
44
+ "setting",
45
+ models.ForeignKey(
46
+ on_delete=django.db.models.deletion.CASCADE, to="database.texttoimagemodelconfig"
47
+ ),
48
+ ),
49
+ (
50
+ "user",
51
+ models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL),
52
+ ),
53
+ ],
54
+ options={
55
+ "abstract": False,
56
+ },
57
+ ),
58
+ ]
@@ -0,0 +1,25 @@
1
+ # Generated by Django 4.2.11 on 2024-06-28 06:11
2
+
3
+ from django.db import migrations, models
4
+
5
+
6
+ class Migration(migrations.Migration):
7
+ dependencies = [
8
+ ("database", "0049_datastore"),
9
+ ]
10
+
11
+ operations = [
12
+ migrations.AlterField(
13
+ model_name="processlock",
14
+ name="name",
15
+ field=models.CharField(
16
+ choices=[
17
+ ("index_content", "Index Content"),
18
+ ("scheduled_job", "Scheduled Job"),
19
+ ("schedule_leader", "Schedule Leader"),
20
+ ],
21
+ max_length=200,
22
+ unique=True,
23
+ ),
24
+ ),
25
+ ]
@@ -0,0 +1,14 @@
1
+ # Generated by Django 4.2.11 on 2024-07-02 12:20
2
+
3
+ from typing import List
4
+
5
+ from django.db import migrations
6
+
7
+
8
+ class Migration(migrations.Migration):
9
+ dependencies = [
10
+ ("database", "0049_texttoimagemodelconfig_api_key_and_more"),
11
+ ("database", "0050_alter_processlock_name"),
12
+ ]
13
+
14
+ operations: List[str] = []
@@ -0,0 +1,27 @@
1
+ # Generated by Django 4.2.11 on 2024-07-08 09:27
2
+
3
+ from django.db import migrations, models
4
+
5
+
6
+ class Migration(migrations.Migration):
7
+ dependencies = [
8
+ ("database", "0051_merge_20240702_1220"),
9
+ ]
10
+
11
+ operations = [
12
+ migrations.AlterField(
13
+ model_name="searchmodelconfig",
14
+ name="bi_encoder_docs_encode_config",
15
+ field=models.JSONField(blank=True, default=dict),
16
+ ),
17
+ migrations.AlterField(
18
+ model_name="searchmodelconfig",
19
+ name="bi_encoder_model_config",
20
+ field=models.JSONField(blank=True, default=dict),
21
+ ),
22
+ migrations.AlterField(
23
+ model_name="searchmodelconfig",
24
+ name="bi_encoder_query_encode_config",
25
+ field=models.JSONField(blank=True, default=dict),
26
+ ),
27
+ ]
File without changes