├── .github ├── CODEOWNERS ├── actions │ └── custom-build-and-push │ │ └── action.yml ├── pull_request_template.md └── workflows │ ├── docker-build-push-backend-container-on-tag.yml │ ├── docker-build-push-cloud-web-container-on-tag.yml │ ├── docker-build-push-model-server-container-on-tag.yml │ ├── docker-build-push-web-container-on-tag.yml │ ├── docker-tag-latest.yml │ ├── hotfix-release-branches.yml │ ├── nightly-close-stale-issues.yml │ ├── nightly-scan-licenses.yml │ ├── pr-backport-autotrigger.yml │ ├── pr-helm-chart-testing.yml │ ├── pr-integration-tests.yml │ ├── pr-linear-check.yml │ ├── pr-mit-integration-tests.yml │ ├── pr-playwright-tests.yml │ ├── pr-python-checks.yml │ ├── pr-python-connector-tests.yml │ ├── pr-python-model-tests.yml │ ├── pr-python-tests.yml │ ├── pr-quality-checks.yml │ └── tag-nightly.yml ├── .gitignore ├── .pre-commit-config.yaml ├── .prettierignore ├── .vscode ├── env_template.txt ├── launch.template.jsonc └── tasks.template.jsonc ├── CONTRIBUTING.md ├── CONTRIBUTING_MACOS.md ├── CONTRIBUTING_VSCODE.md ├── LICENSE ├── README.md ├── backend ├── .dockerignore ├── .gitignore ├── .trivyignore ├── Dockerfile ├── Dockerfile.model_server ├── alembic.ini ├── alembic │ ├── README.md │ ├── env.py │ ├── script.py.mako │ └── versions │ │ ├── 027381bce97c_add_shortcut_option_for_users.py │ │ ├── 0568ccf46a6b_add_thread_specific_model_selection.py │ │ ├── 05c07bf07c00_add_search_doc_relevance_details.py │ │ ├── 08a1eda20fe1_add_earliest_indexing_to_connector.py │ │ ├── 0a2b51deb0b8_add_starter_prompts.py │ │ ├── 0a98909f2757_enable_encrypted_fields.py │ │ ├── 0ebb1d516877_add_ccpair_deletion_failure_message.py │ │ ├── 0f7ff6d75b57_add_index_to_index_attempt_time_created.py │ │ ├── 15326fcec57e_introduce_onyx_apis.py │ │ ├── 173cae5bba26_port_config_store.py │ │ ├── 177de57c21c9_display_custom_llm_models.py │ │ ├── 1a03d2c2856b_add_indexes_to_document__tag.py │ │ ├── 1b10e1fda030_add_additional_data_to_notifications.py │ │ ├── 1b8206b29c5d_add_user_delete_cascades.py │ │ ├── 1f60f60c3401_embedding_model_search_settings.py │ │ ├── 213fd978c6d8_notifications.py │ │ ├── 238b84885828_add_foreign_key_to_user__external_user_.py │ │ ├── 23957775e5f5_remove_feedback_foreignkey_constraint.py │ │ ├── 2666d766cb9b_google_oauth2.py │ │ ├── 26b931506ecb_default_chosen_assistants_to_none.py │ │ ├── 27c6ecc08586_permission_framework.py │ │ ├── 2955778aa44c_add_chunk_count_to_document.py │ │ ├── 2cdeff6d8c93_set_built_in_to_default.py │ │ ├── 2d2304e27d8c_add_above_below_to_persona.py │ │ ├── 2daa494a0851_add_group_sync_time.py │ │ ├── 2f80c6a2550f_add_chat_session_specific_temperature_.py │ │ ├── 30c1d5744104_persona_datetime_aware.py │ │ ├── 325975216eb3_add_icon_color_and_icon_shape_to_persona.py │ │ ├── 33cb72ea4d80_single_tool_call_per_message.py │ │ ├── 33ea50e88f24_foreign_key_input_prompts.py │ │ ├── 351faebd379d_add_curator_fields.py │ │ ├── 35e518e0ddf4_properly_cascade.py │ │ ├── 35e6853a51d5_server_default_chosen_assistants.py │ │ ├── 369644546676_add_composite_index_for_index_attempt_.py │ │ ├── 3781a5eb12cb_add_chunk_stats_table.py │ │ ├── 3879338f8ba1_add_tool_table.py │ │ ├── 38eda64af7fe_add_chat_session_sharing.py │ │ ├── 3934b1bc7b62_update_github_connector_repo_name_to_.py │ │ ├── 3a7802814195_add_alternate_assistant_to_chat_message.py │ │ ├── 3b25685ff73c_move_is_public_to_cc_pair.py │ │ ├── 3bd4c84fe72f_improved_index.py │ │ ├── 3c5e35aa9af0_polling_document_count.py │ │ ├── 3c6531f32351_add_back_input_prompts.py │ │ ├── 401c1ac29467_add_tables_for_ui_based_llm_.py │ │ ├── 43cbbb3f5e6a_rename_index_origin_to_index_recursively.py │ │ ├── 44f856ae2a4a_add_cloud_embedding_model.py │ │ ├── 4505fd7302e1_added_is_internet_to_dbdoc.py │ │ ├── 465f78d9b7f9_larger_access_tokens_for_oauth.py │ │ ├── 46625e4745d4_remove_native_enum.py │ │ ├── 46b7a812670f_fix_user__external_user_group_id_fk.py │ │ ├── 4738e4b3bae1_pg_file_store.py │ │ ├── 473a1a7ca408_add_display_model_names_to_llm_provider.py │ │ ├── 47433d30de82_create_indexattempt_table.py │ │ ├── 475fcefe8826_add_name_to_api_key.py │ │ ├── 4794bc13e484_update_prompt_length.py │ │ ├── 47a07e1a38f1_fix_invalid_model_configurations_state.py │ │ ├── 47e5bef3a1d7_add_persona_categories.py │ │ ├── 48d14957fe80_add_support_for_custom_tools.py │ │ ├── 4a951134c801_moved_status_to_connector_credential_.py │ │ ├── 4b08d97e175a_change_default_prune_freq.py │ │ ├── 4d58345da04a_lowercase_user_emails.py │ │ ├── 4ea2c93919c1_add_type_to_credentials.py │ │ ├── 4ee1287bd26a_add_multiple_slack_bot_support.py │ │ ├── 50b683a8295c_add_additional_retrieval_controls_to_.py │ │ ├── 52a219fb5233_add_last_synced_and_last_modified_to_document_table.py │ │ ├── 54a74a0417fc_danswerbot_onyxbot.py │ │ ├── 55546a7967ee_assistant_rework.py │ │ ├── 570282d33c49_track_onyxbot_explicitly.py │ │ ├── 57b53544726e_add_document_set_tables.py │ │ ├── 5809c0787398_add_chat_sessions.py │ │ ├── 5b29123cd710_nullable_search_settings_for_historic_.py │ │ ├── 5c448911b12f_add_content_type_to_userfile.py │ │ ├── 5c7fdadae813_match_any_keywords_flag_for_standard_.py │ │ ├── 5d12a446f5c0_add_api_version_and_deployment_name_to_.py │ │ ├── 5e84129c8be3_add_docs_indexed_column_to_index_.py │ │ ├── 5f4b8568a221_add_removed_documents_to_index_attempt.py │ │ ├── 5fc1f54cc252_hybrid_enum.py │ │ ├── 61ff3651add4_add_permission_syncing.py │ │ ├── 643a84a42a33_add_user_configured_names_to_llmprovider.py │ │ ├── 6756efa39ada_id_uuid_for_chat_session.py │ │ ├── 6a804aeb4830_duplicated_no_harm_user_file_migration.py │ │ ├── 6d387b3196c2_basic_auth.py │ │ ├── 6d562f86c78b_remove_default_bot.py │ │ ├── 6fc7886d665d_make_categories_labels_and_many_to_many.py │ │ ├── 703313b75876_add_tokenratelimit_tables.py │ │ ├── 70f00c45c0f2_more_descriptive_filestore.py │ │ ├── 72bdc9929a46_permission_auto_sync_framework.py │ │ ├── 7477a5f5d728_added_model_defaults_for_users.py │ │ ├── 7547d982db8f_chat_folders.py │ │ ├── 767f1c2a00eb_count_chat_tokens.py │ │ ├── 76b60d407dfb_cc_pair_name_not_unique.py │ │ ├── 776b3bbe9092_remove_remaining_enums.py │ │ ├── 77d07dffae64_forcibly_remove_more_enum_types_from_.py │ │ ├── 78dbe7e38469_task_tracking.py │ │ ├── 795b20b85b4b_add_llm_group_permissions_control.py │ │ ├── 797089dfb4d2_persona_start_date.py │ │ ├── 79acd316403a_add_api_key_table.py │ │ ├── 7a70b7664e37_add_model_configuration_table.py │ │ ├── 7aea705850d5_added_slack_auto_filter.py │ │ ├── 7ccea01261f6_store_chat_retrieval_docs.py │ │ ├── 7da0ae5ad583_add_description_to_persona.py │ │ ├── 7da543f5672f_add_slackbotconfig_table.py │ │ ├── 7f726bad5367_slack_followup.py │ │ ├── 7f99be1cb9f5_add_index_for_getting_documents_just_by_.py │ │ ├── 800f48024ae9_add_id_to_connectorcredentialpair.py │ │ ├── 80696cf850ae_add_chat_session_to_query_event.py │ │ ├── 891cd83c87a8_add_is_visible_to_persona.py │ │ ├── 8987770549c0_add_full_exception_stack_trace.py │ │ ├── 8a87bd6ec550_associate_index_attempts_with_ccpair.py │ │ ├── 8aabb57f3b49_restructure_document_indices.py │ │ ├── 8e1ac4f39a9f_enable_contextual_retrieval.py │ │ ├── 8e26726b7683_chat_context_addition.py │ │ ├── 8f43500ee275_add_index.py │ │ ├── 904451035c9b_store_tool_details.py │ │ ├── 904e5138fffb_tags.py │ │ ├── 91a0a4d62b14_milestone.py │ │ ├── 91fd3b470d1a_remove_documentsource_from_tag.py │ │ ├── 91ffac7e65b3_add_expiry_time.py │ │ ├── 93560ba1b118_add_web_ui_option_to_slack_config.py │ │ ├── 949b4a92a401_remove_rt.py │ │ ├── 94dc3d0236f8_make_document_set_description_optional.py │ │ ├── 97dbb53fa8c8_add_syncrecord.py │ │ ├── 98a5008d8711_agent_tracking.py │ │ ├── 9aadf32dfeb4_add_user_files.py │ │ ├── 9c00a2bccb83_chat_message_agentic.py │ │ ├── 9cf5c00f72fe_add_creator_to_cc_pair.py │ │ ├── 9d97fecfab7f_added_retrieved_docs_to_query_event.py │ │ ├── 9f696734098f_combine_search_and_chat.py │ │ ├── a3795dce87be_migration_confluence_to_be_explicit.py │ │ ├── a3bfd0d64902_add_chosen_assistants_to_user_table.py │ │ ├── a570b80a5f20_usergroup_tables.py │ │ ├── a6df6b88ef81_remove_recent_assistants.py │ │ ├── a7688ab35c45_add_public_external_user_group_table.py │ │ ├── a8c2065484e6_add_auto_scroll_to_user_model.py │ │ ├── abe7378b8217_add_indexing_trigger_to_cc_pair.py │ │ ├── ac5eaac849f9_add_last_pruned_to_connector_table.py │ │ ├── acaab4ef4507_remove_inactive_ccpair_status_on_.py │ │ ├── ae62505e3acc_add_saml_accounts.py │ │ ├── aeda5f2df4f6_add_pinned_assistants.py │ │ ├── b082fec533f0_make_last_attempt_status_nullable.py │ │ ├── b156fa702355_chat_reworked.py │ │ ├── b388730a2899_nullable_preferences.py │ │ ├── b72ed7a5db0e_remove_description_from_starter_messages.py │ │ ├── b7a7eee5aa15_add_checkpointing_failure_handling.py │ │ ├── b7c2b63c4a03_add_background_reindex_enabled_field.py │ │ ├── b85f02ec1308_fix_file_type_migration.py │ │ ├── b896bbd0d5a7_backfill_is_internet_data_to_false.py │ │ ├── ba98eba0f66a_add_support_for_litellm_proxy_in_.py │ │ ├── baf71f781b9e_add_llm_model_version_override_to_.py │ │ ├── bc9771dccadf_create_usage_reports_table.py │ │ ├── bceb1e139447_add_base_url_to_cloudembeddingprovider.py │ │ ├── bd2921608c3a_non_nullable_default_persona.py │ │ ├── be2ab2aa50ee_fix_capitalization.py │ │ ├── bf7a81109301_delete_input_prompts.py │ │ ├── c0aab6edb6dd_delete_workspace.py │ │ ├── c0fd6e4da83a_add_recent_assistants.py │ │ ├── c18cdf4b497e_add_standard_answer_tables.py │ │ ├── c5b692fa265c_add_index_attempt_errors_table.py │ │ ├── c5eae4a75a1b_add_chat_message__standard_answer_table.py │ │ ├── c7bf5721733e_add_has_been_indexed_to_.py │ │ ├── c99d76fcd298_add_nullable_to_persona_id_in_chat_.py │ │ ├── cf90764725d8_larger_refresh_tokens.py │ │ ├── d5645c915d0e_remove_deletion_attempt_table.py │ │ ├── d61e513bef0a_add_total_docs_for_index_attempt.py │ │ ├── d7111c1238cd_remove_document_ids.py │ │ ├── d716b0791ddd_combined_slack_id_fields.py │ │ ├── d929f0c1c6af_feedback_feature.py │ │ ├── d961aca62eb3_update_status_length.py │ │ ├── d9ec13955951_remove__dim_suffix_from_model_name.py │ │ ├── da42808081e3_migrate_jira_connectors_to_new_format.py │ │ ├── da4c21c69164_chosen_assistants_changed_to_jsonb.py │ │ ├── dab04867cd88_add_composite_index_to_document_by_.py │ │ ├── dba7f71618f5_onyx_custom_tool_flow.py │ │ ├── dbaa756c2ccf_embedding_models.py │ │ ├── df0c7ad8a076_added_deletion_attempt_table.py │ │ ├── df46c75b714e_add_default_vision_provider_to_llm_.py │ │ ├── dfbe9e93d3c7_extended_role_for_non_web.py │ │ ├── e0a68a81d434_add_chat_feedback.py │ │ ├── e1392f05e840_added_input_prompts.py │ │ ├── e209dc5a8156_added_prune_frequency.py │ │ ├── e4334d5b33ba_add_deployment_name_to_llmprovider.py │ │ ├── e50154680a5c_no_source_enum.py │ │ ├── e6a4bbc13fe4_add_index_for_retrieving_latest_index_.py │ │ ├── e86866a9c78a_add_persona_to_chat_session.py │ │ ├── e91df4e935ef_private_personas_documentsets.py │ │ ├── eaa3b5593925_add_default_slack_channel_config.py │ │ ├── ec3ec2eabf7b_index_from_beginning.py │ │ ├── ec85f2b3c544_remove_last_attempt_status_from_cc_pair.py │ │ ├── ecab2b3f1a3b_add_overrides_to_the_chat_session.py │ │ ├── ee3f4b47fad5_added_alternate_model_to_chat_message.py │ │ ├── ef7da92f7213_add_files_to_chatmessage.py │ │ ├── efb35676026c_standard_answer_match_regex_flag.py │ │ ├── f11b408e39d3_force_lowercase_all_users.py │ │ ├── f13db29f3101_add_composite_index_for_last_modified_.py │ │ ├── f17bf3b0d9f1_embedding_provider_by_provider_type.py │ │ ├── f1c6478c3fd8_add_pre_defined_feedback.py │ │ ├── f1ca58b2f2ec_add_passthrough_auth_to_tool.py │ │ ├── f32615f71aeb_add_custom_headers_to_tools.py │ │ ├── f39c5794c10a_add_background_errors_table.py │ │ ├── f5437cc136c5_delete_non_search_assistants.py │ │ ├── f71470ba9274_add_prompt_length_limit.py │ │ ├── f7505c5b0284_updated_constraints_for_ccpairs.py │ │ ├── f7a894b06d02_non_nullbale_slack_bot_id_in_channel_.py │ │ ├── f7e58d357687_add_has_web_column_to_user.py │ │ ├── fad14119fb92_delete_tags_with_wrong_enum.py │ │ ├── fcd135795f21_add_slack_bot_display_type.py │ │ ├── febe9eaa0644_add_document_set_persona_relationship_.py │ │ ├── fec3db967bf7_add_time_updated_to_usergroup_and_.py │ │ └── ffc707a226b4_basic_document_metadata.py ├── alembic_tenants │ ├── README.md │ ├── env.py │ ├── script.py.mako │ └── versions │ │ ├── 14a83a331951_create_usertenantmapping_table.py │ │ ├── 34e3630c7f32_lowercase_multi_tenant_user_auth.py │ │ ├── 3b45e0018bf1_add_new_available_tenant_table.py │ │ ├── a4f6ee863c47_mapping_for_anonymous_user_path.py │ │ └── ac842f85f932_new_column_user_tenant_mapping.py ├── assets │ └── .gitignore ├── ee │ ├── LICENSE │ ├── __init__.py │ └── onyx │ │ ├── __init__.py │ │ ├── access │ │ └── access.py │ │ ├── auth │ │ ├── __init__.py │ │ └── users.py │ │ ├── background │ │ ├── celery │ │ │ ├── apps │ │ │ │ ├── heavy.py │ │ │ │ ├── light.py │ │ │ │ ├── monitoring.py │ │ │ │ └── primary.py │ │ │ └── tasks │ │ │ │ ├── beat_schedule.py │ │ │ │ ├── cleanup │ │ │ │ └── tasks.py │ │ │ │ ├── cloud │ │ │ │ └── tasks.py │ │ │ │ ├── doc_permission_syncing │ │ │ │ └── tasks.py │ │ │ │ ├── external_group_syncing │ │ │ │ ├── group_sync_utils.py │ │ │ │ └── tasks.py │ │ │ │ ├── tenant_provisioning │ │ │ │ └── tasks.py │ │ │ │ └── vespa │ │ │ │ └── tasks.py │ │ ├── celery_utils.py │ │ └── task_name_builders.py │ │ ├── chat │ │ └── process_message.py │ │ ├── configs │ │ ├── __init__.py │ │ ├── app_configs.py │ │ └── saml_config │ │ │ └── template.settings.json │ │ ├── db │ │ ├── __init__.py │ │ ├── analytics.py │ │ ├── connector.py │ │ ├── connector_credential_pair.py │ │ ├── document.py │ │ ├── document_set.py │ │ ├── external_perm.py │ │ ├── persona.py │ │ ├── query_history.py │ │ ├── saml.py │ │ ├── standard_answer.py │ │ ├── token_limit.py │ │ ├── usage_export.py │ │ └── user_group.py │ │ ├── external_permissions │ │ ├── __init__.py │ │ ├── confluence │ │ │ ├── __init__.py │ │ │ ├── constants.py │ │ │ ├── doc_sync.py │ │ │ └── group_sync.py │ │ ├── gmail │ │ │ └── doc_sync.py │ │ ├── google_drive │ │ │ ├── __init__.py │ │ │ ├── doc_sync.py │ │ │ ├── folder_retrieval.py │ │ │ ├── group_sync.py │ │ │ ├── models.py │ │ │ └── permission_retrieval.py │ │ ├── perm_sync_types.py │ │ ├── post_query_censoring.py │ │ ├── salesforce │ │ │ ├── postprocessing.py │ │ │ └── utils.py │ │ ├── slack │ │ │ ├── doc_sync.py │ │ │ ├── group_sync.py │ │ │ └── utils.py │ │ └── sync_params.py │ │ ├── main.py │ │ ├── onyxbot │ │ └── slack │ │ │ └── handlers │ │ │ ├── __init__.py │ │ │ └── handle_standard_answers.py │ │ ├── seeding │ │ └── load_docs.py │ │ ├── server │ │ ├── __init__.py │ │ ├── analytics │ │ │ └── api.py │ │ ├── auth_check.py │ │ ├── documents │ │ │ └── cc_pair.py │ │ ├── enterprise_settings │ │ │ ├── api.py │ │ │ ├── models.py │ │ │ └── store.py │ │ ├── manage │ │ │ └── standard_answer.py │ │ ├── middleware │ │ │ └── tenant_tracking.py │ │ ├── oauth │ │ │ ├── api.py │ │ │ ├── api_router.py │ │ │ ├── confluence_cloud.py │ │ │ ├── google_drive.py │ │ │ └── slack.py │ │ ├── query_and_chat │ │ │ ├── __init__.py │ │ │ ├── chat_backend.py │ │ │ ├── models.py │ │ │ ├── query_backend.py │ │ │ └── token_limit.py │ │ ├── query_history │ │ │ ├── api.py │ │ │ └── models.py │ │ ├── reporting │ │ │ ├── usage_export_api.py │ │ │ ├── usage_export_generation.py │ │ │ └── usage_export_models.py │ │ ├── saml.py │ │ ├── seeding.py │ │ ├── tenants │ │ │ ├── __init__.py │ │ │ ├── access.py │ │ │ ├── admin_api.py │ │ │ ├── anonymous_user_path.py │ │ │ ├── anonymous_users_api.py │ │ │ ├── api.py │ │ │ ├── billing.py │ │ │ ├── billing_api.py │ │ │ ├── models.py │ │ │ ├── product_gating.py │ │ │ ├── provisioning.py │ │ │ ├── schema_management.py │ │ │ ├── team_membership_api.py │ │ │ ├── tenant_management_api.py │ │ │ ├── user_invitations_api.py │ │ │ └── user_mapping.py │ │ ├── token_rate_limits │ │ │ └── api.py │ │ └── user_group │ │ │ ├── api.py │ │ │ └── models.py │ │ └── utils │ │ ├── __init__.py │ │ ├── encryption.py │ │ ├── secrets.py │ │ └── telemetry.py ├── generated │ └── README.md ├── hello-vmlinux.bin ├── model_server │ ├── __init__.py │ ├── constants.py │ ├── custom_models.py │ ├── encoders.py │ ├── main.py │ ├── management_endpoints.py │ ├── onyx_torch_model.py │ └── utils.py ├── onyx │ ├── __init__.py │ ├── access │ │ ├── __init__.py │ │ ├── access.py │ │ ├── models.py │ │ └── utils.py │ ├── agents │ │ └── agent_search │ │ │ ├── basic │ │ │ ├── graph_builder.py │ │ │ ├── states.py │ │ │ └── utils.py │ │ │ ├── core_state.py │ │ │ ├── dc_search_analysis │ │ │ ├── edges.py │ │ │ ├── graph_builder.py │ │ │ ├── nodes │ │ │ │ ├── a1_search_objects.py │ │ │ │ ├── a2_research_object_source.py │ │ │ │ ├── a3_structure_research_by_object.py │ │ │ │ ├── a4_consolidate_object_research.py │ │ │ │ └── a5_consolidate_research.py │ │ │ ├── ops.py │ │ │ └── states.py │ │ │ ├── deep_search │ │ │ ├── initial │ │ │ │ ├── generate_individual_sub_answer │ │ │ │ │ ├── edges.py │ │ │ │ │ ├── graph_builder.py │ │ │ │ │ ├── nodes │ │ │ │ │ │ ├── check_sub_answer.py │ │ │ │ │ │ ├── format_sub_answer.py │ │ │ │ │ │ ├── generate_sub_answer.py │ │ │ │ │ │ └── ingest_retrieved_documents.py │ │ │ │ │ └── states.py │ │ │ │ ├── generate_initial_answer │ │ │ │ │ ├── edges.py │ │ │ │ │ ├── graph_builder.py │ │ │ │ │ ├── nodes │ │ │ │ │ │ ├── generate_initial_answer.py │ │ │ │ │ │ └── validate_initial_answer.py │ │ │ │ │ └── states.py │ │ │ │ ├── generate_sub_answers │ │ │ │ │ ├── edges.py │ │ │ │ │ ├── graph_builder.py │ │ │ │ │ ├── nodes │ │ │ │ │ │ ├── decompose_orig_question.py │ │ │ │ │ │ └── format_initial_sub_answers.py │ │ │ │ │ └── states.py │ │ │ │ └── retrieve_orig_question_docs │ │ │ │ │ ├── graph_builder.py │ │ │ │ │ ├── nodes │ │ │ │ │ ├── format_orig_question_search_input.py │ │ │ │ │ └── format_orig_question_search_output.py │ │ │ │ │ └── states.py │ │ │ ├── main │ │ │ │ ├── edges.py │ │ │ │ ├── graph_builder.py │ │ │ │ ├── models.py │ │ │ │ ├── nodes │ │ │ │ │ ├── compare_answers.py │ │ │ │ │ ├── create_refined_sub_questions.py │ │ │ │ │ ├── decide_refinement_need.py │ │ │ │ │ ├── extract_entities_terms.py │ │ │ │ │ ├── generate_validate_refined_answer.py │ │ │ │ │ ├── ingest_refined_sub_answers.py │ │ │ │ │ ├── persist_agent_results.py │ │ │ │ │ └── start_agent_search.py │ │ │ │ ├── operations.py │ │ │ │ └── states.py │ │ │ ├── refinement │ │ │ │ └── consolidate_sub_answers │ │ │ │ │ ├── edges.py │ │ │ │ │ └── graph_builder.py │ │ │ └── shared │ │ │ │ └── expanded_retrieval │ │ │ │ ├── edges.py │ │ │ │ ├── graph_builder.py │ │ │ │ ├── models.py │ │ │ │ ├── nodes │ │ │ │ ├── expand_queries.py │ │ │ │ ├── format_queries.py │ │ │ │ ├── format_results.py │ │ │ │ ├── kickoff_verification.py │ │ │ │ ├── rerank_documents.py │ │ │ │ ├── retrieve_documents.py │ │ │ │ └── verify_documents.py │ │ │ │ ├── operations.py │ │ │ │ └── states.py │ │ │ ├── models.py │ │ │ ├── orchestration │ │ │ ├── nodes │ │ │ │ ├── call_tool.py │ │ │ │ ├── choose_tool.py │ │ │ │ ├── prepare_tool_input.py │ │ │ │ └── use_tool_response.py │ │ │ └── states.py │ │ │ ├── run_graph.py │ │ │ └── shared_graph_utils │ │ │ ├── agent_prompt_ops.py │ │ │ ├── calculations.py │ │ │ ├── constants.py │ │ │ ├── llm.py │ │ │ ├── models.py │ │ │ ├── operators.py │ │ │ └── utils.py │ ├── auth │ │ ├── __init__.py │ │ ├── api_key.py │ │ ├── email_utils.py │ │ ├── invited_users.py │ │ ├── noauth_user.py │ │ ├── oauth_refresher.py │ │ ├── schemas.py │ │ └── users.py │ ├── background │ │ ├── celery │ │ │ ├── apps │ │ │ │ ├── app_base.py │ │ │ │ ├── beat.py │ │ │ │ ├── client.py │ │ │ │ ├── heavy.py │ │ │ │ ├── indexing.py │ │ │ │ ├── light.py │ │ │ │ ├── monitoring.py │ │ │ │ ├── primary.py │ │ │ │ └── task_formatters.py │ │ │ ├── celery_k8s_probe.py │ │ │ ├── celery_redis.py │ │ │ ├── celery_utils.py │ │ │ ├── configs │ │ │ │ ├── base.py │ │ │ │ ├── beat.py │ │ │ │ ├── client.py │ │ │ │ ├── heavy.py │ │ │ │ ├── indexing.py │ │ │ │ ├── light.py │ │ │ │ ├── monitoring.py │ │ │ │ └── primary.py │ │ │ ├── memory_monitoring.py │ │ │ ├── tasks │ │ │ │ ├── beat_schedule.py │ │ │ │ ├── connector_deletion │ │ │ │ │ └── tasks.py │ │ │ │ ├── indexing │ │ │ │ │ ├── tasks.py │ │ │ │ │ └── utils.py │ │ │ │ ├── llm_model_update │ │ │ │ │ └── tasks.py │ │ │ │ ├── monitoring │ │ │ │ │ └── tasks.py │ │ │ │ ├── periodic │ │ │ │ │ ├── __init__.py │ │ │ │ │ └── tasks.py │ │ │ │ ├── pruning │ │ │ │ │ └── tasks.py │ │ │ │ ├── shared │ │ │ │ │ ├── RetryDocumentIndex.py │ │ │ │ │ └── tasks.py │ │ │ │ ├── user_file_folder_sync │ │ │ │ │ └── tasks.py │ │ │ │ └── vespa │ │ │ │ │ └── tasks.py │ │ │ └── versioned_apps │ │ │ │ ├── beat.py │ │ │ │ ├── client.py │ │ │ │ ├── heavy.py │ │ │ │ ├── indexing.py │ │ │ │ ├── light.py │ │ │ │ ├── monitoring.py │ │ │ │ └── primary.py │ │ ├── error_logging.py │ │ ├── indexing │ │ │ ├── checkpointing_utils.py │ │ │ ├── dask_utils.py │ │ │ ├── job_client.py │ │ │ ├── memory_tracer.py │ │ │ ├── models.py │ │ │ └── run_indexing.py │ │ └── task_utils.py │ ├── chat │ │ ├── __init__.py │ │ ├── answer.py │ │ ├── chat_utils.py │ │ ├── llm_response_handler.py │ │ ├── models.py │ │ ├── process_message.py │ │ ├── prompt_builder │ │ │ ├── answer_prompt_builder.py │ │ │ ├── citations_prompt.py │ │ │ ├── quotes_prompt.py │ │ │ └── utils.py │ │ ├── prune_and_merge.py │ │ ├── stream_processing │ │ │ ├── answer_response_handler.py │ │ │ ├── citation_processing.py │ │ │ ├── quotes_processing.py │ │ │ └── utils.py │ │ ├── tool_handling │ │ │ └── tool_response_handler.py │ │ └── user_files │ │ │ └── parse_user_files.py │ ├── configs │ │ ├── __init__.py │ │ ├── agent_configs.py │ │ ├── app_configs.py │ │ ├── chat_configs.py │ │ ├── constants.py │ │ ├── llm_configs.py │ │ ├── model_configs.py │ │ ├── onyxbot_configs.py │ │ └── tool_configs.py │ ├── connectors │ │ ├── README.md │ │ ├── __init__.py │ │ ├── airtable │ │ │ └── airtable_connector.py │ │ ├── asana │ │ │ ├── __init__.py │ │ │ ├── asana_api.py │ │ │ └── connector.py │ │ ├── axero │ │ │ ├── __init__.py │ │ │ └── connector.py │ │ ├── blob │ │ │ ├── __init__.py │ │ │ └── connector.py │ │ ├── bookstack │ │ │ ├── __init__.py │ │ │ ├── client.py │ │ │ └── connector.py │ │ ├── clickup │ │ │ ├── __init__.py │ │ │ └── connector.py │ │ ├── confluence │ │ │ ├── __init__.py │ │ │ ├── connector.py │ │ │ ├── models.py │ │ │ ├── onyx_confluence.py │ │ │ ├── user_profile_override.py │ │ │ └── utils.py │ │ ├── connector_runner.py │ │ ├── credentials_provider.py │ │ ├── cross_connector_utils │ │ │ ├── __init__.py │ │ │ ├── miscellaneous_utils.py │ │ │ └── rate_limit_wrapper.py │ │ ├── discord │ │ │ ├── __init__.py │ │ │ └── connector.py │ │ ├── discourse │ │ │ ├── __init__.py │ │ │ └── connector.py │ │ ├── document360 │ │ │ ├── __init__.py │ │ │ ├── connector.py │ │ │ └── utils.py │ │ ├── dropbox │ │ │ ├── __init__.py │ │ │ └── connector.py │ │ ├── egnyte │ │ │ └── connector.py │ │ ├── exceptions.py │ │ ├── factory.py │ │ ├── file │ │ │ ├── __init__.py │ │ │ └── connector.py │ │ ├── fireflies │ │ │ ├── __init__.py │ │ │ └── connector.py │ │ ├── freshdesk │ │ │ ├── __init__,py │ │ │ └── connector.py │ │ ├── gitbook │ │ │ ├── __init__.py │ │ │ └── connector.py │ │ ├── github │ │ │ ├── __init__.py │ │ │ └── connector.py │ │ ├── gitlab │ │ │ ├── __init__.py │ │ │ └── connector.py │ │ ├── gmail │ │ │ ├── __init__.py │ │ │ └── connector.py │ │ ├── gong │ │ │ ├── __init__.py │ │ │ └── connector.py │ │ ├── google_drive │ │ │ ├── __init__.py │ │ │ ├── connector.py │ │ │ ├── constants.py │ │ │ ├── doc_conversion.py │ │ │ ├── file_retrieval.py │ │ │ ├── models.py │ │ │ └── section_extraction.py │ │ ├── google_site │ │ │ ├── __init__.py │ │ │ └── connector.py │ │ ├── google_utils │ │ │ ├── __init__.py │ │ │ ├── google_auth.py │ │ │ ├── google_kv.py │ │ │ ├── google_utils.py │ │ │ ├── resources.py │ │ │ └── shared_constants.py │ │ ├── guru │ │ │ ├── __init__.py │ │ │ └── connector.py │ │ ├── highspot │ │ │ ├── __init__.py │ │ │ ├── client.py │ │ │ ├── connector.py │ │ │ └── utils.py │ │ ├── hubspot │ │ │ ├── __init__.py │ │ │ └── connector.py │ │ ├── interfaces.py │ │ ├── linear │ │ │ ├── __init__.py │ │ │ └── connector.py │ │ ├── loopio │ │ │ ├── __init__.py │ │ │ └── connector.py │ │ ├── mediawiki │ │ │ ├── __init__.py │ │ │ ├── family.py │ │ │ └── wiki.py │ │ ├── mock_connector │ │ │ └── connector.py │ │ ├── models.py │ │ ├── notion │ │ │ ├── __init__.py │ │ │ └── connector.py │ │ ├── onyx_jira │ │ │ ├── __init__.py │ │ │ ├── connector.py │ │ │ └── utils.py │ │ ├── productboard │ │ │ ├── __init__.py │ │ │ └── connector.py │ │ ├── requesttracker │ │ │ ├── .gitignore │ │ │ ├── __init__.py │ │ │ └── connector.py │ │ ├── salesforce │ │ │ ├── __init__.py │ │ │ ├── connector.py │ │ │ ├── doc_conversion.py │ │ │ ├── salesforce_calls.py │ │ │ ├── shelve_stuff │ │ │ │ ├── old_test_salesforce_shelves.py │ │ │ │ ├── shelve_functions.py │ │ │ │ ├── shelve_utils.py │ │ │ │ └── test_salesforce_shelves.py │ │ │ ├── sqlite_functions.py │ │ │ └── utils.py │ │ ├── sharepoint │ │ │ ├── __init__.py │ │ │ └── connector.py │ │ ├── slab │ │ │ ├── __init__.py │ │ │ └── connector.py │ │ ├── slack │ │ │ ├── __init__.py │ │ │ ├── connector.py │ │ │ ├── onyx_retry_handler.py │ │ │ ├── onyx_slack_web_client.py │ │ │ └── utils.py │ │ ├── teams │ │ │ ├── __init__.py │ │ │ └── connector.py │ │ ├── web │ │ │ ├── __init__.py │ │ │ └── connector.py │ │ ├── wikipedia │ │ │ ├── __init__.py │ │ │ └── connector.py │ │ ├── xenforo │ │ │ ├── __init__.py │ │ │ └── connector.py │ │ ├── zendesk │ │ │ ├── __init__.py │ │ │ └── connector.py │ │ └── zulip │ │ │ ├── __init__.py │ │ │ ├── connector.py │ │ │ ├── schemas.py │ │ │ └── utils.py │ ├── context │ │ └── search │ │ │ ├── __init__.py │ │ │ ├── enums.py │ │ │ ├── models.py │ │ │ ├── pipeline.py │ │ │ ├── postprocessing │ │ │ └── postprocessing.py │ │ │ ├── preprocessing │ │ │ ├── access_filters.py │ │ │ └── preprocessing.py │ │ │ ├── retrieval │ │ │ └── search_runner.py │ │ │ ├── search_settings.py │ │ │ └── utils.py │ ├── db │ │ ├── __init__.py │ │ ├── api_key.py │ │ ├── auth.py │ │ ├── background_error.py │ │ ├── chat.py │ │ ├── chat_search.py │ │ ├── chunk.py │ │ ├── connector.py │ │ ├── connector_credential_pair.py │ │ ├── constants.py │ │ ├── credentials.py │ │ ├── deletion_attempt.py │ │ ├── document.py │ │ ├── document_set.py │ │ ├── engine.py │ │ ├── enums.py │ │ ├── feedback.py │ │ ├── folder.py │ │ ├── index_attempt.py │ │ ├── input_prompt.py │ │ ├── llm.py │ │ ├── milestone.py │ │ ├── models.py │ │ ├── notification.py │ │ ├── persona.py │ │ ├── pg_file_store.py │ │ ├── prompts.py │ │ ├── pydantic_type.py │ │ ├── search_settings.py │ │ ├── seeding │ │ │ └── chat_history_seeding.py │ │ ├── slack_bot.py │ │ ├── slack_channel_config.py │ │ ├── swap_index.py │ │ ├── sync_record.py │ │ ├── tag.py │ │ ├── tasks.py │ │ ├── token_limit.py │ │ ├── tools.py │ │ ├── user_documents.py │ │ ├── users.py │ │ └── utils.py │ ├── document_index │ │ ├── __init__.py │ │ ├── document_index_utils.py │ │ ├── factory.py │ │ ├── interfaces.py │ │ ├── vespa │ │ │ ├── __init__.py │ │ │ ├── app_config │ │ │ │ ├── schemas │ │ │ │ │ └── danswer_chunk.sd.jinja │ │ │ │ ├── services.xml.jinja │ │ │ │ └── validation-overrides.xml.jinja │ │ │ ├── chunk_retrieval.py │ │ │ ├── deletion.py │ │ │ ├── index.py │ │ │ ├── indexing_utils.py │ │ │ └── shared_utils │ │ │ │ ├── utils.py │ │ │ │ └── vespa_request_builders.py │ │ └── vespa_constants.py │ ├── file_processing │ │ ├── __init__.py │ │ ├── enums.py │ │ ├── extract_file_text.py │ │ ├── file_validation.py │ │ ├── html_utils.py │ │ ├── image_summarization.py │ │ ├── image_utils.py │ │ └── unstructured.py │ ├── file_store │ │ ├── constants.py │ │ ├── file_store.py │ │ ├── models.py │ │ └── utils.py │ ├── httpx │ │ └── httpx_pool.py │ ├── indexing │ │ ├── __init__.py │ │ ├── chunker.py │ │ ├── content_classification.py │ │ ├── embedder.py │ │ ├── indexing_heartbeat.py │ │ ├── indexing_pipeline.py │ │ ├── models.py │ │ └── vector_db_insertion.py │ ├── key_value_store │ │ ├── __init__.py │ │ ├── factory.py │ │ ├── interface.py │ │ └── store.py │ ├── llm │ │ ├── __init__.py │ │ ├── chat_llm.py │ │ ├── custom_llm.py │ │ ├── exceptions.py │ │ ├── factory.py │ │ ├── interfaces.py │ │ ├── llm_provider_options.py │ │ ├── models.py │ │ ├── override_models.py │ │ └── utils.py │ ├── main.py │ ├── natural_language_processing │ │ ├── __init__.py │ │ ├── exceptions.py │ │ ├── search_nlp_models.py │ │ └── utils.py │ ├── onyxbot │ │ └── slack │ │ │ ├── blocks.py │ │ │ ├── config.py │ │ │ ├── constants.py │ │ │ ├── formatting.py │ │ │ ├── handlers │ │ │ ├── __init__.py │ │ │ ├── handle_buttons.py │ │ │ ├── handle_message.py │ │ │ ├── handle_regular_answer.py │ │ │ ├── handle_standard_answers.py │ │ │ └── utils.py │ │ │ ├── icons.py │ │ │ ├── listener.py │ │ │ ├── models.py │ │ │ └── utils.py │ ├── prompts │ │ ├── __init__.py │ │ ├── agent_search.py │ │ ├── agentic_evaluation.py │ │ ├── agents │ │ │ └── dc_prompts.py │ │ ├── answer_validation.py │ │ ├── chat_prompts.py │ │ ├── chat_tools.py │ │ ├── constants.py │ │ ├── direct_qa_prompts.py │ │ ├── filter_extration.py │ │ ├── image_analysis.py │ │ ├── llm_chunk_filter.py │ │ ├── miscellaneous_prompts.py │ │ ├── prompt_utils.py │ │ ├── query_validation.py │ │ ├── starter_messages.py │ │ └── token_counts.py │ ├── redis │ │ ├── redis_connector.py │ │ ├── redis_connector_credential_pair.py │ │ ├── redis_connector_delete.py │ │ ├── redis_connector_doc_perm_sync.py │ │ ├── redis_connector_ext_group_sync.py │ │ ├── redis_connector_index.py │ │ ├── redis_connector_prune.py │ │ ├── redis_connector_stop.py │ │ ├── redis_connector_utils.py │ │ ├── redis_document_set.py │ │ ├── redis_object_helper.py │ │ ├── redis_pool.py │ │ ├── redis_usergroup.py │ │ └── redis_utils.py │ ├── secondary_llm_flows │ │ ├── __init__.py │ │ ├── agentic_evaluation.py │ │ ├── answer_validation.py │ │ ├── chat_session_naming.py │ │ ├── choose_search.py │ │ ├── chunk_usefulness.py │ │ ├── query_expansion.py │ │ ├── query_validation.py │ │ ├── source_filter.py │ │ ├── starter_message_creation.py │ │ └── time_filter.py │ ├── seeding │ │ ├── __init__.py │ │ ├── initial_docs.json │ │ ├── initial_docs_cohere.json │ │ ├── input_prompts.yaml │ │ ├── load_docs.py │ │ ├── load_yamls.py │ │ ├── personas.yaml │ │ ├── prompts.yaml │ │ └── user_folders.yaml │ ├── server │ │ ├── __init__.py │ │ ├── api_key │ │ │ ├── api.py │ │ │ └── models.py │ │ ├── auth_check.py │ │ ├── documents │ │ │ ├── __init__.py │ │ │ ├── cc_pair.py │ │ │ ├── connector.py │ │ │ ├── credential.py │ │ │ ├── document.py │ │ │ ├── models.py │ │ │ └── standard_oauth.py │ │ ├── features │ │ │ ├── __init__.py │ │ │ ├── document_set │ │ │ │ ├── __init__.py │ │ │ │ ├── api.py │ │ │ │ └── models.py │ │ │ ├── folder │ │ │ │ ├── __init__.py │ │ │ │ ├── api.py │ │ │ │ └── models.py │ │ │ ├── input_prompt │ │ │ │ ├── api.py │ │ │ │ └── models.py │ │ │ ├── notifications │ │ │ │ └── api.py │ │ │ ├── password │ │ │ │ ├── api.py │ │ │ │ └── models.py │ │ │ ├── persona │ │ │ │ ├── __init__.py │ │ │ │ ├── api.py │ │ │ │ └── models.py │ │ │ └── tool │ │ │ │ ├── api.py │ │ │ │ └── models.py │ │ ├── gpts │ │ │ └── api.py │ │ ├── long_term_logs │ │ │ └── long_term_logs_api.py │ │ ├── manage │ │ │ ├── __init__.py │ │ │ ├── administrative.py │ │ │ ├── embedding │ │ │ │ ├── api.py │ │ │ │ └── models.py │ │ │ ├── get_state.py │ │ │ ├── llm │ │ │ │ ├── api.py │ │ │ │ └── models.py │ │ │ ├── models.py │ │ │ ├── search_settings.py │ │ │ ├── slack_bot.py │ │ │ ├── users.py │ │ │ └── validate_tokens.py │ │ ├── middleware │ │ │ ├── latency_logging.py │ │ │ └── rate_limiting.py │ │ ├── models.py │ │ ├── onyx_api │ │ │ ├── __init__.py │ │ │ ├── ingestion.py │ │ │ └── models.py │ │ ├── openai_assistants_api │ │ │ ├── asssistants_api.py │ │ │ ├── full_openai_assistants_api.py │ │ │ ├── messages_api.py │ │ │ ├── runs_api.py │ │ │ └── threads_api.py │ │ ├── query_and_chat │ │ │ ├── __init__.py │ │ │ ├── chat_backend.py │ │ │ ├── chat_utils.py │ │ │ ├── models.py │ │ │ ├── query_backend.py │ │ │ └── token_limit.py │ │ ├── runtime │ │ │ └── onyx_runtime.py │ │ ├── settings │ │ │ ├── api.py │ │ │ ├── models.py │ │ │ └── store.py │ │ ├── token_rate_limits │ │ │ ├── api.py │ │ │ └── models.py │ │ ├── user_documents │ │ │ ├── api.py │ │ │ └── models.py │ │ └── utils.py │ ├── setup.py │ ├── tools │ │ ├── base_tool.py │ │ ├── built_in_tools.py │ │ ├── force.py │ │ ├── message.py │ │ ├── models.py │ │ ├── tool.py │ │ ├── tool_constructor.py │ │ ├── tool_implementations │ │ │ ├── custom │ │ │ │ ├── base_tool_types.py │ │ │ │ ├── custom_tool.py │ │ │ │ ├── custom_tool_prompts.py │ │ │ │ ├── openapi_parsing.py │ │ │ │ └── prompt.py │ │ │ ├── images │ │ │ │ ├── image_generation_tool.py │ │ │ │ └── prompt.py │ │ │ ├── internet_search │ │ │ │ ├── internet_search_tool.py │ │ │ │ └── models.py │ │ │ ├── search │ │ │ │ ├── search_tool.py │ │ │ │ └── search_utils.py │ │ │ └── search_like_tool_utils.py │ │ ├── tool_runner.py │ │ ├── tool_selection.py │ │ └── utils.py │ └── utils │ │ ├── __init__.py │ │ ├── b64.py │ │ ├── batching.py │ │ ├── callbacks.py │ │ ├── encryption.py │ │ ├── error_handling.py │ │ ├── errors.py │ │ ├── file.py │ │ ├── file_types.py │ │ ├── gpu_utils.py │ │ ├── headers.py │ │ ├── lazy.py │ │ ├── logger.py │ │ ├── long_term_log.py │ │ ├── middleware.py │ │ ├── object_size_check.py │ │ ├── retry_wrapper.py │ │ ├── sitemap.py │ │ ├── special_types.py │ │ ├── subclasses.py │ │ ├── supervisord_watchdog.py │ │ ├── telemetry.py │ │ ├── text_processing.py │ │ ├── threadpool_concurrency.py │ │ ├── timing.py │ │ ├── url.py │ │ └── variable_functionality.py ├── pyproject.toml ├── pytest.ini ├── requirements │ ├── combined.txt │ ├── default.txt │ ├── dev.txt │ ├── ee.txt │ └── model_server.txt ├── scripts │ ├── add_connector_creation_script.py │ ├── api_inference_sample.py │ ├── celery_purge_queue.py │ ├── chat_feedback_dump.py │ ├── chat_history_seeding.py │ ├── chat_loadtest.py │ ├── debugging │ │ ├── onyx_db.py │ │ ├── onyx_redis.py │ │ ├── onyx_vespa.py │ │ └── onyx_vespa_schemas.py │ ├── decrypt.py │ ├── dev_run_background_jobs.py │ ├── docker_memory_tracking.sh │ ├── document_seeding_prep.py │ ├── force_delete_connector_by_id.py │ ├── onyx_openapi_schema.py │ ├── orphan_doc_cleanup_script.py │ ├── query_time_check │ │ ├── seed_dummy_docs.py │ │ └── test_query_times.py │ ├── reset_indexes.py │ ├── reset_postgres.py │ ├── restart_containers.sh │ ├── save_load_state.py │ ├── sources_selection_analysis.py │ └── test-openapi-key.py ├── shared_configs │ ├── __init__.py │ ├── configs.py │ ├── contextvars.py │ ├── enums.py │ ├── model_server_models.py │ └── utils.py ├── slackbot_images │ ├── Confluence.png │ ├── File.png │ ├── Guru.png │ ├── Jira.png │ ├── README.md │ ├── Web.png │ └── Zendesk.png ├── static │ └── images │ │ ├── logo.png │ │ └── logotype.png ├── supervisord.conf └── tests │ ├── __init__.py │ ├── api │ └── test_api.py │ ├── daily │ ├── conftest.py │ ├── connectors │ │ ├── airtable │ │ │ └── test_airtable_basic.py │ │ ├── blob │ │ │ └── test_blob_connector.py │ │ ├── confluence │ │ │ ├── test_confluence_basic.py │ │ │ ├── test_confluence_permissions_basic.py │ │ │ └── test_confluence_user_email_overrides.py │ │ ├── conftest.py │ │ ├── discord │ │ │ ├── test_discord_connector.py │ │ │ └── test_discord_data.json │ │ ├── fireflies │ │ │ ├── test_fireflies_connector.py │ │ │ └── test_fireflies_data.json │ │ ├── gitbook │ │ │ └── test_gitbook_connector.py │ │ ├── github │ │ │ └── test_github_basic.py │ │ ├── gitlab │ │ │ └── test_gitlab_basic.py │ │ ├── gmail │ │ │ ├── conftest.py │ │ │ └── test_gmail_connector.py │ │ ├── gong │ │ │ └── test_gong.py │ │ ├── google_drive │ │ │ ├── conftest.py │ │ │ ├── consts_and_utils.py │ │ │ ├── drive_id_mapping.json │ │ │ ├── test_admin_oauth.py │ │ │ ├── test_drive_perm_sync.py │ │ │ ├── test_map_test_ids.py │ │ │ ├── test_sections.py │ │ │ ├── test_service_acct.py │ │ │ └── test_user_1_oauth.py │ │ ├── highspot │ │ │ ├── test_highspot_connector.py │ │ │ └── test_highspot_data.json │ │ ├── jira │ │ │ └── test_jira_basic.py │ │ ├── notion │ │ │ └── test_notion_connector.py │ │ ├── salesforce │ │ │ ├── test_salesforce_connector.py │ │ │ └── test_salesforce_data.json │ │ ├── sharepoint │ │ │ └── test_sharepoint_connector.py │ │ ├── slab │ │ │ ├── test_slab_connector.py │ │ │ └── test_slab_data.json │ │ ├── slack │ │ │ └── test_slack_connector.py │ │ ├── teams │ │ │ └── test_teams_connector.py │ │ ├── utils.py │ │ ├── web │ │ │ └── test_web_connector.py │ │ └── zendesk │ │ │ ├── test_zendesk_connector.py │ │ │ └── test_zendesk_data.json │ ├── embedding │ │ └── test_embeddings.py │ └── llm │ │ └── test_bedrock.py │ ├── integration │ ├── Dockerfile │ ├── README.md │ ├── __init__.py │ ├── common_utils │ │ ├── chat.py │ │ ├── config.py │ │ ├── constants.py │ │ ├── managers │ │ │ ├── api_key.py │ │ │ ├── cc_pair.py │ │ │ ├── chat.py │ │ │ ├── connector.py │ │ │ ├── credential.py │ │ │ ├── document.py │ │ │ ├── document_search.py │ │ │ ├── document_set.py │ │ │ ├── file.py │ │ │ ├── index_attempt.py │ │ │ ├── llm_provider.py │ │ │ ├── persona.py │ │ │ ├── query_history.py │ │ │ ├── settings.py │ │ │ ├── tenant.py │ │ │ ├── user.py │ │ │ └── user_group.py │ │ ├── reset.py │ │ ├── test_document_utils.py │ │ ├── test_files │ │ │ └── Sample.pdf │ │ ├── test_models.py │ │ ├── timeout.py │ │ └── vespa.py │ ├── conftest.py │ ├── connector_job_tests │ │ ├── google │ │ │ ├── google_drive_api_utils.py │ │ │ └── test_google_drive_permission_sync.py │ │ └── slack │ │ │ ├── conftest.py │ │ │ ├── slack_api_utils.py │ │ │ ├── test_permission_sync.py │ │ │ └── test_prune.py │ ├── mock_services │ │ ├── docker-compose.mock-it-services.yml │ │ └── mock_connector_server │ │ │ ├── Dockerfile │ │ │ └── main.py │ ├── multitenant_tests │ │ ├── invitation │ │ │ └── test_user_invitation.py │ │ ├── syncing │ │ │ └── test_search_permissions.py │ │ └── tenants │ │ │ └── test_tenant_creation.py │ ├── openai_assistants_api │ │ ├── conftest.py │ │ ├── test_assistants.py │ │ ├── test_messages.py │ │ ├── test_runs.py │ │ └── test_threads.py │ └── tests │ │ ├── anonymous_user │ │ └── test_anonymous_user.py │ │ ├── api_key │ │ └── test_api_key.py │ │ ├── auth │ │ └── test_saml_user_conversion.py │ │ ├── chat_retention │ │ └── test_chat_retention.py │ │ ├── connector │ │ ├── test_connector_creation.py │ │ └── test_connector_deletion.py │ │ ├── dev_apis │ │ ├── test_knowledge_chat.py │ │ └── test_simple_chat_api.py │ │ ├── document_set │ │ └── test_syncing.py │ │ ├── image_indexing │ │ └── test_indexing_images.py │ │ ├── index_attempt │ │ └── test_index_attempt_pagination.py │ │ ├── indexing │ │ ├── conftest.py │ │ ├── file_connector │ │ │ ├── test_file_connector_zip_metadata.py │ │ │ └── test_files │ │ │ │ ├── .onyx_metadata.json │ │ │ │ ├── sample1.txt │ │ │ │ ├── sample2.txt │ │ │ │ ├── with_meta.zip │ │ │ │ └── without_meta.zip │ │ ├── test_checkpointing.py │ │ ├── test_polling.py │ │ └── test_repeated_error_state.py │ │ ├── llm_provider │ │ └── test_llm_provider.py │ │ ├── migrations │ │ └── test_migrations.py │ │ ├── permissions │ │ ├── test_cc_pair_permissions.py │ │ ├── test_connector_permissions.py │ │ ├── test_credential_permissions.py │ │ ├── test_doc_set_permissions.py │ │ ├── test_persona_permissions.py │ │ ├── test_user_role_permissions.py │ │ └── test_whole_curator_flow.py │ │ ├── personas │ │ └── test_persona_categories.py │ │ ├── playwright │ │ └── test_playwright.py │ │ ├── pruning │ │ ├── test_pruning.py │ │ └── website │ │ │ ├── about.html │ │ │ ├── contact.html │ │ │ ├── courses.html │ │ │ ├── css │ │ │ ├── animate.css │ │ │ ├── bootstrap.min.css │ │ │ ├── custom-fonts.css │ │ │ ├── fancybox │ │ │ │ ├── blank.gif │ │ │ │ ├── fancybox_loading.gif │ │ │ │ ├── fancybox_overlay.png │ │ │ │ ├── fancybox_sprite.png │ │ │ │ └── jquery.fancybox.css │ │ │ ├── font-awesome.css │ │ │ └── style.css │ │ │ ├── fonts │ │ │ ├── customicon │ │ │ │ ├── icons.eot │ │ │ │ ├── icons.svg │ │ │ │ ├── icons.ttf │ │ │ │ └── icons.woff │ │ │ ├── fontawesome-webfont.eot │ │ │ ├── fontawesome-webfont.svg │ │ │ ├── fontawesome-webfont.ttf │ │ │ ├── fontawesome-webfont.woff │ │ │ └── fontawesome.otf │ │ │ ├── img │ │ │ ├── avatar.png │ │ │ ├── bg_direction_nav.png │ │ │ ├── glyphicons-halflings-white.png │ │ │ ├── glyphicons-halflings.png │ │ │ ├── logo.png │ │ │ ├── nivo-bullets.png │ │ │ ├── section-image-1.png │ │ │ ├── service1.jpg │ │ │ ├── service2.jpg │ │ │ ├── service3.jpg │ │ │ ├── slides │ │ │ │ ├── 1.jpg │ │ │ │ ├── 2.jpg │ │ │ │ └── 3.jpg │ │ │ ├── team1.jpg │ │ │ ├── team2.jpg │ │ │ ├── team3.jpg │ │ │ ├── team4.jpg │ │ │ └── works │ │ │ │ ├── 1.jpg │ │ │ │ ├── 2.jpg │ │ │ │ ├── 3.jpg │ │ │ │ ├── 4.jpg │ │ │ │ ├── 5.jpg │ │ │ │ ├── 6.jpg │ │ │ │ ├── 7.jpg │ │ │ │ └── 8.jpg │ │ │ ├── index.html │ │ │ ├── js │ │ │ ├── animate.js │ │ │ ├── bootstrap.min.js │ │ │ ├── custom.js │ │ │ ├── flexslider │ │ │ │ ├── jquery.flexslider.js │ │ │ │ └── setting.js │ │ │ ├── google-code-prettify │ │ │ │ ├── prettify.css │ │ │ │ └── prettify.js │ │ │ ├── jquery.easing.1.3.js │ │ │ ├── jquery.fancybox-media.js │ │ │ ├── jquery.fancybox.pack.js │ │ │ ├── jquery.flexslider.js │ │ │ ├── jquery.js │ │ │ ├── portfolio │ │ │ │ ├── jquery.quicksand.js │ │ │ │ └── setting.js │ │ │ ├── quicksand │ │ │ │ ├── jquery.quicksand.js │ │ │ │ └── setting.js │ │ │ └── validate.js │ │ │ ├── portfolio.html │ │ │ ├── pricing.html │ │ │ └── readme.txt │ │ ├── query_history │ │ ├── test_query_history.py │ │ ├── test_query_history_pagination.py │ │ ├── test_usage_reports.py │ │ └── utils.py │ │ ├── streaming_endpoints │ │ ├── conftest.py │ │ └── test_chat_stream.py │ │ ├── usergroup │ │ ├── test_user_group_deletion.py │ │ └── test_usergroup_syncing.py │ │ └── users │ │ └── test_user_pagination.py │ ├── load_env_vars.py │ ├── regression │ ├── answer_quality │ │ ├── README.md │ │ ├── __init__.py │ │ ├── agent_test_script.py │ │ ├── api_utils.py │ │ ├── cli_utils.py │ │ ├── file_uploader.py │ │ ├── launch_eval_env.py │ │ ├── run_qa.py │ │ └── search_test_config.yaml.template │ └── search_quality │ │ ├── README.md │ │ ├── run_search_eval.py │ │ ├── search_eval_config.yaml.template │ │ ├── test_queries.json.template │ │ ├── util_config.py │ │ ├── util_data.py │ │ ├── util_eval.py │ │ └── util_retrieve.py │ └── unit │ ├── ee │ └── onyx │ │ └── external_permissions │ │ └── salesforce │ │ └── test_postprocessing.py │ ├── model_server │ ├── test_custom_models.py │ └── test_embedding.py │ └── onyx │ ├── agent_search │ └── test_use_tool_response.py │ ├── auth │ ├── conftest.py │ ├── test_email.py │ └── test_oauth_refresher.py │ ├── celery │ └── llm_model_update │ │ └── test_llm_model_update.py │ ├── chat │ ├── conftest.py │ ├── stream_processing │ │ ├── test_citation_processing.py │ │ ├── test_citation_substitution.py │ │ └── test_quotes_processing.py │ ├── test_answer.py │ ├── test_prune_and_merge.py │ └── test_skip_gen_ai.py │ ├── connectors │ ├── confluence │ │ ├── test_confluence_checkpointing.py │ │ ├── test_onyx_confluence.py │ │ └── test_rate_limit_handler.py │ ├── cross_connector_utils │ │ ├── test_html_utils.py │ │ ├── test_rate_limit.py │ │ └── test_table.html │ ├── github │ │ └── test_github_checkpointing.py │ ├── gmail │ │ ├── test_connector.py │ │ └── thread.json │ ├── jira │ │ ├── test_jira_checkpointing.py │ │ └── test_large_ticket_handling.py │ ├── mediawiki │ │ ├── __init__.py │ │ ├── test_mediawiki_family.py │ │ └── test_wiki.py │ ├── salesforce │ │ └── test_salesforce_sqlite.py │ ├── utils.py │ └── zendesk │ │ └── test_zendesk_checkpointing.py │ ├── document_index │ └── vespa │ │ └── shared_utils │ │ └── test_utils.py │ ├── indexing │ ├── conftest.py │ ├── test_censoring.py │ ├── test_chunker.py │ ├── test_embedder.py │ ├── test_indexing_pipeline.py │ └── test_vespa.py │ ├── llm │ └── test_chat_llm.py │ ├── redis_ca.pem │ ├── test_redis.py │ ├── tools │ ├── custom │ │ └── test_custom_tools.py │ └── test_tool_utils.py │ └── utils │ ├── test_threadpool_concurrency.py │ ├── test_threadpool_contextvars.py │ └── test_vespa_query.py ├── ct.yaml ├── deployment ├── .gitignore ├── README.md ├── aws_ecs_fargate │ └── cloudformation │ │ ├── README.md │ │ ├── deploy.sh │ │ ├── onyx_acm_template.yaml │ │ ├── onyx_cluster_template.yaml │ │ ├── onyx_config.jsonl │ │ ├── onyx_efs_template.yaml │ │ ├── services │ │ ├── onyx_backend_api_server_service_template.yaml │ │ ├── onyx_backend_background_server_service_template.yaml │ │ ├── onyx_model_server_indexing_service_template.yaml │ │ ├── onyx_model_server_inference_service_template.yaml │ │ ├── onyx_nginx_service_template.yaml │ │ ├── onyx_postgres_service_template.yaml │ │ ├── onyx_redis_service_template.yaml │ │ ├── onyx_vespaengine_service_template.yaml │ │ └── onyx_web_server_service_template.yaml │ │ └── uninstall.sh ├── data │ └── nginx │ │ ├── app.conf.template │ │ ├── app.conf.template.dev │ │ ├── app.conf.template.no-letsencrypt │ │ └── run-nginx.sh ├── docker_compose │ ├── README.md │ ├── docker-compose.dev.yml │ ├── docker-compose.gpu-dev.yml │ ├── docker-compose.model-server-test.yml │ ├── docker-compose.multitenant-dev.yml │ ├── docker-compose.prod-cloud.yml │ ├── docker-compose.prod-no-letsencrypt.yml │ ├── docker-compose.prod.yml │ ├── docker-compose.resources.yml │ ├── docker-compose.search-testing.yml │ ├── env.multilingual.template │ ├── env.nginx.template │ ├── env.prod.template │ └── init-letsencrypt.sh ├── helm │ ├── README.md │ └── charts │ │ └── onyx │ │ ├── .gitignore │ │ ├── .helmignore │ │ ├── Chart.lock │ │ ├── Chart.yaml │ │ ├── templates │ │ ├── _helpers.tpl │ │ ├── api-deployment.yaml │ │ ├── api-hpa.yaml │ │ ├── api-service.yaml │ │ ├── celery-beat.yaml │ │ ├── celery-worker-heavy.yaml │ │ ├── celery-worker-indexing.yaml │ │ ├── celery-worker-light.yaml │ │ ├── celery-worker-monitoring.yaml │ │ ├── celery-worker-primary.yaml │ │ ├── celery-worker-user-files-indexing.yaml │ │ ├── configmap.yaml │ │ ├── danswer-secret.yaml │ │ ├── indexing-model-deployment.yaml │ │ ├── indexing-model-pvc.yaml │ │ ├── indexing-model-service.yaml │ │ ├── inference-model-deployment.yaml │ │ ├── inference-model-pvc.yaml │ │ ├── inference-model-service.yaml │ │ ├── ingress-api.yaml │ │ ├── ingress-webserver.yaml │ │ ├── lets-encrypt.yaml │ │ ├── nginx-conf.yaml │ │ ├── serviceaccount.yaml │ │ ├── tests │ │ │ └── test-connection.yaml │ │ ├── webserver-deployment.yaml │ │ ├── webserver-hpa.yaml │ │ └── webserver-service.yaml │ │ ├── templates_disabled │ │ ├── background-deployment.yaml │ │ └── background-hpa.yaml │ │ └── values.yaml └── kubernetes │ ├── api_server-service-deployment.yaml │ ├── background-deployment.yaml │ ├── env-configmap.yaml │ ├── indexing_model_server-service-deployment.yaml │ ├── inference_model_server-service-deployment.yaml │ ├── nginx-configmap.yaml │ ├── nginx-service-deployment.yaml │ ├── postgres-service-deployment.yaml │ ├── redis-service-deployment.yaml │ ├── secrets.yaml │ ├── slackbot-service-deployment.yaml │ ├── vespa-service-deployment.yaml │ └── web_server-service-deployment.yaml ├── examples ├── assistants-api │ └── topics_analyzer.py └── widget │ ├── .env.example │ ├── .eslintrc.json │ ├── .gitignore │ ├── README.md │ ├── next.config.mjs │ ├── package-lock.json │ ├── package.json │ ├── postcss.config.mjs │ ├── src │ └── app │ │ ├── globals.css │ │ ├── layout.tsx │ │ ├── page.tsx │ │ └── widget │ │ └── Widget.tsx │ ├── tailwind.config.ts │ └── tsconfig.json └── web ├── .dockerignore ├── .eslintrc.json ├── .gitignore ├── .prettierignore ├── .prettierrc.json ├── @types └── favicon-fetch.d.ts ├── Dockerfile ├── README.md ├── admin2_auth.json ├── components.json ├── instrumentation.ts ├── jest.config.js ├── next.config.js ├── package-lock.json ├── package.json ├── playwright.config.ts ├── postcss.config.js ├── public ├── Airtable.svg ├── Amazon.png ├── Amazon.svg ├── Anthropic.svg ├── Asana.png ├── Axero.jpeg ├── Azure.png ├── Clickup.svg ├── Cohere.svg ├── Confluence.svg ├── Deepseek.svg ├── Discourse.png ├── Document360.png ├── Dropbox.png ├── Egnyte.png ├── Fireflies.png ├── Freshdesk.png ├── Gemini.svg ├── GitBookDark.png ├── GitBookLight.png ├── Github.png ├── GithubDarkMode.png ├── Gitlab.png ├── Gmail.png ├── Gong.png ├── Google.png ├── GoogleCloudStorage.png ├── GoogleDrive.png ├── GoogleSites.png ├── Guru.svg ├── Highspot.png ├── HubSpot.png ├── Jira.svg ├── Linear.png ├── Loopio.png ├── MediaWiki.svg ├── Meta.svg ├── Microsoft.svg ├── Mistral.svg ├── Mixedbread.png ├── Notion.png ├── OCI.svg ├── OpenSource.png ├── Openai.svg ├── Productboard.png ├── S3.png ├── Salesforce.png ├── Sharepoint.png ├── SlabLogo.png ├── Slack.png ├── Teams.png ├── Voyage.png ├── Wikipedia.png ├── Xenforo.svg ├── Zendesk.svg ├── Zulip.png ├── discord.png ├── litellm.png ├── logo-dark.png ├── logo.png ├── logo.svg ├── logotype-dark.png ├── logotype.png ├── microsoft.png ├── nomic.svg ├── onyx.ico ├── r2.png └── web.svg ├── screenshots ├── assistants_mine_page.png ├── chat_page.png ├── chat_page_after_create.png └── create_assistant_page.png ├── sentry.client.config.ts ├── sentry.edge.config.ts ├── sentry.server.config.ts ├── src ├── app │ ├── PostHogPageView.tsx │ ├── admin │ │ ├── actions │ │ │ ├── ActionEditor.tsx │ │ │ ├── ActionTable.tsx │ │ │ ├── edit │ │ │ │ └── [toolId] │ │ │ │ │ ├── DeleteToolButton.tsx │ │ │ │ │ └── page.tsx │ │ │ ├── new │ │ │ │ └── page.tsx │ │ │ └── page.tsx │ │ ├── add-connector │ │ │ └── page.tsx │ │ ├── api-key │ │ │ ├── OnyxApiKeyForm.tsx │ │ │ ├── lib.ts │ │ │ ├── page.tsx │ │ │ └── types.ts │ │ ├── assistants │ │ │ ├── AssistantEditor.tsx │ │ │ ├── CollapsibleSection.tsx │ │ │ ├── HidableSection.tsx │ │ │ ├── LabelCard.tsx │ │ │ ├── LabelManagement.tsx │ │ │ ├── PersonaTable.tsx │ │ │ ├── StarterMessageList.tsx │ │ │ ├── assistantFileUtils.ts │ │ │ ├── enums.ts │ │ │ ├── interfaces.ts │ │ │ ├── lib.ts │ │ │ └── page.tsx │ │ ├── bots │ │ │ ├── SlackBotCreationForm.tsx │ │ │ ├── SlackBotTable.tsx │ │ │ ├── SlackBotUpdateForm.tsx │ │ │ ├── SlackTokensForm.tsx │ │ │ ├── [bot-id] │ │ │ │ ├── SlackChannelConfigsTable.tsx │ │ │ │ ├── channels │ │ │ │ │ ├── SlackChannelConfigCreationForm.tsx │ │ │ │ │ ├── SlackChannelConfigFormFields.tsx │ │ │ │ │ ├── [id] │ │ │ │ │ │ └── page.tsx │ │ │ │ │ └── new │ │ │ │ │ │ └── page.tsx │ │ │ │ ├── hooks.ts │ │ │ │ ├── lib.ts │ │ │ │ └── page.tsx │ │ │ ├── new │ │ │ │ ├── lib.ts │ │ │ │ └── page.tsx │ │ │ └── page.tsx │ │ ├── configuration │ │ │ ├── document-processing │ │ │ │ └── page.tsx │ │ │ ├── llm │ │ │ │ ├── ConfiguredLLMProviderDisplay.tsx │ │ │ │ ├── CustomLLMProviderUpdateForm.tsx │ │ │ │ ├── LLMConfiguration.tsx │ │ │ │ ├── LLMProviderUpdateForm.tsx │ │ │ │ ├── ModelConfigurationField.tsx │ │ │ │ ├── constants.ts │ │ │ │ ├── interfaces.ts │ │ │ │ ├── page.tsx │ │ │ │ └── utils.ts │ │ │ └── search │ │ │ │ ├── UpgradingPage.tsx │ │ │ │ └── page.tsx │ │ ├── connector │ │ │ └── [ccPairId] │ │ │ │ ├── ConfigDisplay.tsx │ │ │ │ ├── DeletionButton.tsx │ │ │ │ ├── DeletionErrorStatus.tsx │ │ │ │ ├── IndexAttemptErrorsModal.tsx │ │ │ │ ├── IndexingAttemptsTable.tsx │ │ │ │ ├── ReIndexButton.tsx │ │ │ │ ├── ReIndexModal.tsx │ │ │ │ ├── ReIndexPopup.tsx │ │ │ │ ├── lib.ts │ │ │ │ ├── page.tsx │ │ │ │ ├── types.ts │ │ │ │ ├── unused.txt │ │ │ │ └── useStatusChange.tsx │ │ ├── connectors │ │ │ └── [connector] │ │ │ │ ├── AddConnectorPage.tsx │ │ │ │ ├── ConnectorWrapper.tsx │ │ │ │ ├── NavigationRow.tsx │ │ │ │ ├── Sidebar.tsx │ │ │ │ ├── auth │ │ │ │ └── callback │ │ │ │ │ └── route.ts │ │ │ │ ├── oauth │ │ │ │ ├── callback │ │ │ │ │ └── page.tsx │ │ │ │ └── finalize │ │ │ │ │ └── page.tsx │ │ │ │ ├── page.tsx │ │ │ │ └── pages │ │ │ │ ├── Advanced.tsx │ │ │ │ ├── ConnectorInput │ │ │ │ ├── FileInput.tsx │ │ │ │ ├── ListInput.tsx │ │ │ │ ├── NumberInput.tsx │ │ │ │ └── SelectInput.tsx │ │ │ │ ├── DynamicConnectorCreationForm.tsx │ │ │ │ ├── FieldRendering.tsx │ │ │ │ ├── gdrive │ │ │ │ ├── Credential.tsx │ │ │ │ └── GoogleDrivePage.tsx │ │ │ │ ├── gmail │ │ │ │ ├── Credential.tsx │ │ │ │ └── GmailPage.tsx │ │ │ │ └── utils │ │ │ │ ├── files.ts │ │ │ │ ├── google_site.ts │ │ │ │ └── hooks.ts │ │ ├── debug │ │ │ └── page.tsx │ │ ├── documents │ │ │ ├── ScoreEditor.tsx │ │ │ ├── explorer │ │ │ │ ├── Explorer.tsx │ │ │ │ ├── lib.ts │ │ │ │ └── page.tsx │ │ │ ├── feedback │ │ │ │ ├── DocumentFeedbackTable.tsx │ │ │ │ ├── constants.ts │ │ │ │ └── page.tsx │ │ │ ├── lib.ts │ │ │ └── sets │ │ │ │ ├── DocumentSetCreationForm.tsx │ │ │ │ ├── [documentSetId] │ │ │ │ └── page.tsx │ │ │ │ ├── hooks.tsx │ │ │ │ ├── lib.ts │ │ │ │ ├── new │ │ │ │ └── page.tsx │ │ │ │ └── page.tsx │ │ ├── embeddings │ │ │ ├── EmbeddingModelSelectionForm.tsx │ │ │ ├── RerankingFormPage.tsx │ │ │ ├── interfaces.ts │ │ │ ├── modals │ │ │ │ ├── AlreadyPickedModal.tsx │ │ │ │ ├── ChangeCredentialsModal.tsx │ │ │ │ ├── DeleteCredentialsModal.tsx │ │ │ │ ├── InstantSwitchConfirmModal.tsx │ │ │ │ ├── ModelSelectionModal.tsx │ │ │ │ ├── ProviderCreationModal.tsx │ │ │ │ └── SelectModelModal.tsx │ │ │ ├── page.tsx │ │ │ └── pages │ │ │ │ ├── AdvancedEmbeddingFormPage.tsx │ │ │ │ ├── CloudEmbeddingPage.tsx │ │ │ │ ├── EmbeddingFormPage.tsx │ │ │ │ ├── OpenEmbeddingPage.tsx │ │ │ │ └── utils.ts │ │ ├── indexing │ │ │ └── status │ │ │ │ ├── CCPairIndexingStatusTable.tsx │ │ │ │ ├── FilterComponent.tsx │ │ │ │ └── page.tsx │ │ ├── layout.tsx │ │ ├── settings │ │ │ ├── AnonymousUserPath.tsx │ │ │ ├── SettingsForm.tsx │ │ │ ├── hooks │ │ │ │ └── useVisionProviders.ts │ │ │ ├── interfaces.ts │ │ │ └── page.tsx │ │ ├── systeminfo │ │ │ └── page.tsx │ │ ├── token-rate-limits │ │ │ ├── CreateRateLimitModal.tsx │ │ │ ├── TokenRateLimitTables.tsx │ │ │ ├── lib.ts │ │ │ ├── page.tsx │ │ │ └── types.ts │ │ └── users │ │ │ └── page.tsx │ ├── anonymous │ │ └── [id] │ │ │ ├── AnonymousPage.tsx │ │ │ └── page.tsx │ ├── api │ │ └── [...path] │ │ │ └── route.ts │ ├── assistants │ │ ├── AssistantSharedStatus.tsx │ │ ├── LargeBackButton.tsx │ │ ├── SidebarWrapper.tsx │ │ ├── ToolsDisplay.tsx │ │ ├── edit │ │ │ └── [id] │ │ │ │ └── page.tsx │ │ ├── mine │ │ │ ├── AssistantCard.tsx │ │ │ ├── AssistantModal.tsx │ │ │ ├── AssistantSharingModal.tsx │ │ │ ├── AssistantSharingPopover.tsx │ │ │ └── MakePublicAssistantPopover.tsx │ │ └── new │ │ │ └── page.tsx │ ├── auth │ │ ├── create-account │ │ │ └── page.tsx │ │ ├── error │ │ │ ├── layout.tsx │ │ │ └── page.tsx │ │ ├── forgot-password │ │ │ ├── page.tsx │ │ │ └── utils.ts │ │ ├── impersonate │ │ │ └── page.tsx │ │ ├── join │ │ │ └── page.tsx │ │ ├── lib.ts │ │ ├── login │ │ │ ├── EmailPasswordForm.tsx │ │ │ ├── LoginPage.tsx │ │ │ ├── LoginText.tsx │ │ │ ├── SignInButton.tsx │ │ │ └── page.tsx │ │ ├── logout │ │ │ └── route.ts │ │ ├── oauth │ │ │ └── callback │ │ │ │ └── route.ts │ │ ├── oidc │ │ │ └── callback │ │ │ │ └── route.ts │ │ ├── reset-password │ │ │ └── page.tsx │ │ ├── saml │ │ │ └── callback │ │ │ │ └── route.ts │ │ ├── signup │ │ │ ├── ReferralSourceSelector.tsx │ │ │ └── page.tsx │ │ ├── verify-email │ │ │ ├── Verify.tsx │ │ │ └── page.tsx │ │ └── waiting-on-verification │ │ │ ├── RequestNewVerificationEmail.tsx │ │ │ └── page.tsx │ ├── chat │ │ ├── ChatBanner.tsx │ │ ├── ChatIntro.tsx │ │ ├── ChatPage.tsx │ │ ├── ChatPersonaSelector.tsx │ │ ├── ChatPopup.tsx │ │ ├── RegenerateOption.tsx │ │ ├── WrappedChat.tsx │ │ ├── chat_search │ │ │ ├── ChatSearchGroup.tsx │ │ │ ├── ChatSearchItem.tsx │ │ │ ├── ChatSearchModal.tsx │ │ │ ├── LoadingSpinner.tsx │ │ │ ├── NewChatButton.tsx │ │ │ ├── components │ │ │ │ ├── ChatSearchSkeleton.tsx │ │ │ │ └── SearchInput.tsx │ │ │ ├── hooks │ │ │ │ ├── useChatSearch.ts │ │ │ │ └── useIntersectionObserver.ts │ │ │ ├── interfaces.ts │ │ │ └── utils.ts │ │ ├── documentSidebar │ │ │ ├── ChatDocumentDisplay.tsx │ │ │ ├── DocumentResults.tsx │ │ │ ├── DocumentSelector.tsx │ │ │ └── SelectedDocumentDisplay.tsx │ │ ├── files │ │ │ ├── InputBarPreview.tsx │ │ │ ├── documents │ │ │ │ └── DocumentPreview.tsx │ │ │ └── images │ │ │ │ ├── FullImageModal.tsx │ │ │ │ ├── InMessageImage.tsx │ │ │ │ ├── InputBarPreviewImage.tsx │ │ │ │ └── utils.ts │ │ ├── folders │ │ │ ├── FolderDropdown.tsx │ │ │ ├── FolderList.tsx │ │ │ ├── FolderManagement.tsx │ │ │ └── interfaces.ts │ │ ├── input-prompts │ │ │ ├── InputPrompts.tsx │ │ │ ├── PromptCard.tsx │ │ │ └── page.tsx │ │ ├── input │ │ │ ├── AgenticToggle.tsx │ │ │ ├── ChatInputAssistant.tsx │ │ │ ├── ChatInputBar.tsx │ │ │ ├── ChatInputOption.tsx │ │ │ ├── FilterDisplay.tsx │ │ │ ├── FilterPills.tsx │ │ │ ├── LLMPopover.tsx │ │ │ ├── SelectedFilterDisplay.tsx │ │ │ └── SimplifiedChatInputBar.tsx │ │ ├── interfaces.ts │ │ ├── layout.tsx │ │ ├── lib.tsx │ │ ├── message │ │ │ ├── AgenticMessage.tsx │ │ │ ├── CodeBlock.tsx │ │ │ ├── ContinueMessage.tsx │ │ │ ├── DocumentsDisplay.tsx │ │ │ ├── MemoizedTextComponents.tsx │ │ │ ├── Messages.tsx │ │ │ ├── Resubmit.tsx │ │ │ ├── SearchSummary.tsx │ │ │ ├── SkippedSearch.tsx │ │ │ ├── SourcesDisplay.tsx │ │ │ ├── StreamingMessages.ts │ │ │ ├── SubQuestionProgress.tsx │ │ │ ├── SubQuestionsDisplay.tsx │ │ │ ├── codeUtils.test.ts │ │ │ ├── codeUtils.ts │ │ │ ├── copyingUtils.tsx │ │ │ ├── custom-code-styles.css │ │ │ ├── hooks.ts │ │ │ └── thinkingBox │ │ │ │ ├── ThinkingBox.css │ │ │ │ └── ThinkingBox.tsx │ │ ├── modal │ │ │ ├── FeedbackModal.tsx │ │ │ ├── InputPromptsSection.tsx │ │ │ ├── MakePublicAssistantModal.tsx │ │ │ ├── ShareChatSessionModal.tsx │ │ │ ├── ThemeToggle.tsx │ │ │ ├── UserSettingsModal.tsx │ │ │ └── configuration │ │ │ │ └── AssistantsTab.tsx │ │ ├── modifiers │ │ │ ├── SearchTypeSelector.tsx │ │ │ └── SelectedDocuments.tsx │ │ ├── my-documents │ │ │ ├── DocumentsContext.tsx │ │ │ ├── MyDocumenItem.tsx │ │ │ ├── MyDocuments.tsx │ │ │ ├── WrappedDocuments.tsx │ │ │ ├── [id] │ │ │ │ ├── UserFileContent.tsx │ │ │ │ ├── UserFolder.tsx │ │ │ │ ├── UserFolderContent.tsx │ │ │ │ ├── components │ │ │ │ │ ├── DocumentList.tsx │ │ │ │ │ ├── panels │ │ │ │ │ │ ├── AddWebsitePanel.tsx │ │ │ │ │ │ ├── ContextLimitPanel.tsx │ │ │ │ │ │ ├── ModelSelector.tsx │ │ │ │ │ │ └── SharingPanel.tsx │ │ │ │ │ └── upload │ │ │ │ │ │ ├── CircularProgress.tsx │ │ │ │ │ │ ├── FileUploadSection.tsx │ │ │ │ │ │ └── UploadWarning.tsx │ │ │ │ └── page.tsx │ │ │ ├── api.ts │ │ │ ├── components │ │ │ │ ├── ContextUsage.tsx │ │ │ │ ├── FileListItem.tsx │ │ │ │ ├── FilePicker.tsx │ │ │ │ ├── SearchResultItem.tsx │ │ │ │ ├── SelectedItemsList.tsx │ │ │ │ ├── SharedFolderItem.tsx │ │ │ │ └── types.ts │ │ │ ├── page.tsx │ │ │ └── useDocuments.ts │ │ ├── nrf │ │ │ ├── NRFPage.tsx │ │ │ ├── interfaces.ts │ │ │ └── page.tsx │ │ ├── page.tsx │ │ ├── searchParams.ts │ │ ├── sessionSidebar │ │ │ ├── ChatGroup.tsx │ │ │ ├── ChatSessionDisplay.tsx │ │ │ ├── HistorySidebar.tsx │ │ │ ├── PagesTab.tsx │ │ │ └── types.ts │ │ ├── shared │ │ │ └── [chatId] │ │ │ │ ├── SharedChatDisplay.tsx │ │ │ │ └── page.tsx │ │ ├── shared_chat_search │ │ │ └── FunctionalWrapper.tsx │ │ ├── tools │ │ │ ├── GeneratingImageDisplay.tsx │ │ │ ├── ToolRunningAnimation.tsx │ │ │ └── constants.ts │ │ ├── types.ts │ │ ├── useDocumentSelection.ts │ │ └── utils │ │ │ └── thinkingTokens.ts │ ├── components │ │ └── nrf │ │ │ ├── SettingsPanel.tsx │ │ │ └── ShortcutsDisplay.tsx │ ├── config │ │ └── timeRange.tsx │ ├── connector │ │ └── oauth │ │ │ └── callback │ │ │ └── [source] │ │ │ └── route.tsx │ ├── ee │ │ ├── LICENSE │ │ ├── admin │ │ │ ├── billing │ │ │ │ ├── BillingAlerts.tsx │ │ │ │ ├── BillingInformationPage.tsx │ │ │ │ ├── InfoItem.tsx │ │ │ │ ├── SubscriptionSummary.tsx │ │ │ │ └── page.tsx │ │ │ ├── groups │ │ │ │ ├── ConnectorEditor.tsx │ │ │ │ ├── UserEditor.tsx │ │ │ │ ├── UserGroupCreationForm.tsx │ │ │ │ ├── UserGroupsTable.tsx │ │ │ │ ├── [groupId] │ │ │ │ │ ├── AddConnectorForm.tsx │ │ │ │ │ ├── AddMemberForm.tsx │ │ │ │ │ ├── AddTokenRateLimitForm.tsx │ │ │ │ │ ├── GroupDisplay.tsx │ │ │ │ │ ├── hook.ts │ │ │ │ │ ├── lib.ts │ │ │ │ │ └── page.tsx │ │ │ │ ├── lib.ts │ │ │ │ ├── page.tsx │ │ │ │ └── types.ts │ │ │ ├── layout.tsx │ │ │ ├── performance │ │ │ │ ├── custom-analytics │ │ │ │ │ ├── CustomAnalyticsUpdateForm.tsx │ │ │ │ │ └── page.tsx │ │ │ │ ├── lib.ts │ │ │ │ ├── query-history │ │ │ │ │ ├── FeedbackBadge.tsx │ │ │ │ │ ├── KickoffCSVExport.tsx │ │ │ │ │ ├── QueryHistoryTable.tsx │ │ │ │ │ ├── [id] │ │ │ │ │ │ └── page.tsx │ │ │ │ │ ├── constants.ts │ │ │ │ │ ├── page.tsx │ │ │ │ │ ├── types.ts │ │ │ │ │ └── utils.ts │ │ │ │ └── usage │ │ │ │ │ ├── FeedbackChart.tsx │ │ │ │ │ ├── OnyxBotChart.tsx │ │ │ │ │ ├── PersonaMessagesChart.tsx │ │ │ │ │ ├── QueryPerformanceChart.tsx │ │ │ │ │ ├── UsageReports.tsx │ │ │ │ │ ├── page.tsx │ │ │ │ │ └── types.ts │ │ │ ├── standard-answer │ │ │ │ ├── StandardAnswerCreationForm.tsx │ │ │ │ ├── [id] │ │ │ │ │ └── page.tsx │ │ │ │ ├── hooks.ts │ │ │ │ ├── lib.ts │ │ │ │ ├── new │ │ │ │ │ └── page.tsx │ │ │ │ └── page.tsx │ │ │ └── whitelabeling │ │ │ │ ├── ImageUpload.tsx │ │ │ │ ├── WhitelabelingForm.tsx │ │ │ │ └── page.tsx │ │ ├── assistants │ │ │ └── stats │ │ │ │ └── [id] │ │ │ │ ├── AssistantStats.tsx │ │ │ │ ├── WrappedAssistantsStats.tsx │ │ │ │ └── page.tsx │ │ └── layout.tsx │ ├── global-error.tsx │ ├── globals.css │ ├── layout.tsx │ ├── not-found.tsx │ ├── page.tsx │ ├── providers.tsx │ ├── search │ │ └── components │ │ │ └── SearchResultItem.tsx │ └── web-vitals.tsx ├── components │ ├── AdvancedOptionsToggle.tsx │ ├── BackButton.tsx │ ├── BasicClickable.tsx │ ├── Bubble.tsx │ ├── Button.tsx │ ├── CleanupModal.tsx │ ├── ConnectorMultiSelect.tsx │ ├── CopyButton.tsx │ ├── CustomCheckbox.tsx │ ├── DeleteButton.tsx │ ├── DeleteEntityModal.tsx │ ├── Dropdown.tsx │ ├── EditButton.tsx │ ├── EditableStringFieldDisplay.tsx │ ├── EditableTextAreaDisplay.tsx │ ├── EditableValue.tsx │ ├── ErrorCallout.tsx │ ├── HoverPopup.tsx │ ├── Hoverable.tsx │ ├── IsPublicGroupSelector.tsx │ ├── Loading.tsx │ ├── MetadataBadge.tsx │ ├── Modal.tsx │ ├── MoveFolderModal.tsx │ ├── MultiSelectDropdown.tsx │ ├── NonSelectableConnectors.tsx │ ├── OnyxInitializingLoader.tsx │ ├── PageSelector.tsx │ ├── SSRAutoRefresh.tsx │ ├── SearchResultIcon.tsx │ ├── SourceIcon.tsx │ ├── Spinner.tsx │ ├── Status.tsx │ ├── SwitchModelModal.tsx │ ├── TemporaryLoadingModal.tsx │ ├── TokenDisplay.tsx │ ├── UserDropdown.tsx │ ├── WebResultIcon.tsx │ ├── admin │ │ ├── CardSection.tsx │ │ ├── ClientLayout.tsx │ │ ├── Layout.tsx │ │ ├── Title.tsx │ │ ├── connectors │ │ │ ├── AccessTypeForm.tsx │ │ │ ├── AccessTypeGroupSelector.tsx │ │ │ ├── AdminSidebar.tsx │ │ │ ├── AttachCredentialPopup.tsx │ │ │ ├── AutoSyncOptions.tsx │ │ │ ├── BasicTable.tsx │ │ │ ├── ConnectorTitle.tsx │ │ │ ├── CredentialForm.tsx │ │ │ ├── CustomButton.tsx │ │ │ ├── Field.tsx │ │ │ ├── FileUpload.tsx │ │ │ ├── IsPublicField.tsx │ │ │ ├── Popup.tsx │ │ │ ├── buttons │ │ │ │ ├── AttachCredentialButtonForTable.tsx │ │ │ │ └── IndexButtonForTable.tsx │ │ │ └── types.ts │ │ └── users │ │ │ ├── BulkAdd.tsx │ │ │ ├── CenteredPageSelector.tsx │ │ │ ├── InvitedUserTable.tsx │ │ │ ├── PendingUsersTable.tsx │ │ │ ├── ResetPasswordModal.tsx │ │ │ ├── SignedUpUserTable.tsx │ │ │ ├── UserStatusButtons.tsx │ │ │ └── buttons │ │ │ ├── DeactivateUserButton.tsx │ │ │ ├── DeleteUserButton.tsx │ │ │ ├── InviteUserButton.tsx │ │ │ ├── LeaveOrganizationButton.tsx │ │ │ └── UserRoleDropdown.tsx │ ├── assistants │ │ ├── AssistantCards.tsx │ │ ├── AssistantIcon.tsx │ │ └── StarterMessage.tsx │ ├── auth │ │ ├── AuthErrorDisplay.tsx │ │ └── AuthFlowContainer.tsx │ ├── chat │ │ ├── BlurBackground.tsx │ │ ├── FunctionalWrapper.tsx │ │ ├── Header.tsx │ │ ├── MinimalMarkdown.tsx │ │ ├── Notifications.tsx │ │ ├── ProviderContext.tsx │ │ ├── TextView.tsx │ │ ├── UnconfiguredLlmProviderText.tsx │ │ ├── hooks.ts │ │ └── sources │ │ │ ├── SidebarSource.tsx │ │ │ └── SourceCard.tsx │ ├── context │ │ ├── AppProvider.tsx │ │ ├── AssistantsContext.tsx │ │ ├── ChatContext.tsx │ │ ├── EmbeddingContext.tsx │ │ ├── FormContext.tsx │ │ ├── ModalContext.tsx │ │ ├── NRFPreferencesContext.tsx │ │ └── SearchContext.tsx │ ├── credentials │ │ ├── CredentialFields.tsx │ │ ├── CredentialSection.tsx │ │ ├── actions │ │ │ ├── CreateCredential.tsx │ │ │ ├── CreateStdOAuthCredential.tsx │ │ │ ├── EditCredential.tsx │ │ │ └── ModifyCredential.tsx │ │ ├── lib.ts │ │ └── types.ts │ ├── dateRangeSelectors │ │ ├── AdminDateRangeSelector.tsx │ │ ├── SearchDateRangeSelector.tsx │ │ └── dateUtils.ts │ ├── documentSet │ │ └── DocumentSetSelectable.tsx │ ├── embedding │ │ ├── CustomEmbeddingModelForm.tsx │ │ ├── CustomModelForm.tsx │ │ ├── EmbeddingSidebar.tsx │ │ ├── FailedReIndexAttempts.tsx │ │ ├── ModelSelector.tsx │ │ ├── ReindexingProgressTable.tsx │ │ └── interfaces.tsx │ ├── errorPages │ │ ├── AccessRestrictedPage.tsx │ │ ├── CloudErrorPage.tsx │ │ ├── ErrorPage.tsx │ │ └── ErrorPageLayout.tsx │ ├── extension │ │ └── Shortcuts.tsx │ ├── filters │ │ ├── SourceSelector.tsx │ │ └── TimeRangeSelector.tsx │ ├── header │ │ ├── AnnouncementBanner.tsx │ │ ├── HeaderTitle.tsx │ │ ├── HeaderWrapper.tsx │ │ └── LogoWithText.tsx │ ├── health │ │ ├── healthcheck.tsx │ │ └── refreshUtils.ts │ ├── icons │ │ ├── DynamicFaIcon.tsx │ │ ├── icons.tsx │ │ └── mixedbread.svg │ ├── initialSetup │ │ └── welcome │ │ │ ├── WelcomeModal.tsx │ │ │ ├── WelcomeModalWrapper.tsx │ │ │ ├── constants.ts │ │ │ └── lib.ts │ ├── llm │ │ ├── ApiKeyForm.tsx │ │ ├── ApiKeyModal.tsx │ │ └── LLMSelector.tsx │ ├── loading.css │ ├── logo │ │ ├── FixedLogo.tsx │ │ └── Logo.tsx │ ├── modals │ │ ├── ConfirmEntityModal.tsx │ │ ├── CreateEntityModal.tsx │ │ ├── EditPropertyModal.tsx │ │ ├── ExceptionTraceModal.tsx │ │ ├── GenericConfirmModal.tsx │ │ ├── NewTeamModal.tsx │ │ ├── NewTenantModal.tsx │ │ └── NoAssistantModal.tsx │ ├── popover │ │ ├── DefaultPopover.tsx │ │ ├── Popover.tsx │ │ └── styles.css │ ├── popup │ │ ├── Popup.tsx │ │ └── PopupFromQuery.tsx │ ├── resizable │ │ ├── ResizableSection.tsx │ │ └── constants.ts │ ├── search │ │ ├── DocumentDisplay.tsx │ │ ├── DocumentFeedbackBlock.tsx │ │ ├── DocumentUpdatedAtBadge.tsx │ │ ├── PersonaSelector.tsx │ │ ├── QAFeedback.tsx │ │ ├── SearchBar.tsx │ │ ├── filtering │ │ │ ├── FilterDropdown.tsx │ │ │ ├── FilterPopup.tsx │ │ │ ├── HorizontalSourceSelector.tsx │ │ │ └── TagFilter.tsx │ │ └── results │ │ │ ├── AnswerSection.tsx │ │ │ ├── Citation.tsx │ │ │ ├── QuotesSection.tsx │ │ │ └── ResponseSection.tsx │ ├── settings │ │ ├── SettingsProvider.tsx │ │ ├── lib.ts │ │ └── usePaidEnterpriseFeaturesEnabled.ts │ ├── spinner.css │ ├── standardAnswers │ │ ├── StandardAnswerCategoryDropdown.tsx │ │ └── getStandardAnswerCategoriesIfEE.tsx │ ├── table │ │ ├── DragHandle.tsx │ │ ├── DraggableRow.tsx │ │ ├── DraggableTable.tsx │ │ ├── DraggableTableBody.tsx │ │ ├── StaticRow.tsx │ │ └── interfaces.ts │ ├── theme │ │ └── ThemeProvider.tsx │ ├── tools │ │ ├── CSVContent.tsx │ │ ├── ExpandableContentWrapper.tsx │ │ └── ToolResult.tsx │ ├── tooltip │ │ └── CustomTooltip.tsx │ ├── ui │ │ ├── CheckField.tsx │ │ ├── RadioGroupItemField.tsx │ │ ├── SlideOverModal.tsx │ │ ├── TabToggle.tsx │ │ ├── accordion.tsx │ │ ├── alert.tsx │ │ ├── areaChart.tsx │ │ ├── badge.tsx │ │ ├── button.tsx │ │ ├── calendar.tsx │ │ ├── callout.tsx │ │ ├── card.tsx │ │ ├── chart.tsx │ │ ├── checkbox.tsx │ │ ├── collapsible.tsx │ │ ├── command.tsx │ │ ├── createButton.tsx │ │ ├── dialog.tsx │ │ ├── drawer.tsx │ │ ├── dropdown-menu-with-tooltip.tsx │ │ ├── dropdown-menu.tsx │ │ ├── fully_wrapped_tabs.tsx │ │ ├── input.tsx │ │ ├── label.tsx │ │ ├── popover.tsx │ │ ├── radio-group.tsx │ │ ├── scroll-area.tsx │ │ ├── select.tsx │ │ ├── separator.tsx │ │ ├── slider.tsx │ │ ├── switch.tsx │ │ ├── table.tsx │ │ ├── tabs.tsx │ │ ├── text.tsx │ │ ├── textarea.tsx │ │ ├── title.tsx │ │ ├── tooltip.tsx │ │ └── truncatedText.tsx │ └── user │ │ └── UserProvider.tsx ├── hooks │ ├── input-prompts.ts │ ├── usePaginatedFetch.tsx │ └── useTokenRefresh.ts ├── lib │ ├── admin │ │ └── users │ │ │ └── userMutationFetcher.ts │ ├── assistantIconUtils.tsx │ ├── assistants │ │ ├── checkOwnership.ts │ │ ├── fetchAssistantsSS.ts │ │ ├── fetchPersonaEditorInfoSS.ts │ │ ├── orderAssistants.ts │ │ ├── shareAssistant.ts │ │ ├── updateAssistantPreferences.ts │ │ └── utils.ts │ ├── billing │ │ ├── interfaces.ts │ │ └── utils.ts │ ├── browserUtilities.tsx │ ├── ccPair.ts │ ├── chat │ │ ├── fetchAssistantdata.ts │ │ ├── fetchAssistantsGalleryData.ts │ │ ├── fetchChatData.ts │ │ └── fetchSomeChatData.ts │ ├── clickUtils.ts │ ├── connector.ts │ ├── connectors │ │ ├── AutoSyncOptionFields.tsx │ │ ├── connectors.tsx │ │ ├── credentials.ts │ │ └── oauth.ts │ ├── constants.ts │ ├── contains.ts │ ├── credential.ts │ ├── dateUtils.ts │ ├── documentDeletion.ts │ ├── documentUtils.ts │ ├── drag │ │ └── constants.ts │ ├── extension │ │ ├── constants.ts │ │ └── utils.ts │ ├── fetchUtils.ts │ ├── fetcher.ts │ ├── fileUtils.ts │ ├── filters.ts │ ├── generated │ │ └── README.md │ ├── gmail.ts │ ├── googleConnector.ts │ ├── googleDrive.ts │ ├── hooks.ts │ ├── indexAttempt.ts │ ├── llm │ │ ├── fetchLLMs.ts │ │ ├── utils.ts │ │ └── visionLLM.ts │ ├── oauth_utils.ts │ ├── redirectSS.ts │ ├── search │ │ ├── cancellable.ts │ │ ├── chatSessions.ts │ │ ├── interfaces.ts │ │ ├── streamingUtils.ts │ │ ├── utils.ts │ │ └── utilsSS.ts │ ├── sources.ts │ ├── tags │ │ └── tagUtils.ts │ ├── time.ts │ ├── tools │ │ ├── edit.ts │ │ ├── fetchTools.ts │ │ └── interfaces.ts │ ├── types.ts │ ├── updateSlackBotField.ts │ ├── urlBuilder.ts │ ├── user.ts │ ├── userSS.ts │ ├── users │ │ ├── UserSettings.tsx │ │ └── fetchUserData.ts │ ├── utils.ts │ ├── utilsSS.ts │ └── version.ts ├── middleware.ts └── services │ └── documentsService.ts ├── tailwind-themes ├── custom │ └── .gitignore └── tailwind.config.js ├── tailwind.config.js ├── tests └── e2e │ ├── admin_auth.setup.ts │ ├── admin_oauth_redirect_uri.spec.ts │ ├── admin_pages.spec.ts │ ├── assistants │ └── create_and_edit_assistant.spec.ts │ ├── auth │ └── password_managements.spec.ts │ ├── chat │ ├── current_assistant.spec.ts │ ├── live_assistant.spec.ts │ └── llm_ordering.spec.ts │ ├── chromaticSnapshots.json │ ├── constants.js │ ├── global-setup.ts │ └── utils │ ├── auth.ts │ ├── chatActions.ts │ └── dragUtils.ts └── tsconfig.json /.github/CODEOWNERS: -------------------------------------------------------------------------------- 1 | * @onyx-dot-app/onyx-core-team 2 | -------------------------------------------------------------------------------- /.github/pull_request_template.md: -------------------------------------------------------------------------------- 1 | ## Description 2 | 3 | [Provide a brief description of the changes in this PR] 4 | 5 | ## How Has This Been Tested? 6 | 7 | [Describe the tests you ran to verify your changes] 8 | 9 | ## Backporting (check the box to trigger backport action) 10 | 11 | Note: You have to check that the action passes, otherwise resolve the conflicts manually and tag the patches. 12 | 13 | - [ ] This PR should be backported (make sure to check that the backport attempt succeeds) 14 | - [ ] [Optional] Override Linear Check 15 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # editors 2 | .vscode 3 | .zed 4 | 5 | # macos 6 | .DS_store 7 | 8 | # python 9 | .venv 10 | .mypy_cache 11 | .idea 12 | 13 | # testing 14 | /web/test-results/ 15 | backend/onyx/agent_search/main/test_data.json 16 | backend/tests/regression/answer_quality/test_data.json 17 | backend/tests/regression/search_quality/eval-* 18 | backend/tests/regression/search_quality/search_eval_config.yaml 19 | backend/tests/regression/search_quality/*.json 20 | 21 | # secret files 22 | .env 23 | jira_test_env 24 | 25 | # others 26 | /deployment/data/nginx/app.conf 27 | *.sw? 28 | /backend/tests/regression/answer_quality/search_test_config.yaml 29 | -------------------------------------------------------------------------------- /.prettierignore: -------------------------------------------------------------------------------- 1 | backend/tests/integration/tests/pruning/website 2 | -------------------------------------------------------------------------------- /backend/.dockerignore: -------------------------------------------------------------------------------- 1 | **/__pycache__ 2 | venv/ 3 | env/ 4 | *.egg-info 5 | .cache 6 | .git/ 7 | .svn/ 8 | .vscode/ 9 | .idea/ 10 | *.log 11 | log/ 12 | .env 13 | secrets.yaml 14 | build/ 15 | dist/ 16 | .coverage 17 | htmlcov/ 18 | -------------------------------------------------------------------------------- /backend/.gitignore: -------------------------------------------------------------------------------- 1 | __pycache__/ 2 | .mypy_cache 3 | .idea/ 4 | site_crawls/ 5 | .ipynb_checkpoints/ 6 | api_keys.py 7 | *ipynb 8 | .env* 9 | vespa-app.zip 10 | dynamic_config_storage/ 11 | celerybeat-schedule* 12 | onyx/connectors/salesforce/data/ 13 | .test.env 14 | /generated 15 | -------------------------------------------------------------------------------- /backend/alembic/script.py.mako: -------------------------------------------------------------------------------- 1 | """${message} 2 | 3 | Revision ID: ${up_revision} 4 | Revises: ${down_revision | comma,n} 5 | Create Date: ${create_date} 6 | 7 | """ 8 | from alembic import op 9 | import sqlalchemy as sa 10 | ${imports if imports else ""} 11 | 12 | # revision identifiers, used by Alembic. 13 | revision = ${repr(up_revision)} 14 | down_revision = ${repr(down_revision)} 15 | branch_labels = ${repr(branch_labels)} 16 | depends_on = ${repr(depends_on)} 17 | 18 | 19 | def upgrade() -> None: 20 | ${upgrades if upgrades else "pass"} 21 | 22 | 23 | def downgrade() -> None: 24 | ${downgrades if downgrades else "pass"} 25 | -------------------------------------------------------------------------------- /backend/alembic/versions/027381bce97c_add_shortcut_option_for_users.py: -------------------------------------------------------------------------------- 1 | """add shortcut option for users 2 | 3 | Revision ID: 027381bce97c 4 | Revises: 6fc7886d665d 5 | Create Date: 2025-01-14 12:14:00.814390 6 | 7 | """ 8 | 9 | from alembic import op 10 | import sqlalchemy as sa 11 | 12 | 13 | # revision identifiers, used by Alembic. 14 | revision = "027381bce97c" 15 | down_revision = "6fc7886d665d" 16 | branch_labels = None 17 | depends_on = None 18 | 19 | 20 | def upgrade() -> None: 21 | op.add_column( 22 | "user", 23 | sa.Column( 24 | "shortcut_enabled", sa.Boolean(), nullable=False, server_default="false" 25 | ), 26 | ) 27 | 28 | 29 | def downgrade() -> None: 30 | op.drop_column("user", "shortcut_enabled") 31 | -------------------------------------------------------------------------------- /backend/alembic/versions/0568ccf46a6b_add_thread_specific_model_selection.py: -------------------------------------------------------------------------------- 1 | """Add thread specific model selection 2 | 3 | Revision ID: 0568ccf46a6b 4 | Revises: e209dc5a8156 5 | Create Date: 2024-06-19 14:25:36.376046 6 | 7 | """ 8 | 9 | from alembic import op 10 | import sqlalchemy as sa 11 | 12 | # revision identifiers, used by Alembic. 13 | revision = "0568ccf46a6b" 14 | down_revision = "e209dc5a8156" 15 | branch_labels: None = None 16 | depends_on: None = None 17 | 18 | 19 | def upgrade() -> None: 20 | op.add_column( 21 | "chat_session", 22 | sa.Column("current_alternate_model", sa.String(), nullable=True), 23 | ) 24 | 25 | 26 | def downgrade() -> None: 27 | op.drop_column("chat_session", "current_alternate_model") 28 | -------------------------------------------------------------------------------- /backend/alembic/versions/08a1eda20fe1_add_earliest_indexing_to_connector.py: -------------------------------------------------------------------------------- 1 | """add_indexing_start_to_connector 2 | 3 | Revision ID: 08a1eda20fe1 4 | Revises: 8a87bd6ec550 5 | Create Date: 2024-07-23 11:12:39.462397 6 | 7 | """ 8 | 9 | from alembic import op 10 | import sqlalchemy as sa 11 | 12 | 13 | # revision identifiers, used by Alembic. 14 | revision = "08a1eda20fe1" 15 | down_revision = "8a87bd6ec550" 16 | branch_labels: None = None 17 | depends_on: None = None 18 | 19 | 20 | def upgrade() -> None: 21 | op.add_column( 22 | "connector", sa.Column("indexing_start", sa.DateTime(), nullable=True) 23 | ) 24 | 25 | 26 | def downgrade() -> None: 27 | op.drop_column("connector", "indexing_start") 28 | -------------------------------------------------------------------------------- /backend/alembic/versions/0ebb1d516877_add_ccpair_deletion_failure_message.py: -------------------------------------------------------------------------------- 1 | """add ccpair deletion failure message 2 | 3 | Revision ID: 0ebb1d516877 4 | Revises: 52a219fb5233 5 | Create Date: 2024-09-10 15:03:48.233926 6 | 7 | """ 8 | 9 | from alembic import op 10 | import sqlalchemy as sa 11 | 12 | 13 | # revision identifiers, used by Alembic. 14 | revision = "0ebb1d516877" 15 | down_revision = "52a219fb5233" 16 | branch_labels = None 17 | depends_on = None 18 | 19 | 20 | def upgrade() -> None: 21 | op.add_column( 22 | "connector_credential_pair", 23 | sa.Column("deletion_failure_message", sa.String(), nullable=True), 24 | ) 25 | 26 | 27 | def downgrade() -> None: 28 | op.drop_column("connector_credential_pair", "deletion_failure_message") 29 | -------------------------------------------------------------------------------- /backend/alembic/versions/1a03d2c2856b_add_indexes_to_document__tag.py: -------------------------------------------------------------------------------- 1 | """Add indexes to document__tag 2 | 3 | Revision ID: 1a03d2c2856b 4 | Revises: 9c00a2bccb83 5 | Create Date: 2025-02-18 10:45:13.957807 6 | 7 | """ 8 | 9 | from alembic import op 10 | 11 | # revision identifiers, used by Alembic. 12 | revision = "1a03d2c2856b" 13 | down_revision = "9c00a2bccb83" 14 | branch_labels: None = None 15 | depends_on: None = None 16 | 17 | 18 | def upgrade() -> None: 19 | op.create_index( 20 | op.f("ix_document__tag_tag_id"), 21 | "document__tag", 22 | ["tag_id"], 23 | unique=False, 24 | ) 25 | 26 | 27 | def downgrade() -> None: 28 | op.drop_index(op.f("ix_document__tag_tag_id"), table_name="document__tag") 29 | -------------------------------------------------------------------------------- /backend/alembic/versions/1b10e1fda030_add_additional_data_to_notifications.py: -------------------------------------------------------------------------------- 1 | """add additional data to notifications 2 | 3 | Revision ID: 1b10e1fda030 4 | Revises: 6756efa39ada 5 | Create Date: 2024-10-15 19:26:44.071259 6 | 7 | """ 8 | 9 | from alembic import op 10 | import sqlalchemy as sa 11 | from sqlalchemy.dialects import postgresql 12 | 13 | # revision identifiers, used by Alembic. 14 | revision = "1b10e1fda030" 15 | down_revision = "6756efa39ada" 16 | branch_labels = None 17 | depends_on = None 18 | 19 | 20 | def upgrade() -> None: 21 | op.add_column( 22 | "notification", sa.Column("additional_data", postgresql.JSONB(), nullable=True) 23 | ) 24 | 25 | 26 | def downgrade() -> None: 27 | op.drop_column("notification", "additional_data") 28 | -------------------------------------------------------------------------------- /backend/alembic/versions/2955778aa44c_add_chunk_count_to_document.py: -------------------------------------------------------------------------------- 1 | """add chunk count to document 2 | 3 | Revision ID: 2955778aa44c 4 | Revises: c0aab6edb6dd 5 | Create Date: 2025-01-04 11:39:43.268612 6 | 7 | """ 8 | 9 | from alembic import op 10 | import sqlalchemy as sa 11 | 12 | 13 | # revision identifiers, used by Alembic. 14 | revision = "2955778aa44c" 15 | down_revision = "c0aab6edb6dd" 16 | branch_labels = None 17 | depends_on = None 18 | 19 | 20 | def upgrade() -> None: 21 | op.add_column("document", sa.Column("chunk_count", sa.Integer(), nullable=True)) 22 | 23 | 24 | def downgrade() -> None: 25 | op.drop_column("document", "chunk_count") 26 | -------------------------------------------------------------------------------- /backend/alembic/versions/4505fd7302e1_added_is_internet_to_dbdoc.py: -------------------------------------------------------------------------------- 1 | """added is_internet to DBDoc 2 | 3 | Revision ID: 4505fd7302e1 4 | Revises: c18cdf4b497e 5 | Create Date: 2024-06-18 20:46:09.095034 6 | 7 | """ 8 | 9 | from alembic import op 10 | import sqlalchemy as sa 11 | 12 | # revision identifiers, used by Alembic. 13 | revision = "4505fd7302e1" 14 | down_revision = "c18cdf4b497e" 15 | 16 | 17 | def upgrade() -> None: 18 | op.add_column("search_doc", sa.Column("is_internet", sa.Boolean(), nullable=True)) 19 | op.add_column("tool", sa.Column("display_name", sa.String(), nullable=True)) 20 | 21 | 22 | def downgrade() -> None: 23 | op.drop_column("tool", "display_name") 24 | op.drop_column("search_doc", "is_internet") 25 | -------------------------------------------------------------------------------- /backend/alembic/versions/465f78d9b7f9_larger_access_tokens_for_oauth.py: -------------------------------------------------------------------------------- 1 | """Larger Access Tokens for OAUTH 2 | 3 | Revision ID: 465f78d9b7f9 4 | Revises: 3c5e35aa9af0 5 | Create Date: 2023-07-18 17:33:40.365034 6 | 7 | """ 8 | 9 | from alembic import op 10 | import sqlalchemy as sa 11 | 12 | 13 | # revision identifiers, used by Alembic. 14 | revision = "465f78d9b7f9" 15 | down_revision = "3c5e35aa9af0" 16 | branch_labels: None = None 17 | depends_on: None = None 18 | 19 | 20 | def upgrade() -> None: 21 | op.alter_column("oauth_account", "access_token", type_=sa.Text()) 22 | 23 | 24 | def downgrade() -> None: 25 | op.alter_column("oauth_account", "access_token", type_=sa.String(length=1024)) 26 | -------------------------------------------------------------------------------- /backend/alembic/versions/475fcefe8826_add_name_to_api_key.py: -------------------------------------------------------------------------------- 1 | """Add name to api_key 2 | 3 | Revision ID: 475fcefe8826 4 | Revises: ecab2b3f1a3b 5 | Create Date: 2024-04-11 11:05:18.414438 6 | 7 | """ 8 | 9 | from alembic import op 10 | import sqlalchemy as sa 11 | 12 | # revision identifiers, used by Alembic. 13 | revision = "475fcefe8826" 14 | down_revision = "ecab2b3f1a3b" 15 | branch_labels: None = None 16 | depends_on: None = None 17 | 18 | 19 | def upgrade() -> None: 20 | op.add_column("api_key", sa.Column("name", sa.String(), nullable=True)) 21 | 22 | 23 | def downgrade() -> None: 24 | op.drop_column("api_key", "name") 25 | -------------------------------------------------------------------------------- /backend/alembic/versions/54a74a0417fc_danswerbot_onyxbot.py: -------------------------------------------------------------------------------- 1 | """danswerbot -> onyxbot 2 | 3 | Revision ID: 54a74a0417fc 4 | Revises: 94dc3d0236f8 5 | Create Date: 2024-12-11 18:05:05.490737 6 | 7 | """ 8 | 9 | from alembic import op 10 | 11 | 12 | # revision identifiers, used by Alembic. 13 | revision = "54a74a0417fc" 14 | down_revision = "94dc3d0236f8" 15 | branch_labels = None 16 | depends_on = None 17 | 18 | 19 | def upgrade() -> None: 20 | op.alter_column("chat_session", "danswerbot_flow", new_column_name="onyxbot_flow") 21 | 22 | 23 | def downgrade() -> None: 24 | op.alter_column("chat_session", "onyxbot_flow", new_column_name="danswerbot_flow") 25 | -------------------------------------------------------------------------------- /backend/alembic/versions/5c448911b12f_add_content_type_to_userfile.py: -------------------------------------------------------------------------------- 1 | """Add content type to UserFile 2 | 3 | Revision ID: 5c448911b12f 4 | Revises: 47a07e1a38f1 5 | Create Date: 2025-04-25 16:59:48.182672 6 | 7 | """ 8 | 9 | from alembic import op 10 | import sqlalchemy as sa 11 | 12 | # revision identifiers, used by Alembic. 13 | revision = "5c448911b12f" 14 | down_revision = "47a07e1a38f1" 15 | branch_labels: None = None 16 | depends_on: None = None 17 | 18 | 19 | def upgrade() -> None: 20 | op.add_column("user_file", sa.Column("content_type", sa.String(), nullable=True)) 21 | 22 | 23 | def downgrade() -> None: 24 | op.drop_column("user_file", "content_type") 25 | -------------------------------------------------------------------------------- /backend/alembic/versions/5fc1f54cc252_hybrid_enum.py: -------------------------------------------------------------------------------- 1 | """hybrid-enum 2 | 3 | Revision ID: 5fc1f54cc252 4 | Revises: 1d6ad76d1f37 5 | Create Date: 2024-08-06 15:35:40.278485 6 | 7 | """ 8 | 9 | from alembic import op 10 | import sqlalchemy as sa 11 | 12 | # revision identifiers, used by Alembic. 13 | revision = "5fc1f54cc252" 14 | down_revision = "1d6ad76d1f37" 15 | branch_labels: None = None 16 | depends_on: None = None 17 | 18 | 19 | def upgrade() -> None: 20 | op.drop_column("persona", "search_type") 21 | 22 | 23 | def downgrade() -> None: 24 | op.add_column("persona", sa.Column("search_type", sa.String(), nullable=True)) 25 | op.execute("UPDATE persona SET search_type = 'SEMANTIC'") 26 | op.alter_column("persona", "search_type", nullable=False) 27 | -------------------------------------------------------------------------------- /backend/alembic/versions/6a804aeb4830_duplicated_no_harm_user_file_migration.py: -------------------------------------------------------------------------------- 1 | """duplicated no-harm user file migration 2 | 3 | Revision ID: 6a804aeb4830 4 | Revises: 8e1ac4f39a9f 5 | Create Date: 2025-04-01 07:26:10.539362 6 | 7 | """ 8 | 9 | # revision identifiers, used by Alembic. 10 | revision = "6a804aeb4830" 11 | down_revision = "8e1ac4f39a9f" 12 | branch_labels = None 13 | depends_on = None 14 | 15 | 16 | # Leaving this around only because some people might be on this migration 17 | # originally was a duplicate of the user files migration 18 | def upgrade() -> None: 19 | pass 20 | 21 | 22 | def downgrade() -> None: 23 | pass 24 | -------------------------------------------------------------------------------- /backend/alembic/versions/7477a5f5d728_added_model_defaults_for_users.py: -------------------------------------------------------------------------------- 1 | """Added model defaults for users 2 | 3 | Revision ID: 7477a5f5d728 4 | Revises: 213fd978c6d8 5 | Create Date: 2024-08-04 19:00:04.512634 6 | 7 | """ 8 | 9 | from alembic import op 10 | import sqlalchemy as sa 11 | 12 | # revision identifiers, used by Alembic. 13 | revision = "7477a5f5d728" 14 | down_revision = "213fd978c6d8" 15 | branch_labels: None = None 16 | depends_on: None = None 17 | 18 | 19 | def upgrade() -> None: 20 | op.add_column("user", sa.Column("default_model", sa.Text(), nullable=True)) 21 | 22 | 23 | def downgrade() -> None: 24 | op.drop_column("user", "default_model") 25 | -------------------------------------------------------------------------------- /backend/alembic/versions/767f1c2a00eb_count_chat_tokens.py: -------------------------------------------------------------------------------- 1 | """Count Chat Tokens 2 | 3 | Revision ID: 767f1c2a00eb 4 | Revises: dba7f71618f5 5 | Create Date: 2023-09-21 10:03:21.509899 6 | 7 | """ 8 | 9 | from alembic import op 10 | import sqlalchemy as sa 11 | 12 | 13 | # revision identifiers, used by Alembic. 14 | revision = "767f1c2a00eb" 15 | down_revision = "dba7f71618f5" 16 | branch_labels: None = None 17 | depends_on: None = None 18 | 19 | 20 | def upgrade() -> None: 21 | op.add_column( 22 | "chat_message", sa.Column("token_count", sa.Integer(), nullable=False) 23 | ) 24 | 25 | 26 | def downgrade() -> None: 27 | op.drop_column("chat_message", "token_count") 28 | -------------------------------------------------------------------------------- /backend/alembic/versions/797089dfb4d2_persona_start_date.py: -------------------------------------------------------------------------------- 1 | """persona_start_date 2 | 3 | Revision ID: 797089dfb4d2 4 | Revises: 55546a7967ee 5 | Create Date: 2024-09-11 14:51:49.785835 6 | 7 | """ 8 | 9 | from alembic import op 10 | import sqlalchemy as sa 11 | 12 | 13 | # revision identifiers, used by Alembic. 14 | revision = "797089dfb4d2" 15 | down_revision = "55546a7967ee" 16 | branch_labels = None 17 | depends_on = None 18 | 19 | 20 | def upgrade() -> None: 21 | op.add_column( 22 | "persona", 23 | sa.Column("search_start_date", sa.DateTime(timezone=True), nullable=True), 24 | ) 25 | 26 | 27 | def downgrade() -> None: 28 | op.drop_column("persona", "search_start_date") 29 | -------------------------------------------------------------------------------- /backend/alembic/versions/7da0ae5ad583_add_description_to_persona.py: -------------------------------------------------------------------------------- 1 | """Add description to persona 2 | 3 | Revision ID: 7da0ae5ad583 4 | Revises: e86866a9c78a 5 | Create Date: 2023-11-27 00:16:19.959414 6 | 7 | """ 8 | 9 | from alembic import op 10 | import sqlalchemy as sa 11 | 12 | # revision identifiers, used by Alembic. 13 | revision = "7da0ae5ad583" 14 | down_revision = "e86866a9c78a" 15 | branch_labels: None = None 16 | depends_on: None = None 17 | 18 | 19 | def upgrade() -> None: 20 | op.add_column("persona", sa.Column("description", sa.String(), nullable=True)) 21 | 22 | 23 | def downgrade() -> None: 24 | op.drop_column("persona", "description") 25 | -------------------------------------------------------------------------------- /backend/alembic/versions/7f726bad5367_slack_followup.py: -------------------------------------------------------------------------------- 1 | """Slack Followup 2 | 3 | Revision ID: 7f726bad5367 4 | Revises: 79acd316403a 5 | Create Date: 2024-01-15 00:19:55.991224 6 | 7 | """ 8 | 9 | from alembic import op 10 | import sqlalchemy as sa 11 | 12 | # revision identifiers, used by Alembic. 13 | revision = "7f726bad5367" 14 | down_revision = "79acd316403a" 15 | branch_labels: None = None 16 | depends_on: None = None 17 | 18 | 19 | def upgrade() -> None: 20 | op.add_column( 21 | "chat_feedback", 22 | sa.Column("required_followup", sa.Boolean(), nullable=True), 23 | ) 24 | 25 | 26 | def downgrade() -> None: 27 | op.drop_column("chat_feedback", "required_followup") 28 | -------------------------------------------------------------------------------- /backend/alembic/versions/8987770549c0_add_full_exception_stack_trace.py: -------------------------------------------------------------------------------- 1 | """Add full exception stack trace 2 | 3 | Revision ID: 8987770549c0 4 | Revises: ec3ec2eabf7b 5 | Create Date: 2024-02-10 19:31:28.339135 6 | 7 | """ 8 | 9 | from alembic import op 10 | import sqlalchemy as sa 11 | 12 | # revision identifiers, used by Alembic. 13 | revision = "8987770549c0" 14 | down_revision = "ec3ec2eabf7b" 15 | branch_labels: None = None 16 | depends_on: None = None 17 | 18 | 19 | def upgrade() -> None: 20 | op.add_column( 21 | "index_attempt", sa.Column("full_exception_trace", sa.Text(), nullable=True) 22 | ) 23 | 24 | 25 | def downgrade() -> None: 26 | op.drop_column("index_attempt", "full_exception_trace") 27 | -------------------------------------------------------------------------------- /backend/alembic/versions/91ffac7e65b3_add_expiry_time.py: -------------------------------------------------------------------------------- 1 | """add expiry time 2 | 3 | Revision ID: 91ffac7e65b3 4 | Revises: bc9771dccadf 5 | Create Date: 2024-06-24 09:39:56.462242 6 | 7 | """ 8 | 9 | from alembic import op 10 | import sqlalchemy as sa 11 | 12 | # revision identifiers, used by Alembic. 13 | revision = "91ffac7e65b3" 14 | down_revision = "795b20b85b4b" 15 | branch_labels: None = None 16 | depends_on: None = None 17 | 18 | 19 | def upgrade() -> None: 20 | op.add_column( 21 | "user", sa.Column("oidc_expiry", sa.DateTime(timezone=True), nullable=True) 22 | ) 23 | 24 | 25 | def downgrade() -> None: 26 | op.drop_column("user", "oidc_expiry") 27 | -------------------------------------------------------------------------------- /backend/alembic/versions/a8c2065484e6_add_auto_scroll_to_user_model.py: -------------------------------------------------------------------------------- 1 | """add auto scroll to user model 2 | 3 | Revision ID: a8c2065484e6 4 | Revises: abe7378b8217 5 | Create Date: 2024-11-22 17:34:09.690295 6 | 7 | """ 8 | 9 | from alembic import op 10 | import sqlalchemy as sa 11 | 12 | 13 | # revision identifiers, used by Alembic. 14 | revision = "a8c2065484e6" 15 | down_revision = "abe7378b8217" 16 | branch_labels = None 17 | depends_on = None 18 | 19 | 20 | def upgrade() -> None: 21 | op.add_column( 22 | "user", 23 | sa.Column("auto_scroll", sa.Boolean(), nullable=True, server_default=None), 24 | ) 25 | 26 | 27 | def downgrade() -> None: 28 | op.drop_column("user", "auto_scroll") 29 | -------------------------------------------------------------------------------- /backend/alembic/versions/b85f02ec1308_fix_file_type_migration.py: -------------------------------------------------------------------------------- 1 | """fix-file-type-migration 2 | 3 | Revision ID: b85f02ec1308 4 | Revises: a3bfd0d64902 5 | Create Date: 2024-05-31 18:09:26.658164 6 | 7 | """ 8 | 9 | from alembic import op 10 | 11 | # revision identifiers, used by Alembic. 12 | revision = "b85f02ec1308" 13 | down_revision = "a3bfd0d64902" 14 | branch_labels: None = None 15 | depends_on: None = None 16 | 17 | 18 | def upgrade() -> None: 19 | op.execute( 20 | """ 21 | UPDATE file_store 22 | SET file_origin = UPPER(file_origin) 23 | """ 24 | ) 25 | 26 | 27 | def downgrade() -> None: 28 | # Let's not break anything on purpose :) 29 | pass 30 | -------------------------------------------------------------------------------- /backend/alembic/versions/b896bbd0d5a7_backfill_is_internet_data_to_false.py: -------------------------------------------------------------------------------- 1 | """backfill is_internet data to False 2 | 3 | Revision ID: b896bbd0d5a7 4 | Revises: 44f856ae2a4a 5 | Create Date: 2024-07-16 15:21:05.718571 6 | 7 | """ 8 | 9 | from alembic import op 10 | 11 | 12 | # revision identifiers, used by Alembic. 13 | revision = "b896bbd0d5a7" 14 | down_revision = "44f856ae2a4a" 15 | branch_labels: None = None 16 | depends_on: None = None 17 | 18 | 19 | def upgrade() -> None: 20 | op.execute("UPDATE search_doc SET is_internet = FALSE WHERE is_internet IS NULL") 21 | 22 | 23 | def downgrade() -> None: 24 | pass 25 | -------------------------------------------------------------------------------- /backend/alembic/versions/ba98eba0f66a_add_support_for_litellm_proxy_in_.py: -------------------------------------------------------------------------------- 1 | """add support for litellm proxy in reranking 2 | 3 | Revision ID: ba98eba0f66a 4 | Revises: bceb1e139447 5 | Create Date: 2024-09-06 10:36:04.507332 6 | 7 | """ 8 | 9 | from alembic import op 10 | import sqlalchemy as sa 11 | 12 | 13 | # revision identifiers, used by Alembic. 14 | revision = "ba98eba0f66a" 15 | down_revision = "bceb1e139447" 16 | branch_labels: None = None 17 | depends_on: None = None 18 | 19 | 20 | def upgrade() -> None: 21 | op.add_column( 22 | "search_settings", sa.Column("rerank_api_url", sa.String(), nullable=True) 23 | ) 24 | 25 | 26 | def downgrade() -> None: 27 | op.drop_column("search_settings", "rerank_api_url") 28 | -------------------------------------------------------------------------------- /backend/alembic/versions/baf71f781b9e_add_llm_model_version_override_to_.py: -------------------------------------------------------------------------------- 1 | """Add llm_model_version_override to Persona 2 | 3 | Revision ID: baf71f781b9e 4 | Revises: 50b683a8295c 5 | Create Date: 2023-12-06 21:56:50.286158 6 | 7 | """ 8 | 9 | from alembic import op 10 | import sqlalchemy as sa 11 | 12 | # revision identifiers, used by Alembic. 13 | revision = "baf71f781b9e" 14 | down_revision = "50b683a8295c" 15 | branch_labels: None = None 16 | depends_on: None = None 17 | 18 | 19 | def upgrade() -> None: 20 | op.add_column( 21 | "persona", 22 | sa.Column("llm_model_version_override", sa.String(), nullable=True), 23 | ) 24 | 25 | 26 | def downgrade() -> None: 27 | op.drop_column("persona", "llm_model_version_override") 28 | -------------------------------------------------------------------------------- /backend/alembic/versions/bceb1e139447_add_base_url_to_cloudembeddingprovider.py: -------------------------------------------------------------------------------- 1 | """Add base_url to CloudEmbeddingProvider 2 | 3 | Revision ID: bceb1e139447 4 | Revises: a3795dce87be 5 | Create Date: 2024-08-28 17:00:52.554580 6 | 7 | """ 8 | 9 | from alembic import op 10 | import sqlalchemy as sa 11 | 12 | 13 | # revision identifiers, used by Alembic. 14 | revision = "bceb1e139447" 15 | down_revision = "a3795dce87be" 16 | branch_labels: None = None 17 | depends_on: None = None 18 | 19 | 20 | def upgrade() -> None: 21 | op.add_column( 22 | "embedding_provider", sa.Column("api_url", sa.String(), nullable=True) 23 | ) 24 | 25 | 26 | def downgrade() -> None: 27 | op.drop_column("embedding_provider", "api_url") 28 | -------------------------------------------------------------------------------- /backend/alembic/versions/cf90764725d8_larger_refresh_tokens.py: -------------------------------------------------------------------------------- 1 | """larger refresh tokens 2 | 3 | Revision ID: cf90764725d8 4 | Revises: 4794bc13e484 5 | Create Date: 2025-04-04 10:56:39.769294 6 | 7 | """ 8 | 9 | from alembic import op 10 | import sqlalchemy as sa 11 | 12 | 13 | # revision identifiers, used by Alembic. 14 | revision = "cf90764725d8" 15 | down_revision = "4794bc13e484" 16 | branch_labels = None 17 | depends_on = None 18 | 19 | 20 | def upgrade() -> None: 21 | op.alter_column("oauth_account", "refresh_token", type_=sa.Text()) 22 | 23 | 24 | def downgrade() -> None: 25 | op.alter_column("oauth_account", "refresh_token", type_=sa.String(length=1024)) 26 | -------------------------------------------------------------------------------- /backend/alembic/versions/e209dc5a8156_added_prune_frequency.py: -------------------------------------------------------------------------------- 1 | """added-prune-frequency 2 | 3 | Revision ID: e209dc5a8156 4 | Revises: 48d14957fe80 5 | Create Date: 2024-06-16 16:02:35.273231 6 | 7 | """ 8 | 9 | from alembic import op 10 | import sqlalchemy as sa 11 | 12 | revision = "e209dc5a8156" 13 | down_revision = "48d14957fe80" 14 | branch_labels = None # type: ignore 15 | depends_on = None # type: ignore 16 | 17 | 18 | def upgrade() -> None: 19 | op.add_column("connector", sa.Column("prune_freq", sa.Integer(), nullable=True)) 20 | 21 | 22 | def downgrade() -> None: 23 | op.drop_column("connector", "prune_freq") 24 | -------------------------------------------------------------------------------- /backend/alembic/versions/e4334d5b33ba_add_deployment_name_to_llmprovider.py: -------------------------------------------------------------------------------- 1 | """add_deployment_name_to_llmprovider 2 | 3 | Revision ID: e4334d5b33ba 4 | Revises: ac5eaac849f9 5 | Create Date: 2024-10-04 09:52:34.896867 6 | 7 | """ 8 | 9 | from alembic import op 10 | import sqlalchemy as sa 11 | 12 | 13 | # revision identifiers, used by Alembic. 14 | revision = "e4334d5b33ba" 15 | down_revision = "ac5eaac849f9" 16 | branch_labels = None 17 | depends_on = None 18 | 19 | 20 | def upgrade() -> None: 21 | op.add_column( 22 | "llm_provider", sa.Column("deployment_name", sa.String(), nullable=True) 23 | ) 24 | 25 | 26 | def downgrade() -> None: 27 | op.drop_column("llm_provider", "deployment_name") 28 | -------------------------------------------------------------------------------- /backend/alembic/versions/ee3f4b47fad5_added_alternate_model_to_chat_message.py: -------------------------------------------------------------------------------- 1 | """Added alternate model to chat message 2 | 3 | Revision ID: ee3f4b47fad5 4 | Revises: 2d2304e27d8c 5 | Create Date: 2024-08-12 00:11:50.915845 6 | 7 | """ 8 | 9 | from alembic import op 10 | import sqlalchemy as sa 11 | 12 | 13 | # revision identifiers, used by Alembic. 14 | revision = "ee3f4b47fad5" 15 | down_revision = "2d2304e27d8c" 16 | branch_labels: None = None 17 | depends_on: None = None 18 | 19 | 20 | def upgrade() -> None: 21 | op.add_column( 22 | "chat_message", 23 | sa.Column("overridden_model", sa.String(length=255), nullable=True), 24 | ) 25 | 26 | 27 | def downgrade() -> None: 28 | op.drop_column("chat_message", "overridden_model") 29 | -------------------------------------------------------------------------------- /backend/alembic/versions/ef7da92f7213_add_files_to_chatmessage.py: -------------------------------------------------------------------------------- 1 | """Add files to ChatMessage 2 | 3 | Revision ID: ef7da92f7213 4 | Revises: 401c1ac29467 5 | Create Date: 2024-04-28 16:59:33.199153 6 | 7 | """ 8 | 9 | from alembic import op 10 | import sqlalchemy as sa 11 | from sqlalchemy.dialects import postgresql 12 | 13 | # revision identifiers, used by Alembic. 14 | revision = "ef7da92f7213" 15 | down_revision = "401c1ac29467" 16 | branch_labels: None = None 17 | depends_on: None = None 18 | 19 | 20 | def upgrade() -> None: 21 | op.add_column( 22 | "chat_message", 23 | sa.Column("files", postgresql.JSONB(astext_type=sa.Text()), nullable=True), 24 | ) 25 | 26 | 27 | def downgrade() -> None: 28 | op.drop_column("chat_message", "files") 29 | -------------------------------------------------------------------------------- /backend/alembic/versions/f1c6478c3fd8_add_pre_defined_feedback.py: -------------------------------------------------------------------------------- 1 | """Add pre-defined feedback 2 | 3 | Revision ID: f1c6478c3fd8 4 | Revises: 643a84a42a33 5 | Create Date: 2024-05-09 18:11:49.210667 6 | 7 | """ 8 | 9 | from alembic import op 10 | import sqlalchemy as sa 11 | 12 | revision = "f1c6478c3fd8" 13 | down_revision = "643a84a42a33" 14 | branch_labels: None = None 15 | depends_on: None = None 16 | 17 | 18 | def upgrade() -> None: 19 | op.add_column( 20 | "chat_feedback", 21 | sa.Column("predefined_feedback", sa.String(), nullable=True), 22 | ) 23 | 24 | 25 | def downgrade() -> None: 26 | op.drop_column("chat_feedback", "predefined_feedback") 27 | -------------------------------------------------------------------------------- /backend/alembic/versions/f32615f71aeb_add_custom_headers_to_tools.py: -------------------------------------------------------------------------------- 1 | """add custom headers to tools 2 | 3 | Revision ID: f32615f71aeb 4 | Revises: bd2921608c3a 5 | Create Date: 2024-09-12 20:26:38.932377 6 | 7 | """ 8 | 9 | from alembic import op 10 | import sqlalchemy as sa 11 | from sqlalchemy.dialects import postgresql 12 | 13 | # revision identifiers, used by Alembic. 14 | revision = "f32615f71aeb" 15 | down_revision = "bd2921608c3a" 16 | branch_labels = None 17 | depends_on = None 18 | 19 | 20 | def upgrade() -> None: 21 | op.add_column( 22 | "tool", sa.Column("custom_headers", postgresql.JSONB(), nullable=True) 23 | ) 24 | 25 | 26 | def downgrade() -> None: 27 | op.drop_column("tool", "custom_headers") 28 | -------------------------------------------------------------------------------- /backend/alembic/versions/f7e58d357687_add_has_web_column_to_user.py: -------------------------------------------------------------------------------- 1 | """add has_web_login column to user 2 | 3 | Revision ID: f7e58d357687 4 | Revises: ba98eba0f66a 5 | Create Date: 2024-09-07 20:20:54.522620 6 | 7 | """ 8 | 9 | from alembic import op 10 | import sqlalchemy as sa 11 | 12 | # revision identifiers, used by Alembic. 13 | revision = "f7e58d357687" 14 | down_revision = "ba98eba0f66a" 15 | branch_labels: None = None 16 | depends_on: None = None 17 | 18 | 19 | def upgrade() -> None: 20 | op.add_column( 21 | "user", 22 | sa.Column("has_web_login", sa.Boolean(), nullable=False, server_default="true"), 23 | ) 24 | 25 | 26 | def downgrade() -> None: 27 | op.drop_column("user", "has_web_login") 28 | -------------------------------------------------------------------------------- /backend/alembic_tenants/README.md: -------------------------------------------------------------------------------- 1 | These files are for public table migrations when operating with multi tenancy. 2 | 3 | If you are not a Onyx developer, you can ignore this directory entirely. 4 | -------------------------------------------------------------------------------- /backend/alembic_tenants/script.py.mako: -------------------------------------------------------------------------------- 1 | """${message} 2 | 3 | Revision ID: ${up_revision} 4 | Revises: ${down_revision | comma,n} 5 | Create Date: ${create_date} 6 | 7 | """ 8 | from alembic import op 9 | import sqlalchemy as sa 10 | ${imports if imports else ""} 11 | 12 | # revision identifiers, used by Alembic. 13 | revision = ${repr(up_revision)} 14 | down_revision = ${repr(down_revision)} 15 | branch_labels = ${repr(branch_labels)} 16 | depends_on = ${repr(depends_on)} 17 | 18 | 19 | def upgrade() -> None: 20 | ${upgrades if upgrades else "pass"} 21 | 22 | 23 | def downgrade() -> None: 24 | ${downgrades if downgrades else "pass"} 25 | -------------------------------------------------------------------------------- /backend/assets/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore 3 | -------------------------------------------------------------------------------- /backend/ee/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/onyx-dot-app/onyx/4c71a5f5ff013ed87bf3422b2b8a87b46f024a0a/backend/ee/__init__.py -------------------------------------------------------------------------------- /backend/ee/onyx/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/onyx-dot-app/onyx/4c71a5f5ff013ed87bf3422b2b8a87b46f024a0a/backend/ee/onyx/__init__.py -------------------------------------------------------------------------------- /backend/ee/onyx/auth/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/onyx-dot-app/onyx/4c71a5f5ff013ed87bf3422b2b8a87b46f024a0a/backend/ee/onyx/auth/__init__.py -------------------------------------------------------------------------------- /backend/ee/onyx/background/celery/apps/light.py: -------------------------------------------------------------------------------- 1 | from onyx.background.celery.apps.light import celery_app 2 | 3 | celery_app.autodiscover_tasks( 4 | [ 5 | "ee.onyx.background.celery.tasks.doc_permission_syncing", 6 | "ee.onyx.background.celery.tasks.external_group_syncing", 7 | ] 8 | ) 9 | -------------------------------------------------------------------------------- /backend/ee/onyx/background/celery/apps/monitoring.py: -------------------------------------------------------------------------------- 1 | from onyx.background.celery.apps.monitoring import celery_app 2 | 3 | celery_app.autodiscover_tasks( 4 | [ 5 | "ee.onyx.background.celery.tasks.tenant_provisioning", 6 | ] 7 | ) 8 | -------------------------------------------------------------------------------- /backend/ee/onyx/background/task_name_builders.py: -------------------------------------------------------------------------------- 1 | from datetime import datetime 2 | 3 | from onyx.configs.constants import OnyxCeleryTask 4 | 5 | 6 | QUERY_HISTORY_TASK_NAME_PREFIX = OnyxCeleryTask.EXPORT_QUERY_HISTORY_TASK 7 | 8 | 9 | def name_chat_ttl_task( 10 | retention_limit_days: float, tenant_id: str | None = None 11 | ) -> str: 12 | return f"chat_ttl_{retention_limit_days}_days" 13 | 14 | 15 | def query_history_task_name(start: datetime, end: datetime) -> str: 16 | return f"{QUERY_HISTORY_TASK_NAME_PREFIX}_{start}_{end}" 17 | -------------------------------------------------------------------------------- /backend/ee/onyx/configs/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/onyx-dot-app/onyx/4c71a5f5ff013ed87bf3422b2b8a87b46f024a0a/backend/ee/onyx/configs/__init__.py -------------------------------------------------------------------------------- /backend/ee/onyx/configs/saml_config/template.settings.json: -------------------------------------------------------------------------------- 1 | { 2 | "strict": true, 3 | "debug": false, 4 | "idp": { 5 | "entityId": "", 6 | "singleSignOnService": { 7 | "url": " https://trial-1234567.okta.com/home/trial-1234567_onyx/somevalues/somevalues", 8 | "binding": "urn:oasis:names:tc:SAML:2.0:bindings:HTTP-Redirect" 9 | }, 10 | "x509cert": "" 11 | }, 12 | "sp": { 13 | "entityId": "", 14 | "assertionConsumerService": { 15 | "url": "http://127.0.0.1:3000/auth/saml/callback", 16 | "binding": "urn:oasis:names:tc:SAML:2.0:bindings:HTTP-POST" 17 | }, 18 | "x509cert": "" 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /backend/ee/onyx/db/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/onyx-dot-app/onyx/4c71a5f5ff013ed87bf3422b2b8a87b46f024a0a/backend/ee/onyx/db/__init__.py -------------------------------------------------------------------------------- /backend/ee/onyx/db/connector.py: -------------------------------------------------------------------------------- 1 | from sqlalchemy import distinct 2 | from sqlalchemy.orm import Session 3 | 4 | from onyx.configs.constants import DocumentSource 5 | from onyx.db.models import Connector 6 | from onyx.utils.logger import setup_logger 7 | 8 | logger = setup_logger() 9 | 10 | 11 | def fetch_sources_with_connectors(db_session: Session) -> list[DocumentSource]: 12 | sources = db_session.query(distinct(Connector.source)).all() # type: ignore 13 | 14 | document_sources = [source[0] for source in sources] 15 | 16 | return document_sources 17 | -------------------------------------------------------------------------------- /backend/ee/onyx/external_permissions/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/onyx-dot-app/onyx/4c71a5f5ff013ed87bf3422b2b8a87b46f024a0a/backend/ee/onyx/external_permissions/__init__.py -------------------------------------------------------------------------------- /backend/ee/onyx/external_permissions/confluence/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/onyx-dot-app/onyx/4c71a5f5ff013ed87bf3422b2b8a87b46f024a0a/backend/ee/onyx/external_permissions/confluence/__init__.py -------------------------------------------------------------------------------- /backend/ee/onyx/external_permissions/confluence/constants.py: -------------------------------------------------------------------------------- 1 | # This is a group that we use to store all the users that we found in Confluence 2 | # Instead of setting a page to public, we just add this group so that the page 3 | # is only accessible to users who have confluence accounts. 4 | ALL_CONF_EMAILS_GROUP_NAME = "All_Confluence_Users_Found_By_Onyx" 5 | -------------------------------------------------------------------------------- /backend/ee/onyx/external_permissions/google_drive/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/onyx-dot-app/onyx/4c71a5f5ff013ed87bf3422b2b8a87b46f024a0a/backend/ee/onyx/external_permissions/google_drive/__init__.py -------------------------------------------------------------------------------- /backend/ee/onyx/external_permissions/slack/utils.py: -------------------------------------------------------------------------------- 1 | from slack_sdk import WebClient 2 | 3 | from onyx.connectors.slack.utils import make_paginated_slack_api_call 4 | 5 | 6 | def fetch_user_id_to_email_map( 7 | slack_client: WebClient, 8 | ) -> dict[str, str]: 9 | user_id_to_email_map = {} 10 | for user_info in make_paginated_slack_api_call( 11 | slack_client.users_list, 12 | ): 13 | for user in user_info.get("members", []): 14 | if user.get("profile", {}).get("email"): 15 | user_id_to_email_map[user.get("id")] = user.get("profile", {}).get( 16 | "email" 17 | ) 18 | return user_id_to_email_map 19 | -------------------------------------------------------------------------------- /backend/ee/onyx/onyxbot/slack/handlers/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/onyx-dot-app/onyx/4c71a5f5ff013ed87bf3422b2b8a87b46f024a0a/backend/ee/onyx/onyxbot/slack/handlers/__init__.py -------------------------------------------------------------------------------- /backend/ee/onyx/server/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/onyx-dot-app/onyx/4c71a5f5ff013ed87bf3422b2b8a87b46f024a0a/backend/ee/onyx/server/__init__.py -------------------------------------------------------------------------------- /backend/ee/onyx/server/oauth/api_router.py: -------------------------------------------------------------------------------- 1 | from fastapi import APIRouter 2 | 3 | router: APIRouter = APIRouter(prefix="/oauth") 4 | -------------------------------------------------------------------------------- /backend/ee/onyx/server/query_and_chat/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/onyx-dot-app/onyx/4c71a5f5ff013ed87bf3422b2b8a87b46f024a0a/backend/ee/onyx/server/query_and_chat/__init__.py -------------------------------------------------------------------------------- /backend/ee/onyx/server/tenants/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/onyx-dot-app/onyx/4c71a5f5ff013ed87bf3422b2b8a87b46f024a0a/backend/ee/onyx/server/tenants/__init__.py -------------------------------------------------------------------------------- /backend/ee/onyx/utils/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/onyx-dot-app/onyx/4c71a5f5ff013ed87bf3422b2b8a87b46f024a0a/backend/ee/onyx/utils/__init__.py -------------------------------------------------------------------------------- /backend/ee/onyx/utils/secrets.py: -------------------------------------------------------------------------------- 1 | import hashlib 2 | 3 | from fastapi import Request 4 | 5 | from onyx.configs.constants import SESSION_KEY 6 | 7 | 8 | def encrypt_string(s: str) -> str: 9 | return hashlib.sha256(s.encode()).hexdigest() 10 | 11 | 12 | def extract_hashed_cookie(request: Request) -> str | None: 13 | session_cookie = request.cookies.get(SESSION_KEY) 14 | return encrypt_string(session_cookie) if session_cookie else None 15 | -------------------------------------------------------------------------------- /backend/generated/README.md: -------------------------------------------------------------------------------- 1 | - Generated Files 2 | * Generated files live here. This directory should be git ignored. -------------------------------------------------------------------------------- /backend/hello-vmlinux.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/onyx-dot-app/onyx/4c71a5f5ff013ed87bf3422b2b8a87b46f024a0a/backend/hello-vmlinux.bin -------------------------------------------------------------------------------- /backend/model_server/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/onyx-dot-app/onyx/4c71a5f5ff013ed87bf3422b2b8a87b46f024a0a/backend/model_server/__init__.py -------------------------------------------------------------------------------- /backend/model_server/management_endpoints.py: -------------------------------------------------------------------------------- 1 | from fastapi import APIRouter 2 | from fastapi import Response 3 | 4 | from model_server.constants import GPUStatus 5 | from model_server.utils import get_gpu_type 6 | 7 | router = APIRouter(prefix="/api") 8 | 9 | 10 | @router.get("/health") 11 | async def healthcheck() -> Response: 12 | return Response(status_code=200) 13 | 14 | 15 | @router.get("/gpu-status") 16 | async def route_gpu_status() -> dict[str, bool | str]: 17 | gpu_type = get_gpu_type() 18 | gpu_available = gpu_type != GPUStatus.NONE 19 | return {"gpu_available": gpu_available, "type": gpu_type} 20 | -------------------------------------------------------------------------------- /backend/onyx/__init__.py: -------------------------------------------------------------------------------- 1 | import os 2 | 3 | __version__ = os.environ.get("ONYX_VERSION", "") or "Development" 4 | -------------------------------------------------------------------------------- /backend/onyx/access/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/onyx-dot-app/onyx/4c71a5f5ff013ed87bf3422b2b8a87b46f024a0a/backend/onyx/access/__init__.py -------------------------------------------------------------------------------- /backend/onyx/agents/agent_search/core_state.py: -------------------------------------------------------------------------------- 1 | from operator import add 2 | from typing import Annotated 3 | 4 | from pydantic import BaseModel 5 | 6 | 7 | class CoreState(BaseModel): 8 | """ 9 | This is the core state that is shared across all subgraphs. 10 | """ 11 | 12 | log_messages: Annotated[list[str], add] = [] 13 | 14 | 15 | class SubgraphCoreState(BaseModel): 16 | """ 17 | This is the core state that is shared across all subgraphs. 18 | """ 19 | 20 | log_messages: Annotated[list[str], add] = [] 21 | -------------------------------------------------------------------------------- /backend/onyx/agents/agent_search/deep_search/shared/expanded_retrieval/models.py: -------------------------------------------------------------------------------- 1 | from pydantic import BaseModel 2 | 3 | from onyx.agents.agent_search.shared_graph_utils.models import AgentChunkRetrievalStats 4 | from onyx.agents.agent_search.shared_graph_utils.models import QueryRetrievalResult 5 | from onyx.context.search.models import InferenceSection 6 | 7 | 8 | class QuestionRetrievalResult(BaseModel): 9 | expanded_query_results: list[QueryRetrievalResult] = [] 10 | retrieved_documents: list[InferenceSection] = [] 11 | verified_reranked_documents: list[InferenceSection] = [] 12 | context_documents: list[InferenceSection] = [] 13 | retrieval_stats: AgentChunkRetrievalStats = AgentChunkRetrievalStats() 14 | -------------------------------------------------------------------------------- /backend/onyx/agents/agent_search/deep_search/shared/expanded_retrieval/nodes/format_queries.py: -------------------------------------------------------------------------------- 1 | from langchain_core.runnables.config import RunnableConfig 2 | 3 | from onyx.agents.agent_search.deep_search.shared.expanded_retrieval.states import ( 4 | ExpandedRetrievalState, 5 | ) 6 | from onyx.agents.agent_search.deep_search.shared.expanded_retrieval.states import ( 7 | QueryExpansionUpdate, 8 | ) 9 | 10 | 11 | def format_queries( 12 | state: ExpandedRetrievalState, config: RunnableConfig 13 | ) -> QueryExpansionUpdate: 14 | """ 15 | LangGraph node to format the expanded queries into a list of strings. 16 | """ 17 | return QueryExpansionUpdate( 18 | expanded_queries=state.expanded_queries, 19 | ) 20 | -------------------------------------------------------------------------------- /backend/onyx/auth/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/onyx-dot-app/onyx/4c71a5f5ff013ed87bf3422b2b8a87b46f024a0a/backend/onyx/auth/__init__.py -------------------------------------------------------------------------------- /backend/onyx/background/celery/apps/client.py: -------------------------------------------------------------------------------- 1 | from celery import Celery 2 | 3 | import onyx.background.celery.apps.app_base as app_base 4 | 5 | celery_app = Celery(__name__) 6 | celery_app.config_from_object("onyx.background.celery.configs.client") 7 | celery_app.Task = app_base.TenantAwareTask # type: ignore [misc] 8 | -------------------------------------------------------------------------------- /backend/onyx/background/celery/tasks/periodic/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/onyx-dot-app/onyx/4c71a5f5ff013ed87bf3422b2b8a87b46f024a0a/backend/onyx/background/celery/tasks/periodic/__init__.py -------------------------------------------------------------------------------- /backend/onyx/background/celery/versioned_apps/beat.py: -------------------------------------------------------------------------------- 1 | """Factory stub for running celery worker / celery beat.""" 2 | 3 | from celery import Celery 4 | 5 | from onyx.background.celery.apps.beat import celery_app 6 | from onyx.utils.variable_functionality import set_is_ee_based_on_env_variable 7 | 8 | set_is_ee_based_on_env_variable() 9 | app: Celery = celery_app 10 | -------------------------------------------------------------------------------- /backend/onyx/background/celery/versioned_apps/client.py: -------------------------------------------------------------------------------- 1 | """Factory stub for running celery worker / celery beat. 2 | This code is different from the primary/beat stubs because there is no EE version to 3 | fetch. Port over the code in those files if we add an EE version of this worker. 4 | 5 | This is an app stub purely for sending tasks as a client. 6 | """ 7 | 8 | from celery import Celery 9 | 10 | from onyx.utils.variable_functionality import set_is_ee_based_on_env_variable 11 | 12 | set_is_ee_based_on_env_variable() 13 | 14 | 15 | def get_app() -> Celery: 16 | from onyx.background.celery.apps.client import celery_app 17 | 18 | return celery_app 19 | 20 | 21 | app = get_app() 22 | -------------------------------------------------------------------------------- /backend/onyx/background/celery/versioned_apps/heavy.py: -------------------------------------------------------------------------------- 1 | """Factory stub for running celery worker / celery beat. 2 | This code is different from the primary/beat stubs because there is no EE version to 3 | fetch. Port over the code in those files if we add an EE version of this worker.""" 4 | 5 | from celery import Celery 6 | 7 | from onyx.utils.variable_functionality import fetch_versioned_implementation 8 | from onyx.utils.variable_functionality import set_is_ee_based_on_env_variable 9 | 10 | set_is_ee_based_on_env_variable() 11 | app: Celery = fetch_versioned_implementation( 12 | "onyx.background.celery.apps.heavy", 13 | "celery_app", 14 | ) 15 | -------------------------------------------------------------------------------- /backend/onyx/background/celery/versioned_apps/indexing.py: -------------------------------------------------------------------------------- 1 | """Factory stub for running celery worker / celery beat. 2 | This code is different from the primary/beat stubs because there is no EE version to 3 | fetch. Port over the code in those files if we add an EE version of this worker.""" 4 | 5 | from celery import Celery 6 | 7 | from onyx.utils.variable_functionality import set_is_ee_based_on_env_variable 8 | 9 | set_is_ee_based_on_env_variable() 10 | 11 | 12 | def get_app() -> Celery: 13 | from onyx.background.celery.apps.indexing import celery_app 14 | 15 | return celery_app 16 | 17 | 18 | app = get_app() 19 | -------------------------------------------------------------------------------- /backend/onyx/background/celery/versioned_apps/light.py: -------------------------------------------------------------------------------- 1 | """Factory stub for running celery worker / celery beat. 2 | This code is different from the primary/beat stubs because there is no EE version to 3 | fetch. Port over the code in those files if we add an EE version of this worker.""" 4 | 5 | from celery import Celery 6 | 7 | from onyx.utils.variable_functionality import fetch_versioned_implementation 8 | from onyx.utils.variable_functionality import set_is_ee_based_on_env_variable 9 | 10 | set_is_ee_based_on_env_variable() 11 | app: Celery = fetch_versioned_implementation( 12 | "onyx.background.celery.apps.light", 13 | "celery_app", 14 | ) 15 | -------------------------------------------------------------------------------- /backend/onyx/background/celery/versioned_apps/monitoring.py: -------------------------------------------------------------------------------- 1 | """Factory stub for running celery worker / celery beat.""" 2 | 3 | from celery import Celery 4 | 5 | from onyx.utils.variable_functionality import fetch_versioned_implementation 6 | from onyx.utils.variable_functionality import set_is_ee_based_on_env_variable 7 | 8 | set_is_ee_based_on_env_variable() 9 | app: Celery = fetch_versioned_implementation( 10 | "onyx.background.celery.apps.monitoring", 11 | "celery_app", 12 | ) 13 | -------------------------------------------------------------------------------- /backend/onyx/background/celery/versioned_apps/primary.py: -------------------------------------------------------------------------------- 1 | """Factory stub for running celery worker / celery beat.""" 2 | 3 | from celery import Celery 4 | 5 | from onyx.utils.variable_functionality import fetch_versioned_implementation 6 | from onyx.utils.variable_functionality import set_is_ee_based_on_env_variable 7 | 8 | set_is_ee_based_on_env_variable() 9 | app: Celery = fetch_versioned_implementation( 10 | "onyx.background.celery.apps.primary", 11 | "celery_app", 12 | ) 13 | -------------------------------------------------------------------------------- /backend/onyx/background/task_utils.py: -------------------------------------------------------------------------------- 1 | QUERY_REPORT_NAME_PREFIX = "query-history" 2 | 3 | 4 | def construct_query_history_report_name( 5 | task_id: str, 6 | ) -> str: 7 | return f"{QUERY_REPORT_NAME_PREFIX}-{task_id}.csv" 8 | 9 | 10 | def extract_task_id_from_query_history_report_name(name: str) -> str: 11 | return name.removeprefix(f"{QUERY_REPORT_NAME_PREFIX}-").removesuffix(".csv") 12 | -------------------------------------------------------------------------------- /backend/onyx/chat/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/onyx-dot-app/onyx/4c71a5f5ff013ed87bf3422b2b8a87b46f024a0a/backend/onyx/chat/__init__.py -------------------------------------------------------------------------------- /backend/onyx/chat/stream_processing/utils.py: -------------------------------------------------------------------------------- 1 | from collections.abc import Sequence 2 | 3 | from pydantic import BaseModel 4 | 5 | from onyx.chat.models import LlmDoc 6 | from onyx.context.search.models import InferenceChunk 7 | 8 | 9 | class DocumentIdOrderMapping(BaseModel): 10 | order_mapping: dict[str, int] 11 | 12 | 13 | def map_document_id_order( 14 | chunks: Sequence[InferenceChunk | LlmDoc], one_indexed: bool = True 15 | ) -> DocumentIdOrderMapping: 16 | order_mapping = {} 17 | current = 1 if one_indexed else 0 18 | for chunk in chunks: 19 | if chunk.document_id not in order_mapping: 20 | order_mapping[chunk.document_id] = current 21 | current += 1 22 | 23 | return DocumentIdOrderMapping(order_mapping=order_mapping) 24 | -------------------------------------------------------------------------------- /backend/onyx/configs/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/onyx-dot-app/onyx/4c71a5f5ff013ed87bf3422b2b8a87b46f024a0a/backend/onyx/configs/__init__.py -------------------------------------------------------------------------------- /backend/onyx/connectors/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/onyx-dot-app/onyx/4c71a5f5ff013ed87bf3422b2b8a87b46f024a0a/backend/onyx/connectors/__init__.py -------------------------------------------------------------------------------- /backend/onyx/connectors/asana/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/onyx-dot-app/onyx/4c71a5f5ff013ed87bf3422b2b8a87b46f024a0a/backend/onyx/connectors/asana/__init__.py -------------------------------------------------------------------------------- /backend/onyx/connectors/axero/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/onyx-dot-app/onyx/4c71a5f5ff013ed87bf3422b2b8a87b46f024a0a/backend/onyx/connectors/axero/__init__.py -------------------------------------------------------------------------------- /backend/onyx/connectors/blob/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/onyx-dot-app/onyx/4c71a5f5ff013ed87bf3422b2b8a87b46f024a0a/backend/onyx/connectors/blob/__init__.py -------------------------------------------------------------------------------- /backend/onyx/connectors/bookstack/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/onyx-dot-app/onyx/4c71a5f5ff013ed87bf3422b2b8a87b46f024a0a/backend/onyx/connectors/bookstack/__init__.py -------------------------------------------------------------------------------- /backend/onyx/connectors/clickup/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/onyx-dot-app/onyx/4c71a5f5ff013ed87bf3422b2b8a87b46f024a0a/backend/onyx/connectors/clickup/__init__.py -------------------------------------------------------------------------------- /backend/onyx/connectors/confluence/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/onyx-dot-app/onyx/4c71a5f5ff013ed87bf3422b2b8a87b46f024a0a/backend/onyx/connectors/confluence/__init__.py -------------------------------------------------------------------------------- /backend/onyx/connectors/confluence/models.py: -------------------------------------------------------------------------------- 1 | from pydantic import BaseModel 2 | 3 | 4 | class ConfluenceUser(BaseModel): 5 | user_id: str # accountId in Cloud, userKey in Server 6 | username: str | None # Confluence Cloud doesn't give usernames 7 | display_name: str 8 | # Confluence Data Center doesn't give email back by default, 9 | # have to fetch it with a different endpoint 10 | email: str | None 11 | type: str 12 | -------------------------------------------------------------------------------- /backend/onyx/connectors/confluence/user_profile_override.py: -------------------------------------------------------------------------------- 1 | from onyx.connectors.confluence.models import ConfluenceUser 2 | 3 | 4 | def process_confluence_user_profiles_override( 5 | confluence_user_email_override: list[dict[str, str]], 6 | ) -> list[ConfluenceUser]: 7 | return [ 8 | ConfluenceUser( 9 | user_id=override["user_id"], 10 | # username is not returned by the Confluence Server API anyways 11 | username=override["username"], 12 | display_name=override["display_name"], 13 | email=override["email"], 14 | type=override["type"], 15 | ) 16 | for override in confluence_user_email_override 17 | if override is not None 18 | ] 19 | -------------------------------------------------------------------------------- /backend/onyx/connectors/cross_connector_utils/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/onyx-dot-app/onyx/4c71a5f5ff013ed87bf3422b2b8a87b46f024a0a/backend/onyx/connectors/cross_connector_utils/__init__.py -------------------------------------------------------------------------------- /backend/onyx/connectors/discord/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/onyx-dot-app/onyx/4c71a5f5ff013ed87bf3422b2b8a87b46f024a0a/backend/onyx/connectors/discord/__init__.py -------------------------------------------------------------------------------- /backend/onyx/connectors/discourse/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/onyx-dot-app/onyx/4c71a5f5ff013ed87bf3422b2b8a87b46f024a0a/backend/onyx/connectors/discourse/__init__.py -------------------------------------------------------------------------------- /backend/onyx/connectors/document360/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/onyx-dot-app/onyx/4c71a5f5ff013ed87bf3422b2b8a87b46f024a0a/backend/onyx/connectors/document360/__init__.py -------------------------------------------------------------------------------- /backend/onyx/connectors/document360/utils.py: -------------------------------------------------------------------------------- 1 | def flatten_child_categories(category: dict) -> list[dict]: 2 | if not category["child_categories"]: 3 | return [category] 4 | else: 5 | flattened_categories = [category] 6 | for child_category in category["child_categories"]: 7 | flattened_categories.extend(flatten_child_categories(child_category)) 8 | return flattened_categories 9 | -------------------------------------------------------------------------------- /backend/onyx/connectors/dropbox/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/onyx-dot-app/onyx/4c71a5f5ff013ed87bf3422b2b8a87b46f024a0a/backend/onyx/connectors/dropbox/__init__.py -------------------------------------------------------------------------------- /backend/onyx/connectors/file/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/onyx-dot-app/onyx/4c71a5f5ff013ed87bf3422b2b8a87b46f024a0a/backend/onyx/connectors/file/__init__.py -------------------------------------------------------------------------------- /backend/onyx/connectors/fireflies/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/onyx-dot-app/onyx/4c71a5f5ff013ed87bf3422b2b8a87b46f024a0a/backend/onyx/connectors/fireflies/__init__.py -------------------------------------------------------------------------------- /backend/onyx/connectors/freshdesk/__init__,py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/onyx-dot-app/onyx/4c71a5f5ff013ed87bf3422b2b8a87b46f024a0a/backend/onyx/connectors/freshdesk/__init__,py -------------------------------------------------------------------------------- /backend/onyx/connectors/gitbook/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/onyx-dot-app/onyx/4c71a5f5ff013ed87bf3422b2b8a87b46f024a0a/backend/onyx/connectors/gitbook/__init__.py -------------------------------------------------------------------------------- /backend/onyx/connectors/github/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/onyx-dot-app/onyx/4c71a5f5ff013ed87bf3422b2b8a87b46f024a0a/backend/onyx/connectors/github/__init__.py -------------------------------------------------------------------------------- /backend/onyx/connectors/gitlab/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/onyx-dot-app/onyx/4c71a5f5ff013ed87bf3422b2b8a87b46f024a0a/backend/onyx/connectors/gitlab/__init__.py -------------------------------------------------------------------------------- /backend/onyx/connectors/gmail/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/onyx-dot-app/onyx/4c71a5f5ff013ed87bf3422b2b8a87b46f024a0a/backend/onyx/connectors/gmail/__init__.py -------------------------------------------------------------------------------- /backend/onyx/connectors/gong/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/onyx-dot-app/onyx/4c71a5f5ff013ed87bf3422b2b8a87b46f024a0a/backend/onyx/connectors/gong/__init__.py -------------------------------------------------------------------------------- /backend/onyx/connectors/google_drive/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/onyx-dot-app/onyx/4c71a5f5ff013ed87bf3422b2b8a87b46f024a0a/backend/onyx/connectors/google_drive/__init__.py -------------------------------------------------------------------------------- /backend/onyx/connectors/google_drive/constants.py: -------------------------------------------------------------------------------- 1 | UNSUPPORTED_FILE_TYPE_CONTENT = "" # keep empty for now 2 | DRIVE_FOLDER_TYPE = "application/vnd.google-apps.folder" 3 | DRIVE_SHORTCUT_TYPE = "application/vnd.google-apps.shortcut" 4 | DRIVE_FILE_TYPE = "application/vnd.google-apps.file" 5 | -------------------------------------------------------------------------------- /backend/onyx/connectors/google_site/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/onyx-dot-app/onyx/4c71a5f5ff013ed87bf3422b2b8a87b46f024a0a/backend/onyx/connectors/google_site/__init__.py -------------------------------------------------------------------------------- /backend/onyx/connectors/google_utils/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/onyx-dot-app/onyx/4c71a5f5ff013ed87bf3422b2b8a87b46f024a0a/backend/onyx/connectors/google_utils/__init__.py -------------------------------------------------------------------------------- /backend/onyx/connectors/guru/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/onyx-dot-app/onyx/4c71a5f5ff013ed87bf3422b2b8a87b46f024a0a/backend/onyx/connectors/guru/__init__.py -------------------------------------------------------------------------------- /backend/onyx/connectors/highspot/__init__.py: -------------------------------------------------------------------------------- 1 | """ 2 | Highspot connector package for Onyx. 3 | Enables integration with Highspot's knowledge base. 4 | """ 5 | -------------------------------------------------------------------------------- /backend/onyx/connectors/hubspot/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/onyx-dot-app/onyx/4c71a5f5ff013ed87bf3422b2b8a87b46f024a0a/backend/onyx/connectors/hubspot/__init__.py -------------------------------------------------------------------------------- /backend/onyx/connectors/linear/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/onyx-dot-app/onyx/4c71a5f5ff013ed87bf3422b2b8a87b46f024a0a/backend/onyx/connectors/linear/__init__.py -------------------------------------------------------------------------------- /backend/onyx/connectors/loopio/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/onyx-dot-app/onyx/4c71a5f5ff013ed87bf3422b2b8a87b46f024a0a/backend/onyx/connectors/loopio/__init__.py -------------------------------------------------------------------------------- /backend/onyx/connectors/mediawiki/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/onyx-dot-app/onyx/4c71a5f5ff013ed87bf3422b2b8a87b46f024a0a/backend/onyx/connectors/mediawiki/__init__.py -------------------------------------------------------------------------------- /backend/onyx/connectors/notion/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/onyx-dot-app/onyx/4c71a5f5ff013ed87bf3422b2b8a87b46f024a0a/backend/onyx/connectors/notion/__init__.py -------------------------------------------------------------------------------- /backend/onyx/connectors/onyx_jira/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/onyx-dot-app/onyx/4c71a5f5ff013ed87bf3422b2b8a87b46f024a0a/backend/onyx/connectors/onyx_jira/__init__.py -------------------------------------------------------------------------------- /backend/onyx/connectors/productboard/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/onyx-dot-app/onyx/4c71a5f5ff013ed87bf3422b2b8a87b46f024a0a/backend/onyx/connectors/productboard/__init__.py -------------------------------------------------------------------------------- /backend/onyx/connectors/requesttracker/.gitignore: -------------------------------------------------------------------------------- 1 | .env 2 | -------------------------------------------------------------------------------- /backend/onyx/connectors/requesttracker/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/onyx-dot-app/onyx/4c71a5f5ff013ed87bf3422b2b8a87b46f024a0a/backend/onyx/connectors/requesttracker/__init__.py -------------------------------------------------------------------------------- /backend/onyx/connectors/salesforce/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/onyx-dot-app/onyx/4c71a5f5ff013ed87bf3422b2b8a87b46f024a0a/backend/onyx/connectors/salesforce/__init__.py -------------------------------------------------------------------------------- /backend/onyx/connectors/sharepoint/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/onyx-dot-app/onyx/4c71a5f5ff013ed87bf3422b2b8a87b46f024a0a/backend/onyx/connectors/sharepoint/__init__.py -------------------------------------------------------------------------------- /backend/onyx/connectors/slab/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/onyx-dot-app/onyx/4c71a5f5ff013ed87bf3422b2b8a87b46f024a0a/backend/onyx/connectors/slab/__init__.py -------------------------------------------------------------------------------- /backend/onyx/connectors/slack/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/onyx-dot-app/onyx/4c71a5f5ff013ed87bf3422b2b8a87b46f024a0a/backend/onyx/connectors/slack/__init__.py -------------------------------------------------------------------------------- /backend/onyx/connectors/teams/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/onyx-dot-app/onyx/4c71a5f5ff013ed87bf3422b2b8a87b46f024a0a/backend/onyx/connectors/teams/__init__.py -------------------------------------------------------------------------------- /backend/onyx/connectors/web/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/onyx-dot-app/onyx/4c71a5f5ff013ed87bf3422b2b8a87b46f024a0a/backend/onyx/connectors/web/__init__.py -------------------------------------------------------------------------------- /backend/onyx/connectors/wikipedia/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/onyx-dot-app/onyx/4c71a5f5ff013ed87bf3422b2b8a87b46f024a0a/backend/onyx/connectors/wikipedia/__init__.py -------------------------------------------------------------------------------- /backend/onyx/connectors/xenforo/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/onyx-dot-app/onyx/4c71a5f5ff013ed87bf3422b2b8a87b46f024a0a/backend/onyx/connectors/xenforo/__init__.py -------------------------------------------------------------------------------- /backend/onyx/connectors/zendesk/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/onyx-dot-app/onyx/4c71a5f5ff013ed87bf3422b2b8a87b46f024a0a/backend/onyx/connectors/zendesk/__init__.py -------------------------------------------------------------------------------- /backend/onyx/connectors/zulip/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/onyx-dot-app/onyx/4c71a5f5ff013ed87bf3422b2b8a87b46f024a0a/backend/onyx/connectors/zulip/__init__.py -------------------------------------------------------------------------------- /backend/onyx/context/search/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/onyx-dot-app/onyx/4c71a5f5ff013ed87bf3422b2b8a87b46f024a0a/backend/onyx/context/search/__init__.py -------------------------------------------------------------------------------- /backend/onyx/db/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/onyx-dot-app/onyx/4c71a5f5ff013ed87bf3422b2b8a87b46f024a0a/backend/onyx/db/__init__.py -------------------------------------------------------------------------------- /backend/onyx/db/background_error.py: -------------------------------------------------------------------------------- 1 | from sqlalchemy.orm import Session 2 | 3 | from onyx.db.models import BackgroundError 4 | 5 | 6 | def create_background_error( 7 | db_session: Session, message: str, cc_pair_id: int | None 8 | ) -> None: 9 | db_session.add(BackgroundError(message=message, cc_pair_id=cc_pair_id)) 10 | db_session.commit() 11 | -------------------------------------------------------------------------------- /backend/onyx/db/constants.py: -------------------------------------------------------------------------------- 1 | SLACK_BOT_PERSONA_PREFIX = "__slack_bot_persona__" 2 | DEFAULT_PERSONA_SLACK_CHANNEL_NAME = "DEFAULT_SLACK_CHANNEL" 3 | 4 | CONNECTOR_VALIDATION_ERROR_MESSAGE_PREFIX = "ConnectorValidationError:" 5 | -------------------------------------------------------------------------------- /backend/onyx/document_index/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/onyx-dot-app/onyx/4c71a5f5ff013ed87bf3422b2b8a87b46f024a0a/backend/onyx/document_index/__init__.py -------------------------------------------------------------------------------- /backend/onyx/document_index/vespa/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/onyx-dot-app/onyx/4c71a5f5ff013ed87bf3422b2b8a87b46f024a0a/backend/onyx/document_index/vespa/__init__.py -------------------------------------------------------------------------------- /backend/onyx/document_index/vespa/app_config/validation-overrides.xml.jinja: -------------------------------------------------------------------------------- 1 | 2 | schema-removal 5 | indexing-change 8 | field-type-change 11 | 12 | -------------------------------------------------------------------------------- /backend/onyx/file_processing/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/onyx-dot-app/onyx/4c71a5f5ff013ed87bf3422b2b8a87b46f024a0a/backend/onyx/file_processing/__init__.py -------------------------------------------------------------------------------- /backend/onyx/file_processing/enums.py: -------------------------------------------------------------------------------- 1 | from enum import Enum 2 | 3 | 4 | class HtmlBasedConnectorTransformLinksStrategy(str, Enum): 5 | # remove links entirely 6 | STRIP = "strip" 7 | # turn HTML links into markdown links 8 | MARKDOWN = "markdown" 9 | -------------------------------------------------------------------------------- /backend/onyx/file_store/constants.py: -------------------------------------------------------------------------------- 1 | MAX_IN_MEMORY_SIZE = 30 * 1024 * 1024 # 30MB 2 | STANDARD_CHUNK_SIZE = 10 * 1024 * 1024 # 10MB chunks 3 | -------------------------------------------------------------------------------- /backend/onyx/indexing/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/onyx-dot-app/onyx/4c71a5f5ff013ed87bf3422b2b8a87b46f024a0a/backend/onyx/indexing/__init__.py -------------------------------------------------------------------------------- /backend/onyx/indexing/content_classification.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/onyx-dot-app/onyx/4c71a5f5ff013ed87bf3422b2b8a87b46f024a0a/backend/onyx/indexing/content_classification.py -------------------------------------------------------------------------------- /backend/onyx/indexing/indexing_heartbeat.py: -------------------------------------------------------------------------------- 1 | from abc import ABC 2 | from abc import abstractmethod 3 | 4 | 5 | class IndexingHeartbeatInterface(ABC): 6 | """Defines a callback interface to be passed to 7 | to run_indexing_entrypoint.""" 8 | 9 | @abstractmethod 10 | def should_stop(self) -> bool: 11 | """Signal to stop the looping function in flight.""" 12 | 13 | @abstractmethod 14 | def progress(self, tag: str, amount: int) -> None: 15 | """Send progress updates to the caller. 16 | Amount can be a positive number to indicate progress or <= 0 17 | just to act as a keep-alive. 18 | """ 19 | -------------------------------------------------------------------------------- /backend/onyx/key_value_store/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/onyx-dot-app/onyx/4c71a5f5ff013ed87bf3422b2b8a87b46f024a0a/backend/onyx/key_value_store/__init__.py -------------------------------------------------------------------------------- /backend/onyx/key_value_store/interface.py: -------------------------------------------------------------------------------- 1 | import abc 2 | 3 | from onyx.utils.special_types import JSON_ro 4 | 5 | 6 | class KvKeyNotFoundError(Exception): 7 | pass 8 | 9 | 10 | class KeyValueStore: 11 | # In the Multi Tenant case, the tenant context is picked up automatically, it does not need to be passed in 12 | # It's read from the global thread level variable 13 | @abc.abstractmethod 14 | def store(self, key: str, val: JSON_ro, encrypt: bool = False) -> None: 15 | raise NotImplementedError 16 | 17 | @abc.abstractmethod 18 | def load(self, key: str) -> JSON_ro: 19 | raise NotImplementedError 20 | 21 | @abc.abstractmethod 22 | def delete(self, key: str) -> None: 23 | raise NotImplementedError 24 | -------------------------------------------------------------------------------- /backend/onyx/llm/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/onyx-dot-app/onyx/4c71a5f5ff013ed87bf3422b2b8a87b46f024a0a/backend/onyx/llm/__init__.py -------------------------------------------------------------------------------- /backend/onyx/llm/exceptions.py: -------------------------------------------------------------------------------- 1 | class GenAIDisabledException(Exception): 2 | def __init__(self, message: str = "Generative AI has been turned off") -> None: 3 | self.message = message 4 | super().__init__(self.message) 5 | -------------------------------------------------------------------------------- /backend/onyx/llm/override_models.py: -------------------------------------------------------------------------------- 1 | """Overrides sent over the wire / stored in the DB 2 | 3 | NOTE: these models are used in many places, so have to be 4 | kepy in a separate file to avoid circular imports. 5 | """ 6 | 7 | from pydantic import BaseModel 8 | 9 | 10 | class LLMOverride(BaseModel): 11 | model_provider: str | None = None 12 | model_version: str | None = None 13 | temperature: float | None = None 14 | 15 | # This disables the "model_" protected namespace for pydantic 16 | model_config = {"protected_namespaces": ()} 17 | 18 | 19 | class PromptOverride(BaseModel): 20 | system_prompt: str | None = None 21 | task_prompt: str | None = None 22 | -------------------------------------------------------------------------------- /backend/onyx/natural_language_processing/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/onyx-dot-app/onyx/4c71a5f5ff013ed87bf3422b2b8a87b46f024a0a/backend/onyx/natural_language_processing/__init__.py -------------------------------------------------------------------------------- /backend/onyx/natural_language_processing/exceptions.py: -------------------------------------------------------------------------------- 1 | class ModelServerRateLimitError(Exception): 2 | """ 3 | Exception raised for rate limiting errors from the model server. 4 | """ 5 | -------------------------------------------------------------------------------- /backend/onyx/onyxbot/slack/handlers/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/onyx-dot-app/onyx/4c71a5f5ff013ed87bf3422b2b8a87b46f024a0a/backend/onyx/onyxbot/slack/handlers/__init__.py -------------------------------------------------------------------------------- /backend/onyx/prompts/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/onyx-dot-app/onyx/4c71a5f5ff013ed87bf3422b2b8a87b46f024a0a/backend/onyx/prompts/__init__.py -------------------------------------------------------------------------------- /backend/onyx/prompts/constants.py: -------------------------------------------------------------------------------- 1 | GENERAL_SEP_PAT = "--------------" # Same length as Langchain's separator 2 | CODE_BLOCK_PAT = "```\n{}\n```" 3 | TRIPLE_BACKTICK = "```" 4 | QUESTION_PAT = "Query:" 5 | FINAL_QUERY_PAT = "Final Query:" 6 | THOUGHT_PAT = "Thought:" 7 | ANSWER_PAT = "Answer:" 8 | ANSWERABLE_PAT = "Answerable:" 9 | FINAL_ANSWER_PAT = "Final Answer:" 10 | QUOTE_PAT = "Quote:" 11 | QUOTES_PAT_PLURAL = "Quotes:" 12 | INVALID_PAT = "Invalid:" 13 | SOURCES_KEY = "sources" 14 | 15 | DEFAULT_IGNORE_STATEMENT = " Ignore any context documents that are not relevant." 16 | -------------------------------------------------------------------------------- /backend/onyx/secondary_llm_flows/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/onyx-dot-app/onyx/4c71a5f5ff013ed87bf3422b2b8a87b46f024a0a/backend/onyx/secondary_llm_flows/__init__.py -------------------------------------------------------------------------------- /backend/onyx/seeding/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/onyx-dot-app/onyx/4c71a5f5ff013ed87bf3422b2b8a87b46f024a0a/backend/onyx/seeding/__init__.py -------------------------------------------------------------------------------- /backend/onyx/seeding/user_folders.yaml: -------------------------------------------------------------------------------- 1 | user_folders: 2 | - id: -1 3 | name: "Recent Documents" 4 | description: "Documents uploaded by the user" 5 | files: [] 6 | assistants: [] 7 | -------------------------------------------------------------------------------- /backend/onyx/server/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/onyx-dot-app/onyx/4c71a5f5ff013ed87bf3422b2b8a87b46f024a0a/backend/onyx/server/__init__.py -------------------------------------------------------------------------------- /backend/onyx/server/api_key/models.py: -------------------------------------------------------------------------------- 1 | from pydantic import BaseModel 2 | 3 | from onyx.auth.schemas import UserRole 4 | 5 | 6 | class APIKeyArgs(BaseModel): 7 | name: str | None = None 8 | role: UserRole = UserRole.BASIC 9 | -------------------------------------------------------------------------------- /backend/onyx/server/documents/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/onyx-dot-app/onyx/4c71a5f5ff013ed87bf3422b2b8a87b46f024a0a/backend/onyx/server/documents/__init__.py -------------------------------------------------------------------------------- /backend/onyx/server/features/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/onyx-dot-app/onyx/4c71a5f5ff013ed87bf3422b2b8a87b46f024a0a/backend/onyx/server/features/__init__.py -------------------------------------------------------------------------------- /backend/onyx/server/features/document_set/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/onyx-dot-app/onyx/4c71a5f5ff013ed87bf3422b2b8a87b46f024a0a/backend/onyx/server/features/document_set/__init__.py -------------------------------------------------------------------------------- /backend/onyx/server/features/folder/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/onyx-dot-app/onyx/4c71a5f5ff013ed87bf3422b2b8a87b46f024a0a/backend/onyx/server/features/folder/__init__.py -------------------------------------------------------------------------------- /backend/onyx/server/features/password/models.py: -------------------------------------------------------------------------------- 1 | from pydantic import BaseModel 2 | 3 | 4 | class UserResetRequest(BaseModel): 5 | user_email: str 6 | 7 | 8 | class UserResetResponse(BaseModel): 9 | user_id: str 10 | new_password: str 11 | 12 | 13 | class ChangePasswordRequest(BaseModel): 14 | old_password: str 15 | new_password: str 16 | -------------------------------------------------------------------------------- /backend/onyx/server/features/persona/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/onyx-dot-app/onyx/4c71a5f5ff013ed87bf3422b2b8a87b46f024a0a/backend/onyx/server/features/persona/__init__.py -------------------------------------------------------------------------------- /backend/onyx/server/manage/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/onyx-dot-app/onyx/4c71a5f5ff013ed87bf3422b2b8a87b46f024a0a/backend/onyx/server/manage/__init__.py -------------------------------------------------------------------------------- /backend/onyx/server/onyx_api/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/onyx-dot-app/onyx/4c71a5f5ff013ed87bf3422b2b8a87b46f024a0a/backend/onyx/server/onyx_api/__init__.py -------------------------------------------------------------------------------- /backend/onyx/server/onyx_api/models.py: -------------------------------------------------------------------------------- 1 | from pydantic import BaseModel 2 | 3 | from onyx.connectors.models import DocumentBase 4 | 5 | 6 | class IngestionDocument(BaseModel): 7 | document: DocumentBase 8 | cc_pair_id: int | None = None 9 | 10 | 11 | class IngestionResult(BaseModel): 12 | document_id: str 13 | already_existed: bool 14 | 15 | 16 | class DocMinimalInfo(BaseModel): 17 | document_id: str 18 | semantic_id: str 19 | link: str | None = None 20 | -------------------------------------------------------------------------------- /backend/onyx/server/query_and_chat/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/onyx-dot-app/onyx/4c71a5f5ff013ed87bf3422b2b8a87b46f024a0a/backend/onyx/server/query_and_chat/__init__.py -------------------------------------------------------------------------------- /backend/onyx/server/query_and_chat/chat_utils.py: -------------------------------------------------------------------------------- 1 | from onyx.file_store.models import ChatFileType 2 | from onyx.utils.file_types import UploadMimeTypes 3 | 4 | 5 | def mime_type_to_chat_file_type(mime_type: str | None) -> ChatFileType: 6 | if mime_type is None: 7 | return ChatFileType.PLAIN_TEXT 8 | 9 | if mime_type in UploadMimeTypes.IMAGE_MIME_TYPES: 10 | return ChatFileType.IMAGE 11 | 12 | if mime_type in UploadMimeTypes.CSV_MIME_TYPES: 13 | return ChatFileType.CSV 14 | 15 | if mime_type in UploadMimeTypes.DOCUMENT_MIME_TYPES: 16 | return ChatFileType.DOC 17 | 18 | return ChatFileType.PLAIN_TEXT 19 | -------------------------------------------------------------------------------- /backend/onyx/server/token_rate_limits/models.py: -------------------------------------------------------------------------------- 1 | from pydantic import BaseModel 2 | 3 | from onyx.db.models import TokenRateLimit 4 | 5 | 6 | class TokenRateLimitArgs(BaseModel): 7 | enabled: bool 8 | token_budget: int 9 | period_hours: int 10 | 11 | 12 | class TokenRateLimitDisplay(BaseModel): 13 | token_id: int 14 | enabled: bool 15 | token_budget: int 16 | period_hours: int 17 | 18 | @classmethod 19 | def from_db(cls, token_rate_limit: TokenRateLimit) -> "TokenRateLimitDisplay": 20 | return cls( 21 | token_id=token_rate_limit.id, 22 | enabled=token_rate_limit.enabled, 23 | token_budget=token_rate_limit.token_budget, 24 | period_hours=token_rate_limit.period_hours, 25 | ) 26 | -------------------------------------------------------------------------------- /backend/onyx/tools/tool_implementations/custom/base_tool_types.py: -------------------------------------------------------------------------------- 1 | # should really be `JSON_ro`, but this causes issues with pydantic 2 | ToolResultType = dict | list | str | int | float | bool 3 | -------------------------------------------------------------------------------- /backend/onyx/tools/tool_implementations/internet_search/models.py: -------------------------------------------------------------------------------- 1 | from pydantic import BaseModel 2 | 3 | 4 | class InternetSearchResult(BaseModel): 5 | title: str 6 | link: str 7 | snippet: str 8 | 9 | 10 | class InternetSearchResponse(BaseModel): 11 | revised_query: str 12 | internet_results: list[InternetSearchResult] 13 | -------------------------------------------------------------------------------- /backend/onyx/utils/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/onyx-dot-app/onyx/4c71a5f5ff013ed87bf3422b2b8a87b46f024a0a/backend/onyx/utils/__init__.py -------------------------------------------------------------------------------- /backend/onyx/utils/batching.py: -------------------------------------------------------------------------------- 1 | from collections.abc import Callable 2 | from collections.abc import Generator 3 | from collections.abc import Iterable 4 | from itertools import islice 5 | from typing import TypeVar 6 | 7 | T = TypeVar("T") 8 | 9 | 10 | def batch_generator( 11 | items: Iterable[T], 12 | batch_size: int, 13 | pre_batch_yield: Callable[[list[T]], None] | None = None, 14 | ) -> Generator[list[T], None, None]: 15 | iterable = iter(items) 16 | while True: 17 | batch = list(islice(iterable, batch_size)) 18 | if not batch: 19 | return 20 | 21 | if pre_batch_yield: 22 | pre_batch_yield(batch) 23 | yield batch 24 | -------------------------------------------------------------------------------- /backend/onyx/utils/callbacks.py: -------------------------------------------------------------------------------- 1 | from typing import Generic 2 | from typing import TypeVar 3 | 4 | T = TypeVar("T") 5 | 6 | 7 | class MetricsHander(Generic[T]): 8 | def __init__(self) -> None: 9 | self.metrics: T | None = None 10 | 11 | def record_metric(self, metrics: T) -> None: 12 | self.metrics = metrics 13 | -------------------------------------------------------------------------------- /backend/onyx/utils/error_handling.py: -------------------------------------------------------------------------------- 1 | """ 2 | Standardized error handling utilities. 3 | """ 4 | 5 | from onyx.configs.app_configs import CONTINUE_ON_CONNECTOR_FAILURE 6 | from onyx.utils.logger import setup_logger 7 | 8 | logger = setup_logger() 9 | 10 | 11 | def handle_connector_error(e: Exception, context: str) -> None: 12 | """ 13 | Standard error handling for connectors. 14 | 15 | Args: 16 | e: The exception that was raised 17 | context: A description of where the error occurred 18 | 19 | Raises: 20 | The original exception if CONTINUE_ON_CONNECTOR_FAILURE is False 21 | """ 22 | logger.error(f"Error in {context}: {e}", exc_info=e) 23 | if not CONTINUE_ON_CONNECTOR_FAILURE: 24 | raise 25 | -------------------------------------------------------------------------------- /backend/onyx/utils/errors.py: -------------------------------------------------------------------------------- 1 | class EERequiredError(Exception): 2 | """This error is thrown if an Enterprise Edition feature or API is 3 | requested but the Enterprise Edition flag is not set.""" 4 | -------------------------------------------------------------------------------- /backend/onyx/utils/lazy.py: -------------------------------------------------------------------------------- 1 | from collections.abc import Callable 2 | from functools import lru_cache 3 | from typing import TypeVar 4 | 5 | R = TypeVar("R") 6 | 7 | 8 | def lazy_eval(func: Callable[[], R]) -> Callable[[], R]: 9 | @lru_cache(maxsize=1) 10 | def lazy_func() -> R: 11 | return func() 12 | 13 | return lazy_func 14 | -------------------------------------------------------------------------------- /backend/onyx/utils/special_types.py: -------------------------------------------------------------------------------- 1 | from collections.abc import Mapping 2 | from collections.abc import Sequence 3 | from typing import TypeAlias 4 | 5 | JSON_ro: TypeAlias = ( 6 | Mapping[str, "JSON_ro"] | Sequence["JSON_ro"] | str | int | float | bool | None 7 | ) 8 | -------------------------------------------------------------------------------- /backend/pyproject.toml: -------------------------------------------------------------------------------- 1 | [tool.mypy] 2 | plugins = "sqlalchemy.ext.mypy.plugin" 3 | mypy_path = "$MYPY_CONFIG_FILE_DIR" 4 | explicit_package_bases = true 5 | disallow_untyped_defs = true 6 | enable_error_code = ["possibly-undefined"] 7 | strict_equality = true 8 | exclude = [ 9 | "^generated/", 10 | ] 11 | 12 | [[tool.mypy.overrides]] 13 | module = "alembic.versions.*" 14 | disable_error_code = ["var-annotated"] 15 | 16 | [[tool.mypy.overrides]] 17 | module = "alembic_tenants.versions.*" 18 | disable_error_code = ["var-annotated"] 19 | 20 | [[tool.mypy.overrides]] 21 | module = "generated.*" 22 | follow_imports = "silent" 23 | 24 | [tool.ruff] 25 | ignore = [] 26 | line-length = 130 27 | select = [ 28 | "E", 29 | "F", 30 | "W", 31 | ] 32 | -------------------------------------------------------------------------------- /backend/pytest.ini: -------------------------------------------------------------------------------- 1 | [pytest] 2 | pythonpath = 3 | . 4 | generated/onyx_openapi_client 5 | markers = 6 | slow: marks tests as slow 7 | filterwarnings = 8 | ignore::DeprecationWarning 9 | ignore::cryptography.utils.CryptographyDeprecationWarning 10 | ignore::PendingDeprecationWarning:ddtrace.internal.module 11 | # .test.env is gitignored. 12 | # After installing pytest-dotenv, 13 | # you can use it to test credentials locally. 14 | env_files = 15 | .test.env 16 | -------------------------------------------------------------------------------- /backend/requirements/combined.txt: -------------------------------------------------------------------------------- 1 | # combines all the other requirements files 2 | # Primarily for testing. 3 | # It's generally better to install just the requirements for what you are trying to run 4 | 5 | -r default.txt 6 | -r ee.txt 7 | -r model_server.txt 8 | -r dev.txt 9 | -------------------------------------------------------------------------------- /backend/requirements/ee.txt: -------------------------------------------------------------------------------- 1 | cohere==5.6.1 2 | posthog==3.7.4 3 | python3-saml==1.15.0 4 | xmlsec==1.3.14 5 | -------------------------------------------------------------------------------- /backend/requirements/model_server.txt: -------------------------------------------------------------------------------- 1 | accelerate==1.6.0 2 | einops==0.8.1 3 | cohere==5.6.1 4 | fastapi==0.115.12 5 | google-cloud-aiplatform==1.58.0 6 | numpy==1.26.4 7 | openai==1.75.0 8 | pydantic==2.8.2 9 | retry==0.9.2 10 | safetensors==0.5.3 11 | sentence-transformers==4.0.2 12 | setfit==1.1.1 13 | torch==2.6.0 14 | transformers==4.49.0 15 | uvicorn==0.21.1 16 | voyageai==0.2.3 17 | litellm==1.69.0 18 | sentry-sdk[fastapi,celery,starlette]==2.14.0 19 | aioboto3==14.0.0 20 | prometheus_fastapi_instrumentator==7.1.0 21 | -------------------------------------------------------------------------------- /backend/shared_configs/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/onyx-dot-app/onyx/4c71a5f5ff013ed87bf3422b2b8a87b46f024a0a/backend/shared_configs/__init__.py -------------------------------------------------------------------------------- /backend/shared_configs/enums.py: -------------------------------------------------------------------------------- 1 | from enum import Enum 2 | 3 | 4 | class EmbeddingProvider(str, Enum): 5 | OPENAI = "openai" 6 | COHERE = "cohere" 7 | VOYAGE = "voyage" 8 | GOOGLE = "google" 9 | LITELLM = "litellm" 10 | AZURE = "azure" 11 | 12 | 13 | class RerankerProvider(str, Enum): 14 | COHERE = "cohere" 15 | LITELLM = "litellm" 16 | BEDROCK = "bedrock" 17 | 18 | 19 | class EmbedTextType(str, Enum): 20 | QUERY = "query" 21 | PASSAGE = "passage" 22 | -------------------------------------------------------------------------------- /backend/shared_configs/utils.py: -------------------------------------------------------------------------------- 1 | from typing import TypeVar 2 | 3 | 4 | T = TypeVar("T") 5 | 6 | 7 | def batch_list( 8 | lst: list[T], 9 | batch_size: int, 10 | ) -> list[list[T]]: 11 | return [lst[i : i + batch_size] for i in range(0, len(lst), batch_size)] 12 | -------------------------------------------------------------------------------- /backend/slackbot_images/Confluence.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/onyx-dot-app/onyx/4c71a5f5ff013ed87bf3422b2b8a87b46f024a0a/backend/slackbot_images/Confluence.png -------------------------------------------------------------------------------- /backend/slackbot_images/File.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/onyx-dot-app/onyx/4c71a5f5ff013ed87bf3422b2b8a87b46f024a0a/backend/slackbot_images/File.png -------------------------------------------------------------------------------- /backend/slackbot_images/Guru.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/onyx-dot-app/onyx/4c71a5f5ff013ed87bf3422b2b8a87b46f024a0a/backend/slackbot_images/Guru.png -------------------------------------------------------------------------------- /backend/slackbot_images/Jira.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/onyx-dot-app/onyx/4c71a5f5ff013ed87bf3422b2b8a87b46f024a0a/backend/slackbot_images/Jira.png -------------------------------------------------------------------------------- /backend/slackbot_images/README.md: -------------------------------------------------------------------------------- 1 | This folder contains images needed by the Onyx Slack Bot. When possible, we use the images 2 | within `web/public`, but sometimes those images do not work for the Slack Bot. 3 | -------------------------------------------------------------------------------- /backend/slackbot_images/Web.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/onyx-dot-app/onyx/4c71a5f5ff013ed87bf3422b2b8a87b46f024a0a/backend/slackbot_images/Web.png -------------------------------------------------------------------------------- /backend/slackbot_images/Zendesk.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/onyx-dot-app/onyx/4c71a5f5ff013ed87bf3422b2b8a87b46f024a0a/backend/slackbot_images/Zendesk.png -------------------------------------------------------------------------------- /backend/static/images/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/onyx-dot-app/onyx/4c71a5f5ff013ed87bf3422b2b8a87b46f024a0a/backend/static/images/logo.png -------------------------------------------------------------------------------- /backend/static/images/logotype.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/onyx-dot-app/onyx/4c71a5f5ff013ed87bf3422b2b8a87b46f024a0a/backend/static/images/logotype.png -------------------------------------------------------------------------------- /backend/tests/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/onyx-dot-app/onyx/4c71a5f5ff013ed87bf3422b2b8a87b46f024a0a/backend/tests/__init__.py -------------------------------------------------------------------------------- /backend/tests/daily/connectors/conftest.py: -------------------------------------------------------------------------------- 1 | from collections.abc import Generator 2 | from unittest.mock import MagicMock 3 | from unittest.mock import patch 4 | 5 | import pytest 6 | 7 | 8 | @pytest.fixture 9 | def mock_get_unstructured_api_key() -> Generator[MagicMock, None, None]: 10 | with patch( 11 | "onyx.file_processing.extract_file_text.get_unstructured_api_key", 12 | return_value=None, 13 | ) as mock: 14 | yield mock 15 | -------------------------------------------------------------------------------- /backend/tests/daily/connectors/highspot/test_highspot_data.json: -------------------------------------------------------------------------------- 1 | { 2 | "target_doc_id": "67cd8eb35d3ee0487de2e704", 3 | "semantic_identifier": "Highspot in Action _ Salesforce Integration", 4 | "link": "https://www.highspot.com/items/67cd8eb35d3ee0487de2e704", 5 | "poll_source": { 6 | "target_doc_id":"67efb452c3f40bcca2b48ca5", 7 | "semantic_identifier":"Introduction to Intelligent Agents", 8 | "link":"https://www.highspot.com/items/67efb452c3f40bcca2b48ca5" 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /backend/tests/integration/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/onyx-dot-app/onyx/4c71a5f5ff013ed87bf3422b2b8a87b46f024a0a/backend/tests/integration/__init__.py -------------------------------------------------------------------------------- /backend/tests/integration/common_utils/config.py: -------------------------------------------------------------------------------- 1 | import generated.onyx_openapi_client.onyx_openapi_client as onyx_api 2 | from tests.integration.common_utils.constants import API_SERVER_URL 3 | 4 | api_config = onyx_api.Configuration(host=API_SERVER_URL) 5 | -------------------------------------------------------------------------------- /backend/tests/integration/common_utils/constants.py: -------------------------------------------------------------------------------- 1 | import os 2 | 3 | ADMIN_USER_NAME = "admin_user" 4 | 5 | API_SERVER_PROTOCOL = os.getenv("API_SERVER_PROTOCOL") or "http" 6 | API_SERVER_HOST = os.getenv("API_SERVER_HOST") or "127.0.0.1" 7 | API_SERVER_PORT = os.getenv("API_SERVER_PORT") or "8080" 8 | API_SERVER_URL = f"{API_SERVER_PROTOCOL}://{API_SERVER_HOST}:{API_SERVER_PORT}" 9 | MAX_DELAY = 60 10 | 11 | GENERAL_HEADERS = {"Content-Type": "application/json"} 12 | 13 | NUM_DOCS = 5 14 | 15 | MOCK_CONNECTOR_SERVER_HOST = os.getenv("MOCK_CONNECTOR_SERVER_HOST") or "localhost" 16 | MOCK_CONNECTOR_SERVER_PORT = os.getenv("MOCK_CONNECTOR_SERVER_PORT") or 8001 17 | -------------------------------------------------------------------------------- /backend/tests/integration/common_utils/test_files/Sample.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/onyx-dot-app/onyx/4c71a5f5ff013ed87bf3422b2b8a87b46f024a0a/backend/tests/integration/common_utils/test_files/Sample.pdf -------------------------------------------------------------------------------- /backend/tests/integration/mock_services/docker-compose.mock-it-services.yml: -------------------------------------------------------------------------------- 1 | version: '3.8' 2 | 3 | services: 4 | mock_connector_server: 5 | build: 6 | context: ./mock_connector_server 7 | dockerfile: Dockerfile 8 | ports: 9 | - "8001:8001" 10 | healthcheck: 11 | test: ["CMD", "curl", "-f", "http://localhost:8001/health"] 12 | interval: 10s 13 | timeout: 5s 14 | retries: 5 15 | networks: 16 | - onyx-stack_default 17 | networks: 18 | onyx-stack_default: 19 | name: onyx-stack_default 20 | external: true 21 | -------------------------------------------------------------------------------- /backend/tests/integration/mock_services/mock_connector_server/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM python:3.11.7-slim-bookworm 2 | 3 | WORKDIR /app 4 | 5 | RUN pip install "pydantic-core>=2.28.0" fastapi uvicorn 6 | 7 | COPY ./main.py /app/main.py 8 | 9 | CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "8001"] -------------------------------------------------------------------------------- /backend/tests/integration/tests/indexing/conftest.py: -------------------------------------------------------------------------------- 1 | import httpx 2 | import pytest 3 | 4 | from tests.integration.common_utils.constants import MOCK_CONNECTOR_SERVER_HOST 5 | from tests.integration.common_utils.constants import MOCK_CONNECTOR_SERVER_PORT 6 | 7 | 8 | @pytest.fixture 9 | def mock_server_client() -> httpx.Client: 10 | print( 11 | f"Initializing mock server client with host: " 12 | f"{MOCK_CONNECTOR_SERVER_HOST} and port: " 13 | f"{MOCK_CONNECTOR_SERVER_PORT}" 14 | ) 15 | return httpx.Client( 16 | base_url=f"http://{MOCK_CONNECTOR_SERVER_HOST}:{MOCK_CONNECTOR_SERVER_PORT}", 17 | timeout=5.0, 18 | ) 19 | -------------------------------------------------------------------------------- /backend/tests/integration/tests/indexing/file_connector/test_files/.onyx_metadata.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "filename": "sample1.txt", 4 | "link": "https://www.google.com", 5 | "file_display_name": "Basically Google", 6 | "primary_owners": ["evan@onyx.app"], 7 | "status": "bingle bongle" 8 | }, 9 | { 10 | "filename": "sample2.txt", 11 | "link": "https://www.youtube.com", 12 | "file_display_name": "Pretty much youtube", 13 | "primary_owners": ["chris@onyx.app"], 14 | "status": "not bingle bongle" 15 | } 16 | ] -------------------------------------------------------------------------------- /backend/tests/integration/tests/indexing/file_connector/test_files/sample2.txt: -------------------------------------------------------------------------------- 1 | Hello, I hope you're having a wonderful day! -------------------------------------------------------------------------------- /backend/tests/integration/tests/indexing/file_connector/test_files/with_meta.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/onyx-dot-app/onyx/4c71a5f5ff013ed87bf3422b2b8a87b46f024a0a/backend/tests/integration/tests/indexing/file_connector/test_files/with_meta.zip -------------------------------------------------------------------------------- /backend/tests/integration/tests/indexing/file_connector/test_files/without_meta.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/onyx-dot-app/onyx/4c71a5f5ff013ed87bf3422b2b8a87b46f024a0a/backend/tests/integration/tests/indexing/file_connector/test_files/without_meta.zip -------------------------------------------------------------------------------- /backend/tests/integration/tests/pruning/website/css/fancybox/blank.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/onyx-dot-app/onyx/4c71a5f5ff013ed87bf3422b2b8a87b46f024a0a/backend/tests/integration/tests/pruning/website/css/fancybox/blank.gif -------------------------------------------------------------------------------- /backend/tests/integration/tests/pruning/website/css/fancybox/fancybox_loading.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/onyx-dot-app/onyx/4c71a5f5ff013ed87bf3422b2b8a87b46f024a0a/backend/tests/integration/tests/pruning/website/css/fancybox/fancybox_loading.gif -------------------------------------------------------------------------------- /backend/tests/integration/tests/pruning/website/css/fancybox/fancybox_overlay.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/onyx-dot-app/onyx/4c71a5f5ff013ed87bf3422b2b8a87b46f024a0a/backend/tests/integration/tests/pruning/website/css/fancybox/fancybox_overlay.png -------------------------------------------------------------------------------- /backend/tests/integration/tests/pruning/website/css/fancybox/fancybox_sprite.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/onyx-dot-app/onyx/4c71a5f5ff013ed87bf3422b2b8a87b46f024a0a/backend/tests/integration/tests/pruning/website/css/fancybox/fancybox_sprite.png -------------------------------------------------------------------------------- /backend/tests/integration/tests/pruning/website/fonts/customicon/icons.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/onyx-dot-app/onyx/4c71a5f5ff013ed87bf3422b2b8a87b46f024a0a/backend/tests/integration/tests/pruning/website/fonts/customicon/icons.eot -------------------------------------------------------------------------------- /backend/tests/integration/tests/pruning/website/fonts/customicon/icons.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/onyx-dot-app/onyx/4c71a5f5ff013ed87bf3422b2b8a87b46f024a0a/backend/tests/integration/tests/pruning/website/fonts/customicon/icons.ttf -------------------------------------------------------------------------------- /backend/tests/integration/tests/pruning/website/fonts/customicon/icons.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/onyx-dot-app/onyx/4c71a5f5ff013ed87bf3422b2b8a87b46f024a0a/backend/tests/integration/tests/pruning/website/fonts/customicon/icons.woff -------------------------------------------------------------------------------- /backend/tests/integration/tests/pruning/website/fonts/fontawesome-webfont.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/onyx-dot-app/onyx/4c71a5f5ff013ed87bf3422b2b8a87b46f024a0a/backend/tests/integration/tests/pruning/website/fonts/fontawesome-webfont.eot -------------------------------------------------------------------------------- /backend/tests/integration/tests/pruning/website/fonts/fontawesome-webfont.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/onyx-dot-app/onyx/4c71a5f5ff013ed87bf3422b2b8a87b46f024a0a/backend/tests/integration/tests/pruning/website/fonts/fontawesome-webfont.ttf -------------------------------------------------------------------------------- /backend/tests/integration/tests/pruning/website/fonts/fontawesome-webfont.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/onyx-dot-app/onyx/4c71a5f5ff013ed87bf3422b2b8a87b46f024a0a/backend/tests/integration/tests/pruning/website/fonts/fontawesome-webfont.woff -------------------------------------------------------------------------------- /backend/tests/integration/tests/pruning/website/fonts/fontawesome.otf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/onyx-dot-app/onyx/4c71a5f5ff013ed87bf3422b2b8a87b46f024a0a/backend/tests/integration/tests/pruning/website/fonts/fontawesome.otf -------------------------------------------------------------------------------- /backend/tests/integration/tests/pruning/website/img/avatar.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/onyx-dot-app/onyx/4c71a5f5ff013ed87bf3422b2b8a87b46f024a0a/backend/tests/integration/tests/pruning/website/img/avatar.png -------------------------------------------------------------------------------- /backend/tests/integration/tests/pruning/website/img/bg_direction_nav.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/onyx-dot-app/onyx/4c71a5f5ff013ed87bf3422b2b8a87b46f024a0a/backend/tests/integration/tests/pruning/website/img/bg_direction_nav.png -------------------------------------------------------------------------------- /backend/tests/integration/tests/pruning/website/img/glyphicons-halflings-white.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/onyx-dot-app/onyx/4c71a5f5ff013ed87bf3422b2b8a87b46f024a0a/backend/tests/integration/tests/pruning/website/img/glyphicons-halflings-white.png -------------------------------------------------------------------------------- /backend/tests/integration/tests/pruning/website/img/glyphicons-halflings.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/onyx-dot-app/onyx/4c71a5f5ff013ed87bf3422b2b8a87b46f024a0a/backend/tests/integration/tests/pruning/website/img/glyphicons-halflings.png -------------------------------------------------------------------------------- /backend/tests/integration/tests/pruning/website/img/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/onyx-dot-app/onyx/4c71a5f5ff013ed87bf3422b2b8a87b46f024a0a/backend/tests/integration/tests/pruning/website/img/logo.png -------------------------------------------------------------------------------- /backend/tests/integration/tests/pruning/website/img/nivo-bullets.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/onyx-dot-app/onyx/4c71a5f5ff013ed87bf3422b2b8a87b46f024a0a/backend/tests/integration/tests/pruning/website/img/nivo-bullets.png -------------------------------------------------------------------------------- /backend/tests/integration/tests/pruning/website/img/section-image-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/onyx-dot-app/onyx/4c71a5f5ff013ed87bf3422b2b8a87b46f024a0a/backend/tests/integration/tests/pruning/website/img/section-image-1.png -------------------------------------------------------------------------------- /backend/tests/integration/tests/pruning/website/img/service1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/onyx-dot-app/onyx/4c71a5f5ff013ed87bf3422b2b8a87b46f024a0a/backend/tests/integration/tests/pruning/website/img/service1.jpg -------------------------------------------------------------------------------- /backend/tests/integration/tests/pruning/website/img/service2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/onyx-dot-app/onyx/4c71a5f5ff013ed87bf3422b2b8a87b46f024a0a/backend/tests/integration/tests/pruning/website/img/service2.jpg -------------------------------------------------------------------------------- /backend/tests/integration/tests/pruning/website/img/service3.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/onyx-dot-app/onyx/4c71a5f5ff013ed87bf3422b2b8a87b46f024a0a/backend/tests/integration/tests/pruning/website/img/service3.jpg -------------------------------------------------------------------------------- /backend/tests/integration/tests/pruning/website/img/slides/1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/onyx-dot-app/onyx/4c71a5f5ff013ed87bf3422b2b8a87b46f024a0a/backend/tests/integration/tests/pruning/website/img/slides/1.jpg -------------------------------------------------------------------------------- /backend/tests/integration/tests/pruning/website/img/slides/2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/onyx-dot-app/onyx/4c71a5f5ff013ed87bf3422b2b8a87b46f024a0a/backend/tests/integration/tests/pruning/website/img/slides/2.jpg -------------------------------------------------------------------------------- /backend/tests/integration/tests/pruning/website/img/slides/3.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/onyx-dot-app/onyx/4c71a5f5ff013ed87bf3422b2b8a87b46f024a0a/backend/tests/integration/tests/pruning/website/img/slides/3.jpg -------------------------------------------------------------------------------- /backend/tests/integration/tests/pruning/website/img/team1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/onyx-dot-app/onyx/4c71a5f5ff013ed87bf3422b2b8a87b46f024a0a/backend/tests/integration/tests/pruning/website/img/team1.jpg -------------------------------------------------------------------------------- /backend/tests/integration/tests/pruning/website/img/team2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/onyx-dot-app/onyx/4c71a5f5ff013ed87bf3422b2b8a87b46f024a0a/backend/tests/integration/tests/pruning/website/img/team2.jpg -------------------------------------------------------------------------------- /backend/tests/integration/tests/pruning/website/img/team3.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/onyx-dot-app/onyx/4c71a5f5ff013ed87bf3422b2b8a87b46f024a0a/backend/tests/integration/tests/pruning/website/img/team3.jpg -------------------------------------------------------------------------------- /backend/tests/integration/tests/pruning/website/img/team4.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/onyx-dot-app/onyx/4c71a5f5ff013ed87bf3422b2b8a87b46f024a0a/backend/tests/integration/tests/pruning/website/img/team4.jpg -------------------------------------------------------------------------------- /backend/tests/integration/tests/pruning/website/img/works/1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/onyx-dot-app/onyx/4c71a5f5ff013ed87bf3422b2b8a87b46f024a0a/backend/tests/integration/tests/pruning/website/img/works/1.jpg -------------------------------------------------------------------------------- /backend/tests/integration/tests/pruning/website/img/works/2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/onyx-dot-app/onyx/4c71a5f5ff013ed87bf3422b2b8a87b46f024a0a/backend/tests/integration/tests/pruning/website/img/works/2.jpg -------------------------------------------------------------------------------- /backend/tests/integration/tests/pruning/website/img/works/3.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/onyx-dot-app/onyx/4c71a5f5ff013ed87bf3422b2b8a87b46f024a0a/backend/tests/integration/tests/pruning/website/img/works/3.jpg -------------------------------------------------------------------------------- /backend/tests/integration/tests/pruning/website/img/works/4.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/onyx-dot-app/onyx/4c71a5f5ff013ed87bf3422b2b8a87b46f024a0a/backend/tests/integration/tests/pruning/website/img/works/4.jpg -------------------------------------------------------------------------------- /backend/tests/integration/tests/pruning/website/img/works/5.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/onyx-dot-app/onyx/4c71a5f5ff013ed87bf3422b2b8a87b46f024a0a/backend/tests/integration/tests/pruning/website/img/works/5.jpg -------------------------------------------------------------------------------- /backend/tests/integration/tests/pruning/website/img/works/6.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/onyx-dot-app/onyx/4c71a5f5ff013ed87bf3422b2b8a87b46f024a0a/backend/tests/integration/tests/pruning/website/img/works/6.jpg -------------------------------------------------------------------------------- /backend/tests/integration/tests/pruning/website/img/works/7.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/onyx-dot-app/onyx/4c71a5f5ff013ed87bf3422b2b8a87b46f024a0a/backend/tests/integration/tests/pruning/website/img/works/7.jpg -------------------------------------------------------------------------------- /backend/tests/integration/tests/pruning/website/img/works/8.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/onyx-dot-app/onyx/4c71a5f5ff013ed87bf3422b2b8a87b46f024a0a/backend/tests/integration/tests/pruning/website/img/works/8.jpg -------------------------------------------------------------------------------- /backend/tests/integration/tests/pruning/website/js/flexslider/setting.js: -------------------------------------------------------------------------------- 1 | $(window).load(function () { 2 | $(".flexslider").flexslider(); 3 | }); 4 | -------------------------------------------------------------------------------- /backend/tests/load_env_vars.py: -------------------------------------------------------------------------------- 1 | import os 2 | 3 | 4 | def load_env_vars(env_file: str = ".env") -> None: 5 | current_dir = os.path.dirname(os.path.abspath(__file__)) 6 | env_path = os.path.join(current_dir, env_file) 7 | try: 8 | with open(env_path, "r") as f: 9 | for line in f: 10 | line = line.strip() 11 | if line and not line.startswith("#"): 12 | key, value = line.split("=", 1) 13 | os.environ[key] = value.strip() 14 | print("Successfully loaded environment variables") 15 | except FileNotFoundError: 16 | print(f"File {env_file} not found") 17 | -------------------------------------------------------------------------------- /backend/tests/regression/answer_quality/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/onyx-dot-app/onyx/4c71a5f5ff013ed87bf3422b2b8a87b46f024a0a/backend/tests/regression/answer_quality/__init__.py -------------------------------------------------------------------------------- /backend/tests/regression/search_quality/test_queries.json.template: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "question": "What is Onyx?", 4 | "ground_truth": [ 5 | { 6 | "doc_source": "Web", 7 | "doc_link": "https://docs.onyx.app/more/use_cases/overview" 8 | }, 9 | { 10 | "doc_source": "Web", 11 | "doc_link": "https://docs.onyx.app/more/use_cases/ai_platform" 12 | } 13 | ], 14 | "categories": [ 15 | "keyword", 16 | "broad" 17 | ] 18 | }, 19 | { 20 | "question": "What is the meaning of life?" 21 | } 22 | ] -------------------------------------------------------------------------------- /backend/tests/unit/onyx/connectors/cross_connector_utils/test_html_utils.py: -------------------------------------------------------------------------------- 1 | import pathlib 2 | 3 | from onyx.file_processing.html_utils import parse_html_page_basic 4 | 5 | 6 | def test_parse_table() -> None: 7 | dir_path = pathlib.Path(__file__).parent.resolve() 8 | with open(f"{dir_path}/test_table.html", "r") as file: 9 | content = file.read() 10 | 11 | parsed = parse_html_page_basic(content) 12 | expected = "\n\thello\tthere\tgeneral\n\tkenobi\ta\tb\n\tc\td\te" 13 | assert expected in parsed 14 | -------------------------------------------------------------------------------- /backend/tests/unit/onyx/connectors/mediawiki/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/onyx-dot-app/onyx/4c71a5f5ff013ed87bf3422b2b8a87b46f024a0a/backend/tests/unit/onyx/connectors/mediawiki/__init__.py -------------------------------------------------------------------------------- /ct.yaml: -------------------------------------------------------------------------------- 1 | # See https://github.com/helm/chart-testing#configuration 2 | 3 | # still have to specify this on the command line for list-changed 4 | chart-dirs: 5 | - deployment/helm/charts 6 | 7 | # must be kept in sync with Chart.yaml 8 | chart-repos: 9 | - vespa=https://onyx-dot-app.github.io/vespa-helm-charts 10 | - postgresql=https://charts.bitnami.com/bitnami 11 | 12 | helm-extra-args: --debug --timeout 600s 13 | 14 | # nginx appears to not work on kind, likely due to lack of loadbalancer support 15 | # helm-extra-set-args also only works on the command line, not in this yaml 16 | # helm-extra-set-args: --set=nginx.enabled=false 17 | 18 | validate-maintainers: false 19 | -------------------------------------------------------------------------------- /deployment/.gitignore: -------------------------------------------------------------------------------- 1 | .env* 2 | secrets.yaml 3 | -------------------------------------------------------------------------------- /deployment/aws_ecs_fargate/cloudformation/onyx_config.jsonl: -------------------------------------------------------------------------------- 1 | { 2 | // Naming, likely doesn't need to be changed 3 | "OnyxNamespace": "onyx", 4 | "Environment": "production", 5 | "EFSName": "onyx-efs", 6 | 7 | // Region and VPC Stuff 8 | "AWSRegion": "us-east-2", 9 | "VpcID": "YOUR_VPC_ID", 10 | "SubnetIDs": "YOUR_SUBNET_ID1,YOUR_SUBNET_ID2", 11 | 12 | // Domain and ACM Stuff 13 | "DomainName": "YOUR_DOMAIN e.g ecs.onyx.app", 14 | "ValidationMethod": "DNS", 15 | "HostedZoneId": "" // Only specify if using Route 53 for DNS 16 | } -------------------------------------------------------------------------------- /deployment/docker_compose/env.nginx.template: -------------------------------------------------------------------------------- 1 | # DOMAIN is necessary for https setup, EMAIL is optional 2 | DOMAIN= 3 | EMAIL= 4 | 5 | # If using the `no-letsencrypt` setup, the below are required. 6 | # They specify the path within /onyx/deployment/data/sslcerts directory 7 | # where the certificate / certificate key can be found. You can either 8 | # name your certificate / certificate key files to follow the convention 9 | # below or adjust these to match your naming conventions. 10 | SSL_CERT_FILE_NAME=ssl.cert 11 | SSL_CERT_KEY_FILE_NAME=ssl.key 12 | -------------------------------------------------------------------------------- /deployment/helm/charts/onyx/.gitignore: -------------------------------------------------------------------------------- 1 | ### Helm ### 2 | # Chart dependencies 3 | **/charts/*.tgz 4 | -------------------------------------------------------------------------------- /deployment/helm/charts/onyx/.helmignore: -------------------------------------------------------------------------------- 1 | # Patterns to ignore when building packages. 2 | # This supports shell glob matching, relative path matching, and 3 | # negation (prefixed with !). Only one pattern per line. 4 | .DS_Store 5 | # Common VCS dirs 6 | .git/ 7 | .gitignore 8 | .bzr/ 9 | .bzrignore 10 | .hg/ 11 | .hgignore 12 | .svn/ 13 | # Common backup files 14 | *.swp 15 | *.bak 16 | *.tmp 17 | *.orig 18 | *~ 19 | # Various IDEs 20 | .project 21 | .idea/ 22 | *.tmproj 23 | .vscode/ 24 | -------------------------------------------------------------------------------- /deployment/helm/charts/onyx/Chart.lock: -------------------------------------------------------------------------------- 1 | dependencies: 2 | - name: postgresql 3 | repository: https://charts.bitnami.com/bitnami 4 | version: 14.3.1 5 | - name: vespa 6 | repository: https://onyx-dot-app.github.io/vespa-helm-charts 7 | version: 0.2.20 8 | - name: nginx 9 | repository: oci://registry-1.docker.io/bitnamicharts 10 | version: 15.14.0 11 | - name: redis 12 | repository: https://charts.bitnami.com/bitnami 13 | version: 20.1.0 14 | digest: sha256:4615c033064a987e3f66a48f4744d2e88bd1cc932c79453c4928455695a72778 15 | generated: "2025-02-04T11:45:05.39228-08:00" 16 | -------------------------------------------------------------------------------- /deployment/helm/charts/onyx/templates/danswer-secret.yaml: -------------------------------------------------------------------------------- 1 | {{- if not .Values.auth.existingSecret -}} 2 | apiVersion: v1 3 | kind: Secret 4 | metadata: 5 | name: {{ include "onyx-stack.secretName" . }} 6 | type: Opaque 7 | stringData: 8 | {{- range $name, $value := .Values.auth.secrets }} 9 | {{ $name }}: {{ $value | quote }} 10 | {{- end }} 11 | {{- end }} -------------------------------------------------------------------------------- /deployment/helm/charts/onyx/templates/indexing-model-pvc.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: v1 2 | kind: PersistentVolumeClaim 3 | metadata: 4 | name: {{ .Values.indexCapability.indexingModelPVC.name }} 5 | spec: 6 | storageClassName: {{ .Values.persistent.storageClassName }} 7 | accessModes: 8 | - {{ .Values.indexCapability.indexingModelPVC.accessMode | quote }} 9 | resources: 10 | requests: 11 | storage: {{ .Values.indexCapability.indexingModelPVC.storage | quote }} 12 | -------------------------------------------------------------------------------- /deployment/helm/charts/onyx/templates/inference-model-pvc.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: v1 2 | kind: PersistentVolumeClaim 3 | metadata: 4 | name: {{ .Values.inferenceCapability.pvc.name }} 5 | spec: 6 | storageClassName: {{ .Values.persistent.storageClassName }} 7 | accessModes: 8 | {{- toYaml .Values.inferenceCapability.pvc.accessModes | nindent 4 }} 9 | resources: 10 | requests: 11 | storage: {{ .Values.inferenceCapability.pvc.storage }} 12 | -------------------------------------------------------------------------------- /deployment/helm/charts/onyx/templates/inference-model-service.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: v1 2 | kind: Service 3 | metadata: 4 | name: {{ include "onyx-stack.fullname" . }}-inference-model-service 5 | spec: 6 | type: {{ .Values.inferenceCapability.service.type }} 7 | ports: 8 | - port: {{ .Values.inferenceCapability.service.servicePort}} 9 | targetPort: {{ .Values.inferenceCapability.service.targetPort }} 10 | protocol: TCP 11 | name: {{ .Values.inferenceCapability.service.portName }} 12 | selector: 13 | {{- range .Values.inferenceCapability.labels }} 14 | {{ .key }}: {{ .value }} 15 | {{- end }} 16 | -------------------------------------------------------------------------------- /deployment/helm/charts/onyx/templates/lets-encrypt.yaml: -------------------------------------------------------------------------------- 1 | {{- if .Values.letsencrypt.enabled -}} 2 | apiVersion: cert-manager.io/v1 3 | kind: ClusterIssuer 4 | metadata: 5 | name: {{ include "onyx-stack.fullname" . }}-letsencrypt 6 | spec: 7 | acme: 8 | # The ACME server URL 9 | server: https://acme-v02.api.letsencrypt.org/directory 10 | # Email address used for ACME registration 11 | email: {{ .Values.letsencrypt.email }} 12 | # Name of a secret used to store the ACME account private key 13 | privateKeySecretRef: 14 | name: {{ include "onyx-stack.fullname" . }}-letsencrypt 15 | # Enable the HTTP-01 challenge provider 16 | solvers: 17 | - http01: 18 | ingress: 19 | class: nginx 20 | {{- end }} -------------------------------------------------------------------------------- /deployment/helm/charts/onyx/templates/serviceaccount.yaml: -------------------------------------------------------------------------------- 1 | {{- if .Values.serviceAccount.create -}} 2 | apiVersion: v1 3 | kind: ServiceAccount 4 | metadata: 5 | name: {{ include "onyx-stack.serviceAccountName" . }} 6 | labels: 7 | {{- include "onyx-stack.labels" . | nindent 4 }} 8 | {{- with .Values.serviceAccount.annotations }} 9 | annotations: 10 | {{- toYaml . | nindent 4 }} 11 | {{- end }} 12 | automountServiceAccountToken: {{ .Values.serviceAccount.automount }} 13 | {{- end }} 14 | -------------------------------------------------------------------------------- /deployment/kubernetes/secrets.yaml: -------------------------------------------------------------------------------- 1 | # The values in this file should be changed 2 | apiVersion: v1 3 | kind: Secret 4 | metadata: 5 | name: danswer-secrets 6 | type: Opaque 7 | data: 8 | postgres_user: cG9zdGdyZXM= # "postgres" base64 encoded 9 | postgres_password: cGFzc3dvcmQ= # "password" base64 encoded 10 | google_oauth_client_id: ZXhhbXBsZS1jbGllbnQtaWQ= # "example-client-id" base64 encoded. You will need to provide this, use echo -n "your-client-id" | base64 11 | google_oauth_client_secret: ZXhhbXBsZV9nb29nbGVfb2F1dGhfc2VjcmV0 # "example-client-secret" base64 encoded. You will need to provide this, use echo -n "your-client-id" | base64 12 | redis_password: cGFzc3dvcmQ= # "password" base64 encoded 13 | -------------------------------------------------------------------------------- /examples/widget/.env.example: -------------------------------------------------------------------------------- 1 | NEXT_PUBLIC_API_URL=https://example.onyx.app 2 | NEXT_PUBLIC_API_KEY=some_long_api_key_here -------------------------------------------------------------------------------- /examples/widget/.eslintrc.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "next/core-web-vitals" 3 | } 4 | -------------------------------------------------------------------------------- /examples/widget/.gitignore: -------------------------------------------------------------------------------- 1 | # See https://help.github.com/articles/ignoring-files/ for more about ignoring files. 2 | 3 | # dependencies 4 | /node_modules 5 | /.pnp 6 | .pnp.js 7 | .yarn/install-state.gz 8 | 9 | # testing 10 | /coverage 11 | 12 | # next.js 13 | /.next/ 14 | /out/ 15 | 16 | # production 17 | /build 18 | 19 | # misc 20 | .DS_Store 21 | *.pem 22 | 23 | # debug 24 | npm-debug.log* 25 | yarn-debug.log* 26 | yarn-error.log* 27 | 28 | # local env files 29 | .env*.local 30 | 31 | # vercel 32 | .vercel 33 | 34 | # typescript 35 | *.tsbuildinfo 36 | next-env.d.ts 37 | -------------------------------------------------------------------------------- /examples/widget/next.config.mjs: -------------------------------------------------------------------------------- 1 | /** @type {import('next').NextConfig} */ 2 | const nextConfig = {}; 3 | 4 | export default nextConfig; 5 | -------------------------------------------------------------------------------- /examples/widget/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "widget", 3 | "version": "0.1.0", 4 | "private": true, 5 | "scripts": { 6 | "dev": "next dev", 7 | "build": "next build", 8 | "start": "next start", 9 | "lint": "next lint" 10 | }, 11 | "dependencies": { 12 | "next": "^14.2.27", 13 | "react": "^18", 14 | "react-dom": "^18", 15 | "react-markdown": "^8.0.6" 16 | }, 17 | "devDependencies": { 18 | "@types/node": "^20", 19 | "@types/react": "^18", 20 | "@types/react-dom": "^18", 21 | "autoprefixer": "^10.4.19", 22 | "eslint": "^8", 23 | "eslint-config-next": "14.2.5", 24 | "postcss": "^8.4.39", 25 | "tailwindcss": "^3.4.6", 26 | "typescript": "^5" 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /examples/widget/postcss.config.mjs: -------------------------------------------------------------------------------- 1 | /** @type {import('postcss-load-config').Config} */ 2 | const config = { 3 | plugins: { 4 | tailwindcss: {}, 5 | }, 6 | }; 7 | 8 | export default config; 9 | -------------------------------------------------------------------------------- /examples/widget/src/app/globals.css: -------------------------------------------------------------------------------- 1 | @tailwind base; 2 | @tailwind components; 3 | @tailwind utilities; 4 | -------------------------------------------------------------------------------- /examples/widget/src/app/layout.tsx: -------------------------------------------------------------------------------- 1 | import type { Metadata } from "next"; 2 | import { Inter } from "next/font/google"; 3 | 4 | import "./globals.css"; 5 | 6 | const inter = Inter({ subsets: ["latin"] }); 7 | 8 | export const metadata: Metadata = { 9 | title: "Example Onyx Widget", 10 | description: "Example Onyx Widget", 11 | }; 12 | 13 | export default function RootLayout({ 14 | children, 15 | }: Readonly<{ 16 | children: React.ReactNode; 17 | }>) { 18 | return ( 19 | 20 | {children} 21 | 22 | ); 23 | } 24 | -------------------------------------------------------------------------------- /examples/widget/src/app/page.tsx: -------------------------------------------------------------------------------- 1 | import { ChatWidget } from "./widget/Widget"; 2 | 3 | export default function Home() { 4 | return ( 5 |
6 | 7 |
8 | ); 9 | } 10 | -------------------------------------------------------------------------------- /examples/widget/tailwind.config.ts: -------------------------------------------------------------------------------- 1 | import type { Config } from "tailwindcss"; 2 | 3 | const config: Config = { 4 | content: [ 5 | "./src/pages/**/*.{js,ts,jsx,tsx,mdx}", 6 | "./src/components/**/*.{js,ts,jsx,tsx,mdx}", 7 | "./src/app/**/*.{js,ts,jsx,tsx,mdx}", 8 | ], 9 | theme: { 10 | extend: { 11 | backgroundImage: { 12 | "gradient-radial": "radial-gradient(var(--tw-gradient-stops))", 13 | "gradient-conic": 14 | "conic-gradient(from 180deg at 50% 50%, var(--tw-gradient-stops))", 15 | }, 16 | }, 17 | }, 18 | plugins: [], 19 | }; 20 | export default config; 21 | -------------------------------------------------------------------------------- /examples/widget/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "lib": ["dom", "dom.iterable", "esnext"], 4 | "allowJs": true, 5 | "skipLibCheck": true, 6 | "strict": true, 7 | "noEmit": true, 8 | "esModuleInterop": true, 9 | "module": "esnext", 10 | "moduleResolution": "bundler", 11 | "resolveJsonModule": true, 12 | "isolatedModules": true, 13 | "jsx": "preserve", 14 | "incremental": true, 15 | "plugins": [ 16 | { 17 | "name": "next" 18 | } 19 | ], 20 | "paths": { 21 | "@/*": ["./src/*"] 22 | } 23 | }, 24 | "include": ["next-env.d.ts", "**/*.ts", "**/*.tsx", ".next/types/**/*.ts"], 25 | "exclude": ["node_modules"] 26 | } 27 | -------------------------------------------------------------------------------- /web/.dockerignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | .next 3 | -------------------------------------------------------------------------------- /web/.eslintrc.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "next/core-web-vitals", 3 | "plugins": ["unused-imports"], 4 | "rules": { 5 | "@next/next/no-img-element": "off", 6 | "react-hooks/exhaustive-deps": "off", 7 | "no-unused-vars": "off", 8 | "@typescript-eslint/no-unused-vars": "off", 9 | "unused-imports/no-unused-imports": "warn", 10 | "unused-imports/no-unused-vars": [ 11 | "warn", 12 | { 13 | "vars": "all", 14 | "varsIgnorePattern": "^_", 15 | "args": "after-used", 16 | "argsIgnorePattern": "^_", 17 | "ignoreRestSiblings": true 18 | } 19 | ] 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /web/.prettierignore: -------------------------------------------------------------------------------- 1 | **/.git 2 | **/.svn 3 | **/.hg 4 | **/node_modules 5 | **/.next 6 | **/.vscode -------------------------------------------------------------------------------- /web/.prettierrc.json: -------------------------------------------------------------------------------- 1 | { 2 | "trailingComma": "es5" 3 | } 4 | -------------------------------------------------------------------------------- /web/@types/favicon-fetch.d.ts: -------------------------------------------------------------------------------- 1 | declare module "favicon-fetch" { 2 | interface FaviconFetchOptions { 3 | uri: string; 4 | } 5 | 6 | function faviconFetch(options: FaviconFetchOptions): string | null; 7 | 8 | export default faviconFetch; 9 | } 10 | -------------------------------------------------------------------------------- /web/admin2_auth.json: -------------------------------------------------------------------------------- 1 | { 2 | "cookies": [ 3 | { 4 | "name": "fastapiusersauth", 5 | "value": "h3qhacpHbE4_09HcOLlVW4lSee48m1UbjYTUiKYwNiw", 6 | "domain": "localhost", 7 | "path": "/", 8 | "expires": 1745624493.119168, 9 | "httpOnly": true, 10 | "secure": false, 11 | "sameSite": "Lax" 12 | } 13 | ], 14 | "origins": [] 15 | } -------------------------------------------------------------------------------- /web/components.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://ui.shadcn.com/schema.json", 3 | "style": "default", 4 | "rsc": true, 5 | "tsx": true, 6 | "tailwind": { 7 | "config": "tailwind-themes/tailwind.config.js", 8 | "css": "src/app/globals.css", 9 | "baseColor": "neutral", 10 | "cssVariables": false, 11 | "prefix": "" 12 | }, 13 | "aliases": { 14 | "components": "@/components", 15 | "utils": "@/lib/utils", 16 | "ui": "@/components/ui", 17 | "lib": "@/lib", 18 | "hooks": "@/hooks" 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /web/instrumentation.ts: -------------------------------------------------------------------------------- 1 | export async function register() { 2 | if (process.env.NEXT_PUBLIC_SENTRY_DSN) { 3 | if (process.env.NEXT_RUNTIME === "nodejs") { 4 | await import("./sentry.client.config"); 5 | await import("./sentry.server.config"); 6 | } 7 | 8 | if (process.env.NEXT_RUNTIME === "edge") { 9 | await import("./sentry.edge.config"); 10 | } 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /web/jest.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | preset: "ts-jest", 3 | testEnvironment: "node", 4 | moduleNameMapper: { 5 | "^@/(.*)$": "/src/$1", 6 | }, 7 | testPathIgnorePatterns: ["/node_modules/", "/tests/e2e/"], 8 | transform: { 9 | "^.+\\.tsx?$": "ts-jest", 10 | }, 11 | }; 12 | -------------------------------------------------------------------------------- /web/postcss.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | plugins: { 3 | tailwindcss: {}, 4 | autoprefixer: {}, 5 | }, 6 | }; 7 | -------------------------------------------------------------------------------- /web/public/Amazon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/onyx-dot-app/onyx/4c71a5f5ff013ed87bf3422b2b8a87b46f024a0a/web/public/Amazon.png -------------------------------------------------------------------------------- /web/public/Asana.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/onyx-dot-app/onyx/4c71a5f5ff013ed87bf3422b2b8a87b46f024a0a/web/public/Asana.png -------------------------------------------------------------------------------- /web/public/Axero.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/onyx-dot-app/onyx/4c71a5f5ff013ed87bf3422b2b8a87b46f024a0a/web/public/Axero.jpeg -------------------------------------------------------------------------------- /web/public/Azure.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/onyx-dot-app/onyx/4c71a5f5ff013ed87bf3422b2b8a87b46f024a0a/web/public/Azure.png -------------------------------------------------------------------------------- /web/public/Clickup.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /web/public/Discourse.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/onyx-dot-app/onyx/4c71a5f5ff013ed87bf3422b2b8a87b46f024a0a/web/public/Discourse.png -------------------------------------------------------------------------------- /web/public/Document360.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/onyx-dot-app/onyx/4c71a5f5ff013ed87bf3422b2b8a87b46f024a0a/web/public/Document360.png -------------------------------------------------------------------------------- /web/public/Dropbox.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/onyx-dot-app/onyx/4c71a5f5ff013ed87bf3422b2b8a87b46f024a0a/web/public/Dropbox.png -------------------------------------------------------------------------------- /web/public/Egnyte.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/onyx-dot-app/onyx/4c71a5f5ff013ed87bf3422b2b8a87b46f024a0a/web/public/Egnyte.png -------------------------------------------------------------------------------- /web/public/Fireflies.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/onyx-dot-app/onyx/4c71a5f5ff013ed87bf3422b2b8a87b46f024a0a/web/public/Fireflies.png -------------------------------------------------------------------------------- /web/public/Freshdesk.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/onyx-dot-app/onyx/4c71a5f5ff013ed87bf3422b2b8a87b46f024a0a/web/public/Freshdesk.png -------------------------------------------------------------------------------- /web/public/Gemini.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /web/public/GitBookDark.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/onyx-dot-app/onyx/4c71a5f5ff013ed87bf3422b2b8a87b46f024a0a/web/public/GitBookDark.png -------------------------------------------------------------------------------- /web/public/GitBookLight.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/onyx-dot-app/onyx/4c71a5f5ff013ed87bf3422b2b8a87b46f024a0a/web/public/GitBookLight.png -------------------------------------------------------------------------------- /web/public/Github.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/onyx-dot-app/onyx/4c71a5f5ff013ed87bf3422b2b8a87b46f024a0a/web/public/Github.png -------------------------------------------------------------------------------- /web/public/GithubDarkMode.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/onyx-dot-app/onyx/4c71a5f5ff013ed87bf3422b2b8a87b46f024a0a/web/public/GithubDarkMode.png -------------------------------------------------------------------------------- /web/public/Gitlab.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/onyx-dot-app/onyx/4c71a5f5ff013ed87bf3422b2b8a87b46f024a0a/web/public/Gitlab.png -------------------------------------------------------------------------------- /web/public/Gmail.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/onyx-dot-app/onyx/4c71a5f5ff013ed87bf3422b2b8a87b46f024a0a/web/public/Gmail.png -------------------------------------------------------------------------------- /web/public/Gong.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/onyx-dot-app/onyx/4c71a5f5ff013ed87bf3422b2b8a87b46f024a0a/web/public/Gong.png -------------------------------------------------------------------------------- /web/public/Google.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/onyx-dot-app/onyx/4c71a5f5ff013ed87bf3422b2b8a87b46f024a0a/web/public/Google.png -------------------------------------------------------------------------------- /web/public/GoogleCloudStorage.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/onyx-dot-app/onyx/4c71a5f5ff013ed87bf3422b2b8a87b46f024a0a/web/public/GoogleCloudStorage.png -------------------------------------------------------------------------------- /web/public/GoogleDrive.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/onyx-dot-app/onyx/4c71a5f5ff013ed87bf3422b2b8a87b46f024a0a/web/public/GoogleDrive.png -------------------------------------------------------------------------------- /web/public/GoogleSites.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/onyx-dot-app/onyx/4c71a5f5ff013ed87bf3422b2b8a87b46f024a0a/web/public/GoogleSites.png -------------------------------------------------------------------------------- /web/public/Highspot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/onyx-dot-app/onyx/4c71a5f5ff013ed87bf3422b2b8a87b46f024a0a/web/public/Highspot.png -------------------------------------------------------------------------------- /web/public/HubSpot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/onyx-dot-app/onyx/4c71a5f5ff013ed87bf3422b2b8a87b46f024a0a/web/public/HubSpot.png -------------------------------------------------------------------------------- /web/public/Linear.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/onyx-dot-app/onyx/4c71a5f5ff013ed87bf3422b2b8a87b46f024a0a/web/public/Linear.png -------------------------------------------------------------------------------- /web/public/Loopio.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/onyx-dot-app/onyx/4c71a5f5ff013ed87bf3422b2b8a87b46f024a0a/web/public/Loopio.png -------------------------------------------------------------------------------- /web/public/Microsoft.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /web/public/Mixedbread.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/onyx-dot-app/onyx/4c71a5f5ff013ed87bf3422b2b8a87b46f024a0a/web/public/Mixedbread.png -------------------------------------------------------------------------------- /web/public/Notion.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/onyx-dot-app/onyx/4c71a5f5ff013ed87bf3422b2b8a87b46f024a0a/web/public/Notion.png -------------------------------------------------------------------------------- /web/public/OCI.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /web/public/OpenSource.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/onyx-dot-app/onyx/4c71a5f5ff013ed87bf3422b2b8a87b46f024a0a/web/public/OpenSource.png -------------------------------------------------------------------------------- /web/public/Productboard.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/onyx-dot-app/onyx/4c71a5f5ff013ed87bf3422b2b8a87b46f024a0a/web/public/Productboard.png -------------------------------------------------------------------------------- /web/public/S3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/onyx-dot-app/onyx/4c71a5f5ff013ed87bf3422b2b8a87b46f024a0a/web/public/S3.png -------------------------------------------------------------------------------- /web/public/Salesforce.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/onyx-dot-app/onyx/4c71a5f5ff013ed87bf3422b2b8a87b46f024a0a/web/public/Salesforce.png -------------------------------------------------------------------------------- /web/public/Sharepoint.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/onyx-dot-app/onyx/4c71a5f5ff013ed87bf3422b2b8a87b46f024a0a/web/public/Sharepoint.png -------------------------------------------------------------------------------- /web/public/SlabLogo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/onyx-dot-app/onyx/4c71a5f5ff013ed87bf3422b2b8a87b46f024a0a/web/public/SlabLogo.png -------------------------------------------------------------------------------- /web/public/Slack.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/onyx-dot-app/onyx/4c71a5f5ff013ed87bf3422b2b8a87b46f024a0a/web/public/Slack.png -------------------------------------------------------------------------------- /web/public/Teams.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/onyx-dot-app/onyx/4c71a5f5ff013ed87bf3422b2b8a87b46f024a0a/web/public/Teams.png -------------------------------------------------------------------------------- /web/public/Voyage.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/onyx-dot-app/onyx/4c71a5f5ff013ed87bf3422b2b8a87b46f024a0a/web/public/Voyage.png -------------------------------------------------------------------------------- /web/public/Wikipedia.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/onyx-dot-app/onyx/4c71a5f5ff013ed87bf3422b2b8a87b46f024a0a/web/public/Wikipedia.png -------------------------------------------------------------------------------- /web/public/Zulip.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/onyx-dot-app/onyx/4c71a5f5ff013ed87bf3422b2b8a87b46f024a0a/web/public/Zulip.png -------------------------------------------------------------------------------- /web/public/discord.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/onyx-dot-app/onyx/4c71a5f5ff013ed87bf3422b2b8a87b46f024a0a/web/public/discord.png -------------------------------------------------------------------------------- /web/public/litellm.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/onyx-dot-app/onyx/4c71a5f5ff013ed87bf3422b2b8a87b46f024a0a/web/public/litellm.png -------------------------------------------------------------------------------- /web/public/logo-dark.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/onyx-dot-app/onyx/4c71a5f5ff013ed87bf3422b2b8a87b46f024a0a/web/public/logo-dark.png -------------------------------------------------------------------------------- /web/public/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/onyx-dot-app/onyx/4c71a5f5ff013ed87bf3422b2b8a87b46f024a0a/web/public/logo.png -------------------------------------------------------------------------------- /web/public/logo.svg: -------------------------------------------------------------------------------- 1 | 2 | 5 | -------------------------------------------------------------------------------- /web/public/logotype-dark.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/onyx-dot-app/onyx/4c71a5f5ff013ed87bf3422b2b8a87b46f024a0a/web/public/logotype-dark.png -------------------------------------------------------------------------------- /web/public/logotype.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/onyx-dot-app/onyx/4c71a5f5ff013ed87bf3422b2b8a87b46f024a0a/web/public/logotype.png -------------------------------------------------------------------------------- /web/public/microsoft.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/onyx-dot-app/onyx/4c71a5f5ff013ed87bf3422b2b8a87b46f024a0a/web/public/microsoft.png -------------------------------------------------------------------------------- /web/public/onyx.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/onyx-dot-app/onyx/4c71a5f5ff013ed87bf3422b2b8a87b46f024a0a/web/public/onyx.ico -------------------------------------------------------------------------------- /web/public/r2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/onyx-dot-app/onyx/4c71a5f5ff013ed87bf3422b2b8a87b46f024a0a/web/public/r2.png -------------------------------------------------------------------------------- /web/public/web.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 6 | 7 | -------------------------------------------------------------------------------- /web/screenshots/assistants_mine_page.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/onyx-dot-app/onyx/4c71a5f5ff013ed87bf3422b2b8a87b46f024a0a/web/screenshots/assistants_mine_page.png -------------------------------------------------------------------------------- /web/screenshots/chat_page.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/onyx-dot-app/onyx/4c71a5f5ff013ed87bf3422b2b8a87b46f024a0a/web/screenshots/chat_page.png -------------------------------------------------------------------------------- /web/screenshots/chat_page_after_create.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/onyx-dot-app/onyx/4c71a5f5ff013ed87bf3422b2b8a87b46f024a0a/web/screenshots/chat_page_after_create.png -------------------------------------------------------------------------------- /web/screenshots/create_assistant_page.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/onyx-dot-app/onyx/4c71a5f5ff013ed87bf3422b2b8a87b46f024a0a/web/screenshots/create_assistant_page.png -------------------------------------------------------------------------------- /web/sentry.client.config.ts: -------------------------------------------------------------------------------- 1 | import * as Sentry from "@sentry/nextjs"; 2 | 3 | if (process.env.NEXT_PUBLIC_SENTRY_DSN) { 4 | Sentry.init({ 5 | dsn: process.env.NEXT_PUBLIC_SENTRY_DSN, 6 | 7 | // Capture unhandled exceptions and performance data 8 | enableTracing: true, 9 | integrations: [], 10 | tracesSampleRate: 0.1, 11 | }); 12 | } 13 | -------------------------------------------------------------------------------- /web/sentry.edge.config.ts: -------------------------------------------------------------------------------- 1 | import * as Sentry from "@sentry/nextjs"; 2 | 3 | if (process.env.NEXT_PUBLIC_SENTRY_DSN) { 4 | Sentry.init({ 5 | dsn: process.env.NEXT_PUBLIC_SENTRY_DSN, 6 | // Only capture unhandled exceptions 7 | tracesSampleRate: 0, 8 | enableTracing: false, 9 | autoSessionTracking: false, 10 | }); 11 | } 12 | -------------------------------------------------------------------------------- /web/sentry.server.config.ts: -------------------------------------------------------------------------------- 1 | import * as Sentry from "@sentry/nextjs"; 2 | 3 | if (process.env.NEXT_PUBLIC_SENTRY_DSN) { 4 | Sentry.init({ 5 | dsn: process.env.NEXT_PUBLIC_SENTRY_DSN, 6 | 7 | // Only capture unhandled exceptions and errors 8 | tracesSampleRate: 0, 9 | enableTracing: false, 10 | 11 | // Disable performance monitoring and only capture errors 12 | profilesSampleRate: 0, 13 | 14 | // Note: if you want to override the automatic release value, do not set a 15 | // `release` value here - use the environment variable `SENTRY_RELEASE`, so 16 | // that it will also get attached to your source maps 17 | }); 18 | } 19 | -------------------------------------------------------------------------------- /web/src/app/admin/actions/new/page.tsx: -------------------------------------------------------------------------------- 1 | "use client"; 2 | 3 | import { ActionEditor } from "@/app/admin/actions/ActionEditor"; 4 | import { BackButton } from "@/components/BackButton"; 5 | import { AdminPageTitle } from "@/components/admin/Title"; 6 | import { ToolIcon } from "@/components/icons/icons"; 7 | import CardSection from "@/components/admin/CardSection"; 8 | 9 | export default function NewToolPage() { 10 | return ( 11 |
12 | 13 | 14 | } 17 | /> 18 | 19 | 20 | 21 | 22 |
23 | ); 24 | } 25 | -------------------------------------------------------------------------------- /web/src/app/admin/api-key/types.ts: -------------------------------------------------------------------------------- 1 | import { UserRole } from "@/lib/types"; 2 | 3 | export interface APIKey { 4 | api_key_id: number; 5 | api_key_display: string; 6 | api_key: string | null; 7 | api_key_name: string | null; 8 | api_key_role: UserRole; 9 | user_id: string; 10 | } 11 | 12 | export interface APIKeyArgs { 13 | name?: string; 14 | role: UserRole; 15 | } 16 | -------------------------------------------------------------------------------- /web/src/app/admin/assistants/enums.ts: -------------------------------------------------------------------------------- 1 | export enum SuccessfulPersonaUpdateRedirectType { 2 | ADMIN = "ADMIN", 3 | CHAT = "CHAT", 4 | } 5 | -------------------------------------------------------------------------------- /web/src/app/admin/bots/new/page.tsx: -------------------------------------------------------------------------------- 1 | import { BackButton } from "@/components/BackButton"; 2 | import { NewSlackBotForm } from "../SlackBotCreationForm"; 3 | 4 | async function NewSlackBotPage() { 5 | return ( 6 |
7 | 8 | 9 | 10 |
11 | ); 12 | } 13 | 14 | export default NewSlackBotPage; 15 | -------------------------------------------------------------------------------- /web/src/app/admin/configuration/llm/constants.ts: -------------------------------------------------------------------------------- 1 | export const LLM_PROVIDERS_ADMIN_URL = "/api/admin/llm/provider"; 2 | 3 | export const LLM_CONTEXTUAL_COST_ADMIN_URL = 4 | "/api/admin/llm/provider-contextual-cost"; 5 | 6 | export const EMBEDDING_PROVIDERS_ADMIN_URL = 7 | "/api/admin/embedding/embedding-provider"; 8 | 9 | export const EMBEDDING_MODELS_ADMIN_URL = "/api/admin/embedding"; 10 | -------------------------------------------------------------------------------- /web/src/app/admin/configuration/llm/page.tsx: -------------------------------------------------------------------------------- 1 | "use client"; 2 | 3 | import { AdminPageTitle } from "@/components/admin/Title"; 4 | import { LLMConfiguration } from "./LLMConfiguration"; 5 | import { CpuIcon } from "@/components/icons/icons"; 6 | 7 | const Page = () => { 8 | return ( 9 |
10 | } 13 | /> 14 | 15 | 16 |
17 | ); 18 | }; 19 | 20 | export default Page; 21 | -------------------------------------------------------------------------------- /web/src/app/admin/connector/[ccPairId]/unused.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/onyx-dot-app/onyx/4c71a5f5ff013ed87bf3422b2b8a87b46f024a0a/web/src/app/admin/connector/[ccPairId]/unused.txt -------------------------------------------------------------------------------- /web/src/app/admin/connectors/[connector]/page.tsx: -------------------------------------------------------------------------------- 1 | import { ConfigurableSources } from "@/lib/types"; 2 | import ConnectorWrapper from "./ConnectorWrapper"; 3 | 4 | export default async function Page(props: { 5 | params: Promise<{ connector: string }>; 6 | }) { 7 | const params = await props.params; 8 | return ( 9 | 12 | ); 13 | } 14 | -------------------------------------------------------------------------------- /web/src/app/admin/documents/explorer/lib.ts: -------------------------------------------------------------------------------- 1 | import { Filters } from "@/lib/search/interfaces"; 2 | 3 | export const adminSearch = async (query: string, filters: Filters) => { 4 | const response = await fetch("/api/admin/search", { 5 | method: "POST", 6 | headers: { 7 | "Content-Type": "application/json", 8 | }, 9 | body: JSON.stringify({ 10 | query, 11 | filters, 12 | }), 13 | }); 14 | return response; 15 | }; 16 | -------------------------------------------------------------------------------- /web/src/app/admin/documents/feedback/constants.ts: -------------------------------------------------------------------------------- 1 | export const numPages = 8; 2 | export const numToDisplay = 10; 3 | -------------------------------------------------------------------------------- /web/src/app/admin/embeddings/page.tsx: -------------------------------------------------------------------------------- 1 | "use client"; 2 | 3 | import { EmbeddingFormProvider } from "@/components/context/EmbeddingContext"; 4 | import EmbeddingSidebar from "../../../components/embedding/EmbeddingSidebar"; 5 | import EmbeddingForm from "./pages/EmbeddingFormPage"; 6 | 7 | export default function EmbeddingWrapper() { 8 | return ( 9 | 10 |
11 | 12 |
13 | 14 |
15 |
16 |
17 | ); 18 | } 19 | -------------------------------------------------------------------------------- /web/src/app/admin/layout.tsx: -------------------------------------------------------------------------------- 1 | import { Layout } from "@/components/admin/Layout"; 2 | 3 | export default async function AdminLayout({ 4 | children, 5 | }: { 6 | children: React.ReactNode; 7 | }) { 8 | return await Layout({ children }); 9 | } 10 | -------------------------------------------------------------------------------- /web/src/app/admin/settings/page.tsx: -------------------------------------------------------------------------------- 1 | import { AdminPageTitle } from "@/components/admin/Title"; 2 | 3 | import { SettingsForm } from "./SettingsForm"; 4 | import Text from "@/components/ui/text"; 5 | import { SettingsIcon } from "@/components/icons/icons"; 6 | 7 | export default async function Page() { 8 | return ( 9 |
10 | } 13 | /> 14 | 15 | 16 | Manage general Onyx settings applicable to all users in the workspace. 17 | 18 | 19 | 20 |
21 | ); 22 | } 23 | -------------------------------------------------------------------------------- /web/src/app/admin/token-rate-limits/types.ts: -------------------------------------------------------------------------------- 1 | export enum Scope { 2 | USER = "user", 3 | USER_GROUP = "user_group", 4 | GLOBAL = "global", 5 | } 6 | 7 | export interface TokenRateLimitArgs { 8 | enabled: boolean; 9 | token_budget: number; 10 | period_hours: number; 11 | } 12 | 13 | export interface TokenRateLimit { 14 | token_id: number; 15 | enabled: boolean; 16 | token_budget: number; 17 | period_hours: number; 18 | } 19 | 20 | export interface TokenRateLimitDisplay extends TokenRateLimit { 21 | group_name?: string; 22 | } 23 | -------------------------------------------------------------------------------- /web/src/app/anonymous/[id]/page.tsx: -------------------------------------------------------------------------------- 1 | import AnonymousPage from "./AnonymousPage"; 2 | 3 | export default async function Page(props: { params: Promise<{ id: string }> }) { 4 | const params = await props.params; 5 | 6 | return ; 7 | } 8 | -------------------------------------------------------------------------------- /web/src/app/assistants/LargeBackButton.tsx: -------------------------------------------------------------------------------- 1 | "use client"; 2 | 3 | import { useRouter } from "next/navigation"; 4 | import { FiChevronLeft } from "react-icons/fi"; 5 | 6 | export function LargeBackButton() { 7 | const router = useRouter(); 8 | return ( 9 |
router.back()}> 10 | 14 |
15 | ); 16 | } 17 | -------------------------------------------------------------------------------- /web/src/app/auth/error/layout.tsx: -------------------------------------------------------------------------------- 1 | export default function AuthErrorLayout({ 2 | children, 3 | }: { 4 | children: React.ReactNode; 5 | }) { 6 | // Log error to console for debugging 7 | console.error( 8 | "Authentication error page was accessed - this should not happen in normal flow" 9 | ); 10 | 11 | // In a production environment, you might want to send this to your error tracking service 12 | // For example, if using a service like Sentry: 13 | // captureException(new Error("Authentication error page was accessed unexpectedly")); 14 | 15 | return <>{children}; 16 | } 17 | -------------------------------------------------------------------------------- /web/src/app/auth/lib.ts: -------------------------------------------------------------------------------- 1 | export async function requestEmailVerification(email: string) { 2 | return await fetch("/api/auth/request-verify-token", { 3 | headers: { 4 | "Content-Type": "application/json", 5 | }, 6 | method: "POST", 7 | body: JSON.stringify({ 8 | email: email, 9 | }), 10 | }); 11 | } 12 | -------------------------------------------------------------------------------- /web/src/app/auth/login/LoginText.tsx: -------------------------------------------------------------------------------- 1 | "use client"; 2 | 3 | import React, { useContext } from "react"; 4 | import { SettingsContext } from "@/components/settings/SettingsProvider"; 5 | 6 | export const LoginText = () => { 7 | const settings = useContext(SettingsContext); 8 | return ( 9 | <> 10 | Log In to{" "} 11 | {(settings && settings?.enterpriseSettings?.application_name) || "Onyx"} 12 | 13 | ); 14 | }; 15 | -------------------------------------------------------------------------------- /web/src/app/chat/chat_search/LoadingSpinner.tsx: -------------------------------------------------------------------------------- 1 | import React from "react"; 2 | 3 | interface LoadingSpinnerProps { 4 | size?: "small" | "medium" | "large"; 5 | className?: string; 6 | } 7 | 8 | export function LoadingSpinner({ 9 | size = "medium", 10 | className = "", 11 | }: LoadingSpinnerProps) { 12 | const sizeClasses = { 13 | small: "h-4 w-4 border-2", 14 | medium: "h-6 w-6 border-2", 15 | large: "h-8 w-8 border-3", 16 | }; 17 | 18 | return ( 19 |
20 |
23 |
24 | ); 25 | } 26 | -------------------------------------------------------------------------------- /web/src/app/chat/files/images/utils.ts: -------------------------------------------------------------------------------- 1 | export function buildImgUrl(fileId: string) { 2 | return `/api/chat/file/${fileId}`; 3 | } 4 | -------------------------------------------------------------------------------- /web/src/app/chat/folders/interfaces.ts: -------------------------------------------------------------------------------- 1 | import { ChatSession } from "../interfaces"; 2 | 3 | export interface Folder { 4 | folder_id?: number; 5 | folder_name: string; 6 | display_priority: number; 7 | chat_sessions: ChatSession[]; 8 | } 9 | -------------------------------------------------------------------------------- /web/src/app/chat/input-prompts/page.tsx: -------------------------------------------------------------------------------- 1 | "use client"; 2 | 3 | import InputPrompts from "./InputPrompts"; 4 | 5 | export default function InputPromptsPage() { 6 | return ( 7 |
8 |
9 |
10 | 11 |
12 |
13 |
14 | ); 15 | } 16 | -------------------------------------------------------------------------------- /web/src/app/chat/my-documents/WrappedDocuments.tsx: -------------------------------------------------------------------------------- 1 | "use client"; 2 | 3 | import MyDocuments from "./MyDocuments"; 4 | import { BackButton } from "@/components/BackButton"; 5 | import { useRouter } from "next/navigation"; 6 | 7 | export default function WrappedUserDocuments() { 8 | const router = useRouter(); 9 | return ( 10 |
11 |
12 | { 14 | router.push("/chat"); 15 | }} 16 | /> 17 |
18 | 19 |
20 | ); 21 | } 22 | -------------------------------------------------------------------------------- /web/src/app/chat/my-documents/[id]/UserFileContent.tsx: -------------------------------------------------------------------------------- 1 | import { useDocumentsContext } from "../DocumentsContext"; 2 | 3 | export default function UserFolder({ userFileId }: { userFileId: string }) { 4 | const { folders } = useDocumentsContext(); 5 | 6 | return
{folders.length}
; 7 | } 8 | -------------------------------------------------------------------------------- /web/src/app/chat/my-documents/[id]/UserFolder.tsx: -------------------------------------------------------------------------------- 1 | "use client"; 2 | 3 | import UserFolderContent from "./UserFolderContent"; 4 | import { BackButton } from "@/components/BackButton"; 5 | import { useRouter } from "next/navigation"; 6 | export default function WrappedUserFolders({ 7 | userFileId, 8 | }: { 9 | userFileId: string; 10 | }) { 11 | const router = useRouter(); 12 | return ( 13 |
14 |
15 | { 17 | router.push("/chat/my-documents"); 18 | }} 19 | /> 20 |
21 | 22 |
23 | ); 24 | } 25 | -------------------------------------------------------------------------------- /web/src/app/chat/my-documents/page.tsx: -------------------------------------------------------------------------------- 1 | import WrappedDocuments from "./WrappedDocuments"; 2 | import { DocumentsProvider } from "./DocumentsContext"; 3 | 4 | export default async function GalleryPage(props: { 5 | searchParams: Promise<{ [key: string]: string }>; 6 | }) { 7 | return ( 8 | 9 | 10 | 11 | ); 12 | } 13 | -------------------------------------------------------------------------------- /web/src/app/chat/nrf/interfaces.ts: -------------------------------------------------------------------------------- 1 | export interface Shortcut { 2 | name: string; 3 | url: string; 4 | favicon?: string; 5 | } 6 | -------------------------------------------------------------------------------- /web/src/app/chat/nrf/page.tsx: -------------------------------------------------------------------------------- 1 | import { unstable_noStore as noStore } from "next/cache"; 2 | import { InstantSSRAutoRefresh } from "@/components/SSRAutoRefresh"; 3 | import { cookies } from "next/headers"; 4 | import NRFPage from "./NRFPage"; 5 | import { NRFPreferencesProvider } from "../../../components/context/NRFPreferencesContext"; 6 | 7 | export default async function Page() { 8 | noStore(); 9 | const requestCookies = await cookies(); 10 | 11 | return ( 12 |
13 | 14 | 15 | 16 | 17 | 18 |
19 | ); 20 | } 21 | -------------------------------------------------------------------------------- /web/src/app/chat/page.tsx: -------------------------------------------------------------------------------- 1 | import { DocumentsProvider } from "./my-documents/DocumentsContext"; 2 | import { SEARCH_PARAMS } from "@/lib/extension/constants"; 3 | import WrappedChat from "./WrappedChat"; 4 | 5 | export default async function Page(props: { 6 | searchParams: Promise<{ [key: string]: string }>; 7 | }) { 8 | const searchParams = await props.searchParams; 9 | const firstMessage = searchParams.firstMessage; 10 | const defaultSidebarOff = 11 | searchParams[SEARCH_PARAMS.DEFAULT_SIDEBAR_OFF] === "true"; 12 | 13 | return ( 14 | 15 | 19 | 20 | ); 21 | } 22 | -------------------------------------------------------------------------------- /web/src/app/chat/sessionSidebar/ChatGroup.tsx: -------------------------------------------------------------------------------- 1 | import { useRouter } from "next/router"; 2 | import { ChatSession } from "../interfaces"; 3 | 4 | export const ChatGroup = ({ 5 | groupName, 6 | toggled, 7 | chatSessions, 8 | }: { 9 | groupName: string; 10 | toggled: boolean; 11 | chatSessions: ChatSession[]; 12 | }) => { 13 | const router = useRouter(); 14 | 15 | return toggled ? ( 16 |
17 |

{groupName}

18 |
19 | ) : null; 20 | }; 21 | -------------------------------------------------------------------------------- /web/src/app/chat/sessionSidebar/types.ts: -------------------------------------------------------------------------------- 1 | export type pageType = "search" | "chat" | "assistants" | "admin" | "shared"; 2 | -------------------------------------------------------------------------------- /web/src/app/chat/tools/ToolRunningAnimation.tsx: -------------------------------------------------------------------------------- 1 | export function ToolRunDisplay({ 2 | toolName, 3 | toolLogo, 4 | isRunning, 5 | }: { 6 | toolName: string; 7 | toolLogo?: JSX.Element; 8 | isRunning: boolean; 9 | }) { 10 | return ( 11 |
12 | {toolLogo} 13 |
17 | {toolName} 18 |
19 |
20 | ); 21 | } 22 | -------------------------------------------------------------------------------- /web/src/app/chat/tools/constants.ts: -------------------------------------------------------------------------------- 1 | // Tool names as referenced by tool results / tool calls 2 | export const SEARCH_TOOL_NAME = "run_search"; 3 | export const INTERNET_SEARCH_TOOL_NAME = "run_internet_search"; 4 | export const IMAGE_GENERATION_TOOL_NAME = "run_image_generation"; 5 | 6 | // In-code tool IDs that also correspond to the tool's name when associated with a persona 7 | export const SEARCH_TOOL_ID = "SearchTool"; 8 | export const IIMAGE_GENERATION_TOOL_ID = "ImageGenerationTool"; 9 | export const INTERNET_SEARCH_TOOL_ID = "InternetSearchTool"; 10 | -------------------------------------------------------------------------------- /web/src/app/chat/types.ts: -------------------------------------------------------------------------------- 1 | export type FeedbackType = "like" | "dislike"; 2 | export type ChatState = 3 | | "input" 4 | | "loading" 5 | | "streaming" 6 | | "toolBuilding" 7 | | "uploading"; 8 | export interface RegenerationState { 9 | regenerating: boolean; 10 | finalMessageIndex: number; 11 | } 12 | -------------------------------------------------------------------------------- /web/src/app/config/timeRange.tsx: -------------------------------------------------------------------------------- 1 | import { getXDaysAgo, getXYearsAgo } from "@/lib/dateUtils"; 2 | 3 | export const timeRangeValues = [ 4 | { label: "Last 2 years", value: getXYearsAgo(2) }, 5 | { label: "Last year", value: getXYearsAgo(1) }, 6 | { label: "Last 30 days", value: getXDaysAgo(30) }, 7 | { label: "Last 7 days", value: getXDaysAgo(7) }, 8 | { label: "Today", value: getXDaysAgo(1) }, 9 | ]; 10 | -------------------------------------------------------------------------------- /web/src/app/ee/admin/billing/InfoItem.tsx: -------------------------------------------------------------------------------- 1 | import React from "react"; 2 | 3 | interface InfoItemProps { 4 | title: string; 5 | value: string; 6 | } 7 | 8 | export function InfoItem({ title, value }: InfoItemProps) { 9 | return ( 10 |
11 |

{title}

12 |

13 | {value} 14 |

15 |
16 | ); 17 | } 18 | -------------------------------------------------------------------------------- /web/src/app/ee/admin/groups/[groupId]/hook.ts: -------------------------------------------------------------------------------- 1 | import { useUserGroups } from "@/lib/hooks"; 2 | 3 | export const useSpecificUserGroup = (groupId: string) => { 4 | const { data, isLoading, error, refreshUserGroups } = useUserGroups(); 5 | const userGroup = data?.find((group) => group.id.toString() === groupId); 6 | return { 7 | userGroup, 8 | isLoading, 9 | error, 10 | refreshUserGroup: refreshUserGroups, 11 | }; 12 | }; 13 | -------------------------------------------------------------------------------- /web/src/app/ee/admin/groups/lib.ts: -------------------------------------------------------------------------------- 1 | import { UserGroupCreation } from "./types"; 2 | 3 | export const createUserGroup = async (userGroup: UserGroupCreation) => { 4 | return fetch("/api/manage/admin/user-group", { 5 | method: "POST", 6 | headers: { 7 | "Content-Type": "application/json", 8 | }, 9 | body: JSON.stringify(userGroup), 10 | }); 11 | }; 12 | 13 | export const deleteUserGroup = async (userGroupId: number) => { 14 | return fetch(`/api/manage/admin/user-group/${userGroupId}`, { 15 | method: "DELETE", 16 | }); 17 | }; 18 | -------------------------------------------------------------------------------- /web/src/app/ee/admin/groups/types.ts: -------------------------------------------------------------------------------- 1 | export interface UserGroupUpdate { 2 | user_ids: string[]; 3 | cc_pair_ids: number[]; 4 | } 5 | 6 | export interface SetCuratorRequest { 7 | user_id: string; 8 | is_curator: boolean; 9 | } 10 | 11 | export interface UserGroupCreation { 12 | name: string; 13 | user_ids: string[]; 14 | cc_pair_ids: number[]; 15 | } 16 | -------------------------------------------------------------------------------- /web/src/app/ee/admin/layout.tsx: -------------------------------------------------------------------------------- 1 | /* Duplicate of `/app/admin/layout.tsx */ 2 | 3 | import { Layout } from "@/components/admin/Layout"; 4 | 5 | export default async function AdminLayout({ 6 | children, 7 | }: { 8 | children: React.ReactNode; 9 | }) { 10 | return await Layout({ children }); 11 | } 12 | -------------------------------------------------------------------------------- /web/src/app/ee/admin/performance/query-history/constants.ts: -------------------------------------------------------------------------------- 1 | export const LIST_QUERY_HISTORY_URL = "/api/admin/query-history/list"; 2 | export const START_QUERY_HISTORY_EXPORT_URL = 3 | "/api/admin/query-history/start-export"; 4 | export const CHECK_QUERY_HISTORY_EXPORT_STATUS_URL = 5 | "/api/admin/query-history/export-status"; 6 | export const DOWNLOAD_QUERY_HISTORY_URL = "/api/admin/query-history/download"; 7 | export const MAX_RETRIES = 10; 8 | export const RETRY_COOLDOWN_MILLISECONDS = 200; 9 | 10 | export const ITEMS_PER_PAGE = 20; 11 | export const PAGES_PER_BATCH = 2; 12 | export const NUM_IN_PAGE = 10; 13 | 14 | export const PREVIOUS_CSV_TASK_BUTTON_NAME = "View Exports"; 15 | -------------------------------------------------------------------------------- /web/src/app/ee/admin/performance/query-history/page.tsx: -------------------------------------------------------------------------------- 1 | "use client"; 2 | 3 | import { AdminPageTitle } from "@/components/admin/Title"; 4 | import { QueryHistoryTable } from "./QueryHistoryTable"; 5 | import { DatabaseIcon } from "@/components/icons/icons"; 6 | 7 | export default function QueryHistoryPage() { 8 | return ( 9 |
10 | } /> 11 | 12 | 13 |
14 | ); 15 | } 16 | -------------------------------------------------------------------------------- /web/src/app/ee/admin/performance/query-history/types.ts: -------------------------------------------------------------------------------- 1 | import { TaskStatus } from "@/lib/types"; 2 | 3 | export interface TaskQueueState { 4 | task_id: string; 5 | start: string; 6 | end: string; 7 | status: TaskStatus; 8 | start_time: string; 9 | } 10 | 11 | export type StartQueryHistoryExportResponse = { request_id: string }; 12 | 13 | export type CheckQueryHistoryExportStatusResponse = { 14 | status: TaskStatus; 15 | }; 16 | 17 | // The status of the spinner. 18 | // If it's "static", then no spinning animation should be shown. 19 | // Otherwise, the spinning animation should be shown. 20 | export type SpinnerStatus = "static" | "spinning"; 21 | -------------------------------------------------------------------------------- /web/src/app/ee/admin/performance/query-history/utils.ts: -------------------------------------------------------------------------------- 1 | import { DateRange } from "../../../../../components/dateRangeSelectors/AdminDateRangeSelector"; 2 | import { START_QUERY_HISTORY_EXPORT_URL } from "./constants"; 3 | 4 | export const withRequestId = (url: string, requestId: string): string => 5 | `${url}?request_id=${requestId}`; 6 | 7 | export const withDateRange = (dateRange: DateRange): string => { 8 | if (!dateRange) { 9 | return START_QUERY_HISTORY_EXPORT_URL; 10 | } 11 | 12 | const { from, to } = dateRange; 13 | 14 | const fromString = from.toISOString(); 15 | const toString = to.toISOString(); 16 | 17 | return `${START_QUERY_HISTORY_EXPORT_URL}?start=${fromString}&end=${toString}`; 18 | }; 19 | -------------------------------------------------------------------------------- /web/src/app/ee/admin/whitelabeling/page.tsx: -------------------------------------------------------------------------------- 1 | import { WhitelabelingForm } from "./WhitelabelingForm"; 2 | import { AdminPageTitle } from "@/components/admin/Title"; 3 | import { PaintingIcon } from "@/components/icons/icons"; 4 | 5 | export default async function Whitelabeling() { 6 | return ( 7 |
8 | } 11 | /> 12 | 13 | 14 |
15 | ); 16 | } 17 | -------------------------------------------------------------------------------- /web/src/app/ee/assistants/stats/[id]/WrappedAssistantsStats.tsx: -------------------------------------------------------------------------------- 1 | "use client"; 2 | 3 | import SidebarWrapper from "@/app/assistants/SidebarWrapper"; 4 | import { AssistantStats } from "./AssistantStats"; 5 | 6 | export default function WrappedAssistantsStats({ 7 | assistantId, 8 | }: { 9 | assistantId: number; 10 | }) { 11 | return ( 12 | 13 | 14 | 15 | ); 16 | } 17 | -------------------------------------------------------------------------------- /web/src/app/ee/layout.tsx: -------------------------------------------------------------------------------- 1 | import { SERVER_SIDE_ONLY__PAID_ENTERPRISE_FEATURES_ENABLED } from "@/lib/constants"; 2 | 3 | export default async function AdminLayout({ 4 | children, 5 | }: { 6 | children: React.ReactNode; 7 | }) { 8 | if (!SERVER_SIDE_ONLY__PAID_ENTERPRISE_FEATURES_ENABLED) { 9 | return ( 10 |
11 |
12 | This funcitonality is only available in the Enterprise Edition :( 13 |
14 |
15 | ); 16 | } 17 | 18 | return children; 19 | } 20 | -------------------------------------------------------------------------------- /web/src/app/not-found.tsx: -------------------------------------------------------------------------------- 1 | import { redirect } from "next/navigation"; 2 | 3 | export default function NotFound() { 4 | redirect("/auth/login"); 5 | } 6 | -------------------------------------------------------------------------------- /web/src/app/page.tsx: -------------------------------------------------------------------------------- 1 | import { redirect } from "next/navigation"; 2 | 3 | export default async function Page() { 4 | redirect("/chat"); 5 | } 6 | -------------------------------------------------------------------------------- /web/src/app/web-vitals.tsx: -------------------------------------------------------------------------------- 1 | "use client"; 2 | import { useReportWebVitals } from "next/web-vitals"; 3 | import { usePostHog } from "posthog-js/react"; 4 | 5 | export function WebVitals() { 6 | const posthog = usePostHog(); 7 | 8 | useReportWebVitals((metric) => { 9 | posthog.capture(metric.name, metric); 10 | }); 11 | return <>; 12 | } 13 | -------------------------------------------------------------------------------- /web/src/components/EditButton.tsx: -------------------------------------------------------------------------------- 1 | "use client"; 2 | 3 | import { FiEdit2 } from "react-icons/fi"; 4 | 5 | export function EditButton({ onClick }: { onClick: () => void }) { 6 | return ( 7 |
21 | 22 | Edit 23 |
24 | ); 25 | } 26 | -------------------------------------------------------------------------------- /web/src/components/ErrorCallout.tsx: -------------------------------------------------------------------------------- 1 | import { Callout } from "@/components/ui/callout"; 2 | import { FiAlertTriangle } from "react-icons/fi"; 3 | 4 | export function ErrorCallout({ 5 | errorTitle, 6 | errorMsg, 7 | }: { 8 | errorTitle?: string; 9 | errorMsg?: string; 10 | }) { 11 | return ( 12 |
13 | } 17 | type="danger" 18 | > 19 | {errorMsg} 20 | 21 |
22 | ); 23 | } 24 | -------------------------------------------------------------------------------- /web/src/components/OnyxInitializingLoader.tsx: -------------------------------------------------------------------------------- 1 | import { Logo } from "./logo/Logo"; 2 | import { useContext } from "react"; 3 | import { SettingsContext } from "./settings/SettingsProvider"; 4 | 5 | export function OnyxInitializingLoader() { 6 | const settings = useContext(SettingsContext); 7 | 8 | return ( 9 |
10 | 11 |

12 | Initializing {settings?.enterpriseSettings?.application_name ?? "Onyx"} 13 |

14 |
15 | ); 16 | } 17 | -------------------------------------------------------------------------------- /web/src/components/SourceIcon.tsx: -------------------------------------------------------------------------------- 1 | "use client"; 2 | 3 | import { getSourceMetadata } from "@/lib/sources"; 4 | import { ValidSources } from "@/lib/types"; 5 | 6 | export function SourceIcon({ 7 | sourceType, 8 | iconSize, 9 | }: { 10 | sourceType: ValidSources; 11 | iconSize: number; 12 | }) { 13 | return getSourceMetadata(sourceType).icon({ 14 | size: iconSize, 15 | }); 16 | } 17 | -------------------------------------------------------------------------------- /web/src/components/Spinner.tsx: -------------------------------------------------------------------------------- 1 | import "./spinner.css"; 2 | 3 | export const Spinner = () => { 4 | return ( 5 |
6 |
7 |
8 | ); 9 | }; 10 | -------------------------------------------------------------------------------- /web/src/components/TemporaryLoadingModal.tsx: -------------------------------------------------------------------------------- 1 | export default function TemporaryLoadingModal({ 2 | content, 3 | }: { 4 | content: string; 5 | }) { 6 | return ( 7 |
8 |
9 |
10 |

11 | {content} 12 |

13 |
14 |
15 | ); 16 | } 17 | -------------------------------------------------------------------------------- /web/src/components/admin/CardSection.tsx: -------------------------------------------------------------------------------- 1 | import { cn } from "@/lib/utils"; 2 | 3 | // Used for all admin page sections 4 | export default function CardSection({ 5 | children, 6 | className, 7 | }: { 8 | children: React.ReactNode; 9 | className?: string; 10 | }) { 11 | return ( 12 |
18 | {children} 19 |
20 | ); 21 | } 22 | -------------------------------------------------------------------------------- /web/src/components/admin/connectors/AttachCredentialPopup.tsx: -------------------------------------------------------------------------------- 1 | export const AttachCredentialPopup = () => { 2 | return
; 3 | }; 4 | -------------------------------------------------------------------------------- /web/src/components/admin/connectors/CustomButton.tsx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/onyx-dot-app/onyx/4c71a5f5ff013ed87bf3422b2b8a87b46f024a0a/web/src/components/admin/connectors/CustomButton.tsx -------------------------------------------------------------------------------- /web/src/components/admin/connectors/IsPublicField.tsx: -------------------------------------------------------------------------------- 1 | import { BooleanFormField } from "./Field"; 2 | 3 | export default function IsPublicField({ 4 | name = "is_public", 5 | }: { 6 | name?: string; 7 | }) { 8 | return ( 9 | 19 | ); 20 | } 21 | -------------------------------------------------------------------------------- /web/src/components/admin/connectors/buttons/AttachCredentialButtonForTable.tsx: -------------------------------------------------------------------------------- 1 | interface Props { 2 | onClick: () => void; 3 | } 4 | 5 | export const AttachCredentialButtonForTable = ({ onClick }: Props) => { 6 | return ( 7 | 19 | ); 20 | }; 21 | -------------------------------------------------------------------------------- /web/src/components/admin/connectors/buttons/IndexButtonForTable.tsx: -------------------------------------------------------------------------------- 1 | interface Props { 2 | onClick: () => void; 3 | } 4 | 5 | export const IndexButtonForTable = ({ onClick }: Props) => { 6 | return ( 7 | 19 | ); 20 | }; 21 | -------------------------------------------------------------------------------- /web/src/components/admin/connectors/types.ts: -------------------------------------------------------------------------------- 1 | import * as Yup from "yup"; 2 | 3 | export type FormBodyBuilder = ( 4 | values: T 5 | ) => JSX.Element; 6 | 7 | export type RequireAtLeastOne = Pick< 8 | T, 9 | Exclude 10 | > & 11 | { 12 | [K in Keys]-?: Required> & Partial>>; 13 | }[Keys]; 14 | -------------------------------------------------------------------------------- /web/src/components/admin/users/CenteredPageSelector.tsx: -------------------------------------------------------------------------------- 1 | import { 2 | PageSelector, 3 | type PageSelectorProps as Props, 4 | } from "@/components/PageSelector"; 5 | 6 | const CenteredPageSelector = ({ 7 | currentPage, 8 | totalPages, 9 | onPageChange, 10 | }: Props) => ( 11 |
12 | 17 |
18 | ); 19 | 20 | export default CenteredPageSelector; 21 | -------------------------------------------------------------------------------- /web/src/components/chat/BlurBackground.tsx: -------------------------------------------------------------------------------- 1 | export default function BlurBackground({ 2 | visible, 3 | onClick, 4 | }: { 5 | visible: boolean; 6 | onClick: () => void; 7 | }) { 8 | return ( 9 |
18 | ); 19 | } 20 | -------------------------------------------------------------------------------- /web/src/components/chat/sources/SidebarSource.tsx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/onyx-dot-app/onyx/4c71a5f5ff013ed87bf3422b2b8a87b46f024a0a/web/src/components/chat/sources/SidebarSource.tsx -------------------------------------------------------------------------------- /web/src/components/credentials/types.ts: -------------------------------------------------------------------------------- 1 | export interface dictionaryType { 2 | [key: string]: string; 3 | } 4 | export interface formType extends dictionaryType { 5 | name: string; 6 | } 7 | 8 | export type ActionType = "create" | "createAndSwap"; 9 | -------------------------------------------------------------------------------- /web/src/components/dateRangeSelectors/dateUtils.ts: -------------------------------------------------------------------------------- 1 | export function getXDaysAgo(daysAgo: number) { 2 | const today = new Date(); 3 | const daysAgoDate = new Date(today); 4 | daysAgoDate.setDate(today.getDate() - daysAgo); 5 | return daysAgoDate; 6 | } 7 | 8 | export function convertDateToEndOfDay(date?: Date | null) { 9 | if (!date) { 10 | return date; 11 | } 12 | 13 | const dateCopy = new Date(date); 14 | dateCopy.setHours(23, 59, 59, 999); 15 | return dateCopy; 16 | } 17 | 18 | export function convertDateToStartOfDay(date?: Date | null) { 19 | if (!date) { 20 | return date; 21 | } 22 | 23 | const dateCopy = new Date(date); 24 | dateCopy.setHours(0, 0, 0, 0); 25 | return dateCopy; 26 | } 27 | -------------------------------------------------------------------------------- /web/src/components/errorPages/CloudErrorPage.tsx: -------------------------------------------------------------------------------- 1 | "use client"; 2 | import ErrorPageLayout from "./ErrorPageLayout"; 3 | 4 | export default function CloudError() { 5 | return ( 6 | 7 |

8 | Maintenance in Progress 9 |

10 |
11 |

12 | Onyx is currently in a maintenance window. Please check back in a 13 | couple of minutes. 14 |

15 |

16 | We apologize for any inconvenience this may cause and appreciate your 17 | patience. 18 |

19 |
20 |
21 | ); 22 | } 23 | -------------------------------------------------------------------------------- /web/src/components/errorPages/ErrorPageLayout.tsx: -------------------------------------------------------------------------------- 1 | import React from "react"; 2 | import { LogoType } from "../logo/Logo"; 3 | 4 | interface ErrorPageLayoutProps { 5 | children: React.ReactNode; 6 | } 7 | 8 | export default function ErrorPageLayout({ children }: ErrorPageLayoutProps) { 9 | return ( 10 |
11 |
12 | 13 |
14 |
15 |
{children}
16 |
17 |
18 | ); 19 | } 20 | -------------------------------------------------------------------------------- /web/src/components/header/HeaderWrapper.tsx: -------------------------------------------------------------------------------- 1 | export function HeaderWrapper({ 2 | children, 3 | }: { 4 | children: JSX.Element | string; 5 | }) { 6 | return ( 7 |
8 |
{children}
9 |
10 | ); 11 | } 12 | -------------------------------------------------------------------------------- /web/src/components/initialSetup/welcome/constants.ts: -------------------------------------------------------------------------------- 1 | export const COMPLETED_WELCOME_FLOW_COOKIE = "completed_welcome_flow"; 2 | -------------------------------------------------------------------------------- /web/src/components/loading.css: -------------------------------------------------------------------------------- 1 | .loading { 2 | font-size: 1.5rem; 3 | font-weight: bold; 4 | } 5 | 6 | .dots { 7 | animation: blink 1s linear infinite; 8 | } 9 | 10 | @keyframes blink { 11 | 0%, 12 | 100% { 13 | opacity: 1; 14 | } 15 | 50% { 16 | opacity: 0.5; 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /web/src/components/popover/styles.css: -------------------------------------------------------------------------------- 1 | /* styles.css */ 2 | 3 | .PopoverContentMatchWidth { 4 | width: var(--radix-popover-trigger-width); 5 | } 6 | 7 | .PopoverContent[data-side="top"] { 8 | transform: translateY(var(--radix-popover-trigger-height) px); 9 | font-family: sans-serif; 10 | } 11 | -------------------------------------------------------------------------------- /web/src/components/resizable/constants.ts: -------------------------------------------------------------------------------- 1 | export const DOCUMENT_SIDEBAR_WIDTH_COOKIE_NAME = "documentSidebarWidth"; 2 | export const SIDEBAR_TOGGLED_COOKIE_NAME = "sidebarIsToggled"; 3 | export const PRO_SEARCH_TOGGLED_COOKIE_NAME = "proSearchIsToggled"; 4 | -------------------------------------------------------------------------------- /web/src/components/search/DocumentUpdatedAtBadge.tsx: -------------------------------------------------------------------------------- 1 | import { timeAgo } from "@/lib/time"; 2 | import { MetadataBadge } from "../MetadataBadge"; 3 | 4 | export function DocumentUpdatedAtBadge({ 5 | updatedAt, 6 | modal, 7 | }: { 8 | updatedAt: string; 9 | modal?: boolean; 10 | }) { 11 | return ( 12 | 16 | ); 17 | } 18 | -------------------------------------------------------------------------------- /web/src/components/settings/usePaidEnterpriseFeaturesEnabled.ts: -------------------------------------------------------------------------------- 1 | "use client"; 2 | 3 | import { useContext } from "react"; 4 | import { SettingsContext } from "./SettingsProvider"; 5 | 6 | export function usePaidEnterpriseFeaturesEnabled() { 7 | const combinedSettings = useContext(SettingsContext); 8 | if (!combinedSettings) { 9 | return null; 10 | } 11 | return combinedSettings.enterpriseSettings !== null; 12 | } 13 | -------------------------------------------------------------------------------- /web/src/components/spinner.css: -------------------------------------------------------------------------------- 1 | .loader { 2 | border-top-color: #2876aa; 3 | -webkit-animation: spinner 1.5s linear infinite; 4 | animation: spinner 1.5s linear infinite; 5 | } 6 | 7 | @-webkit-keyframes spinner { 8 | 0% { 9 | -webkit-transform: rotate(0deg); 10 | } 11 | 100% { 12 | -webkit-transform: rotate(360deg); 13 | } 14 | } 15 | 16 | @keyframes spinner { 17 | 0% { 18 | transform: rotate(0deg); 19 | } 20 | 100% { 21 | transform: rotate(360deg); 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /web/src/components/table/DragHandle.tsx: -------------------------------------------------------------------------------- 1 | import React from "react"; 2 | import { MdDragIndicator } from "react-icons/md"; 3 | 4 | interface DragHandleProps extends React.HTMLAttributes { 5 | isDragging?: boolean; 6 | size?: number; 7 | } 8 | 9 | export const DragHandle: React.FC = ({ 10 | isDragging, 11 | size = 16, 12 | ...props 13 | }) => { 14 | return ( 15 |
21 | 22 |
23 | ); 24 | }; 25 | -------------------------------------------------------------------------------- /web/src/components/table/interfaces.ts: -------------------------------------------------------------------------------- 1 | import { UniqueIdentifier } from "@dnd-kit/core"; 2 | 3 | export interface Row { 4 | id: UniqueIdentifier; 5 | cells: (JSX.Element | string)[]; 6 | staticModifiers?: [number, string][]; 7 | } 8 | -------------------------------------------------------------------------------- /web/src/components/theme/ThemeProvider.tsx: -------------------------------------------------------------------------------- 1 | "use client"; 2 | 3 | import * as React from "react"; 4 | import { ThemeProvider as NextThemesProvider } from "next-themes"; 5 | 6 | export function ThemeProvider({ 7 | children, 8 | ...props 9 | }: React.ComponentProps) { 10 | return {children}; 11 | } 12 | -------------------------------------------------------------------------------- /web/src/components/tools/ToolResult.tsx: -------------------------------------------------------------------------------- 1 | import React from "react"; 2 | import ExpandableContentWrapper, { 3 | ContentComponentProps, 4 | } from "./ExpandableContentWrapper"; 5 | import { FileDescriptor } from "@/app/chat/interfaces"; 6 | 7 | interface ToolResultProps { 8 | csvFileDescriptor: FileDescriptor; 9 | close: () => void; 10 | contentComponent: React.ComponentType; 11 | } 12 | 13 | const ToolResult: React.FC = ({ 14 | csvFileDescriptor, 15 | close, 16 | contentComponent, 17 | }) => { 18 | return ( 19 | 24 | ); 25 | }; 26 | 27 | export default ToolResult; 28 | -------------------------------------------------------------------------------- /web/src/components/ui/collapsible.tsx: -------------------------------------------------------------------------------- 1 | "use client"; 2 | 3 | import * as CollapsiblePrimitive from "@radix-ui/react-collapsible"; 4 | 5 | const Collapsible = CollapsiblePrimitive.Root; 6 | 7 | const CollapsibleTrigger = CollapsiblePrimitive.CollapsibleTrigger; 8 | 9 | const CollapsibleContent = CollapsiblePrimitive.CollapsibleContent; 10 | 11 | export { Collapsible, CollapsibleTrigger, CollapsibleContent }; 12 | -------------------------------------------------------------------------------- /web/src/components/ui/createButton.tsx: -------------------------------------------------------------------------------- 1 | import Link from "next/link"; 2 | import { Button } from "@/components/ui/button"; 3 | import { FiPlusCircle } from "react-icons/fi"; 4 | interface CreateButtonProps { 5 | href?: string; 6 | onClick?: () => void; 7 | text?: string; 8 | } 9 | 10 | export default function CreateButton({ 11 | href, 12 | onClick, 13 | text = "Create", 14 | }: CreateButtonProps) { 15 | const content = ( 16 | 20 | ); 21 | 22 | if (href) { 23 | return {content}; 24 | } 25 | 26 | return content; 27 | } 28 | -------------------------------------------------------------------------------- /web/src/components/ui/text.tsx: -------------------------------------------------------------------------------- 1 | import { cn } from "@/lib/utils"; 2 | 3 | export default function Text({ 4 | children, 5 | className, 6 | }: { 7 | children: React.ReactNode; 8 | className?: string; 9 | }) { 10 | return

{children}

; 11 | } 12 | -------------------------------------------------------------------------------- /web/src/components/ui/title.tsx: -------------------------------------------------------------------------------- 1 | import { cn } from "@/lib/utils"; 2 | 3 | export default function Title({ 4 | children, 5 | className, 6 | size = "sm", 7 | }: { 8 | children: React.ReactNode; 9 | className?: string; 10 | size?: "lg" | "md" | "sm"; 11 | }) { 12 | return ( 13 |

22 | {children} 23 |

24 | ); 25 | } 26 | -------------------------------------------------------------------------------- /web/src/lib/admin/users/userMutationFetcher.ts: -------------------------------------------------------------------------------- 1 | const userMutationFetcher = async ( 2 | url: string, 3 | { arg }: { arg: { user_email: string; new_role?: string; method?: string } } 4 | ) => { 5 | const { method = "PATCH", ...body } = arg; 6 | return fetch(url, { 7 | method, 8 | headers: { 9 | "Content-Type": "application/json", 10 | }, 11 | body: JSON.stringify(body), 12 | }).then(async (res) => { 13 | if (res.ok) return res.json(); 14 | 15 | const errorDetail = (await res.json()).detail; 16 | throw Error(errorDetail); 17 | }); 18 | }; 19 | 20 | export default userMutationFetcher; 21 | -------------------------------------------------------------------------------- /web/src/lib/assistants/checkOwnership.ts: -------------------------------------------------------------------------------- 1 | import { Persona } from "@/app/admin/assistants/interfaces"; 2 | import { User } from "../types"; 3 | import { checkUserIsNoAuthUser } from "../user"; 4 | 5 | export function checkUserOwnsAssistant(user: User | null, assistant: Persona) { 6 | return checkUserIdOwnsAssistant(user?.id, assistant); 7 | } 8 | 9 | export function checkUserIdOwnsAssistant( 10 | userId: string | undefined, 11 | assistant: Persona 12 | ) { 13 | return ( 14 | (!userId || 15 | checkUserIsNoAuthUser(userId) || 16 | assistant.owner?.id === userId) && 17 | !assistant.builtin_persona 18 | ); 19 | } 20 | -------------------------------------------------------------------------------- /web/src/lib/assistants/fetchAssistantsSS.ts: -------------------------------------------------------------------------------- 1 | import { Persona } from "@/app/admin/assistants/interfaces"; 2 | import { fetchSS } from "../utilsSS"; 3 | 4 | export type FetchAssistantsResponse = [Persona[], string | null]; 5 | 6 | export async function fetchAssistantsSS(): Promise { 7 | const response = await fetchSS("/persona"); 8 | if (response.ok) { 9 | return [(await response.json()) as Persona[], null]; 10 | } 11 | return [[], (await response.json()).detail || "Unknown Error"]; 12 | } 13 | -------------------------------------------------------------------------------- /web/src/lib/assistants/orderAssistants.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/onyx-dot-app/onyx/4c71a5f5ff013ed87bf3422b2b8a87b46f024a0a/web/src/lib/assistants/orderAssistants.ts -------------------------------------------------------------------------------- /web/src/lib/billing/interfaces.ts: -------------------------------------------------------------------------------- 1 | export interface BillingInformation { 2 | status: string; 3 | trial_end: Date | null; 4 | current_period_end: Date; 5 | payment_method_enabled: boolean; 6 | cancel_at_period_end: boolean; 7 | current_period_start: Date; 8 | number_of_seats: number; 9 | canceled_at: Date | null; 10 | trial_start: Date | null; 11 | seats: number; 12 | } 13 | 14 | export enum BillingStatus { 15 | TRIALING = "trialing", 16 | ACTIVE = "active", 17 | CANCELLED = "cancelled", 18 | EXPIRED = "expired", 19 | } 20 | -------------------------------------------------------------------------------- /web/src/lib/chat/fetchAssistantsGalleryData.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/onyx-dot-app/onyx/4c71a5f5ff013ed87bf3422b2b8a87b46f024a0a/web/src/lib/chat/fetchAssistantsGalleryData.ts -------------------------------------------------------------------------------- /web/src/lib/clickUtils.ts: -------------------------------------------------------------------------------- 1 | import { AppRouterInstance } from "next/dist/shared/lib/app-router-context.shared-runtime"; 2 | import { MouseEventHandler } from "react"; 3 | 4 | export function buildRedirectClickHandler( 5 | url: string, 6 | router?: AppRouterInstance 7 | ) { 8 | const redirectHandler: MouseEventHandler = (event) => { 9 | if (event.button === 1 || event.shiftKey) { 10 | window.open(url, "_blank"); 11 | } 12 | 13 | if (router) { 14 | router.push(url); 15 | } else { 16 | window.open(url); 17 | } 18 | }; 19 | return redirectHandler; 20 | } 21 | -------------------------------------------------------------------------------- /web/src/lib/connectors/AutoSyncOptionFields.tsx: -------------------------------------------------------------------------------- 1 | import { ValidAutoSyncSource } from "@/lib/types"; 2 | 3 | // The first key is the connector type, and the second key is the field name 4 | export const autoSyncConfigBySource: Record< 5 | ValidAutoSyncSource, 6 | Record< 7 | string, 8 | { 9 | label: string; 10 | subtext: JSX.Element; 11 | } 12 | > 13 | > = { 14 | confluence: {}, 15 | google_drive: {}, 16 | gmail: {}, 17 | slack: {}, 18 | salesforce: {}, 19 | }; 20 | -------------------------------------------------------------------------------- /web/src/lib/documentUtils.ts: -------------------------------------------------------------------------------- 1 | import { OnyxDocument } from "./search/interfaces"; 2 | 3 | export function removeDuplicateDocs( 4 | documents: OnyxDocument[], 5 | agentic?: boolean, 6 | relevance?: any 7 | ) { 8 | const seen = new Set(); 9 | const output: OnyxDocument[] = []; 10 | documents.forEach((document) => { 11 | if ( 12 | document.document_id && 13 | !seen.has(document.document_id) && 14 | (!agentic || (agentic && relevance && relevance[document.document_id])) 15 | ) { 16 | output.push(document); 17 | seen.add(document.document_id); 18 | } 19 | }); 20 | return output; 21 | } 22 | -------------------------------------------------------------------------------- /web/src/lib/drag/constants.ts: -------------------------------------------------------------------------------- 1 | export const CHAT_SESSION_ID_KEY = "chatSessionId"; 2 | export const FOLDER_ID_KEY = "folderId"; 3 | -------------------------------------------------------------------------------- /web/src/lib/fetchUtils.ts: -------------------------------------------------------------------------------- 1 | export const getErrorMsg = async (response: Response) => { 2 | if (response.ok) { 3 | return null; 4 | } 5 | const responseJson = await response.json(); 6 | return responseJson.message || responseJson.detail || "Unknown error"; 7 | }; 8 | -------------------------------------------------------------------------------- /web/src/lib/fileUtils.ts: -------------------------------------------------------------------------------- 1 | export function getNameFromPath(path: string) { 2 | const pathParts = path.split("/"); 3 | return pathParts[pathParts.length - 1]; 4 | } 5 | -------------------------------------------------------------------------------- /web/src/lib/generated/README.md: -------------------------------------------------------------------------------- 1 | - Generated Files 2 | * Generated files live here. This directory should be git ignored. -------------------------------------------------------------------------------- /web/src/lib/indexAttempt.ts: -------------------------------------------------------------------------------- 1 | import { IndexAttemptSnapshot } from "./types"; 2 | 3 | export const getDocsProcessedPerMinute = ( 4 | indexAttempt: IndexAttemptSnapshot | null 5 | ): number | null => { 6 | if ( 7 | !indexAttempt || 8 | !indexAttempt.time_started || 9 | !indexAttempt.time_updated || 10 | indexAttempt.total_docs_indexed === 0 11 | ) { 12 | return null; 13 | } 14 | 15 | const timeStarted = new Date(indexAttempt.time_started); 16 | const timeUpdated = new Date(indexAttempt.time_updated); 17 | const timeDiff = timeUpdated.getTime() - timeStarted.getTime(); 18 | const seconds = timeDiff / 1000; 19 | return (indexAttempt.total_docs_indexed / seconds) * 60; 20 | }; 21 | -------------------------------------------------------------------------------- /web/src/lib/llm/fetchLLMs.ts: -------------------------------------------------------------------------------- 1 | import { LLMProviderDescriptor } from "@/app/admin/configuration/llm/interfaces"; 2 | import { fetchSS } from "../utilsSS"; 3 | 4 | export async function fetchLLMProvidersSS() { 5 | const response = await fetchSS("/llm/provider"); 6 | if (response.ok) { 7 | return (await response.json()) as LLMProviderDescriptor[]; 8 | } 9 | return []; 10 | } 11 | -------------------------------------------------------------------------------- /web/src/lib/search/chatSessions.ts: -------------------------------------------------------------------------------- 1 | export async function createChatSession(personaId?: number | null) { 2 | const chatSessionResponse = await fetch("/api/chat/create-chat-session", { 3 | method: "POST", 4 | body: JSON.stringify({ 5 | persona_id: personaId, 6 | }), 7 | headers: { 8 | "Content-Type": "application/json", 9 | }, 10 | }); 11 | return chatSessionResponse; 12 | } 13 | -------------------------------------------------------------------------------- /web/src/lib/tags/tagUtils.ts: -------------------------------------------------------------------------------- 1 | import { Tag } from "../types"; 2 | 3 | export async function getValidTags( 4 | matchPattern: string | null = null, 5 | sources: string[] | null = null 6 | ): Promise { 7 | const params = new URLSearchParams(); 8 | if (matchPattern) params.append("match_pattern", matchPattern); 9 | if (sources) sources.forEach((source) => params.append("sources", source)); 10 | 11 | const response = await fetch(`/api/query/valid-tags?${params.toString()}`, { 12 | method: "GET", 13 | headers: { 14 | "Content-Type": "application/json", 15 | }, 16 | }); 17 | 18 | if (!response.ok) { 19 | throw new Error("Failed to fetch valid tags"); 20 | } 21 | 22 | return (await response.json()).tags; 23 | } 24 | -------------------------------------------------------------------------------- /web/src/lib/updateSlackBotField.ts: -------------------------------------------------------------------------------- 1 | import { SlackBot } from "@/lib/types"; 2 | 3 | export async function updateSlackBotField( 4 | slackBot: SlackBot, 5 | field: keyof SlackBot, 6 | value: any 7 | ): Promise { 8 | return fetch(`/api/manage/admin/slack-app/bots/${slackBot.id}`, { 9 | method: "PATCH", 10 | headers: { 11 | "Content-Type": "application/json", 12 | }, 13 | body: JSON.stringify({ 14 | ...slackBot, 15 | [field]: value, 16 | }), 17 | }); 18 | } 19 | -------------------------------------------------------------------------------- /web/src/lib/urlBuilder.ts: -------------------------------------------------------------------------------- 1 | type QueryParams = { 2 | [key: string]: string | number | boolean | null | undefined; 3 | }; 4 | 5 | export function buildApiPath(base: string, params?: QueryParams): string { 6 | let queryString = ""; 7 | if (params) { 8 | const entries = Object.entries(params) 9 | .filter(([key, value]) => value !== null && value !== undefined) 10 | .map( 11 | ([key, value]) => 12 | `${encodeURIComponent(key)}=${encodeURIComponent(value!.toString())}` 13 | ); 14 | 15 | if (entries.length > 0) { 16 | queryString = `?${entries.join("&")}`; 17 | } 18 | } 19 | 20 | return `${base}${queryString}`; 21 | } 22 | -------------------------------------------------------------------------------- /web/src/lib/users/UserSettings.tsx: -------------------------------------------------------------------------------- 1 | export async function setUserDefaultModel( 2 | model: string | null 3 | ): Promise { 4 | const response = await fetch(`/api/user/default-model`, { 5 | method: "PATCH", 6 | headers: { 7 | "Content-Type": "application/json", 8 | }, 9 | body: JSON.stringify({ default_model: model }), 10 | }); 11 | 12 | return response; 13 | } 14 | -------------------------------------------------------------------------------- /web/src/lib/users/fetchUserData.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/onyx-dot-app/onyx/4c71a5f5ff013ed87bf3422b2b8a87b46f024a0a/web/src/lib/users/fetchUserData.ts -------------------------------------------------------------------------------- /web/tailwind-themes/custom/.gitignore: -------------------------------------------------------------------------------- 1 | # Ignore everything in this directory 2 | * 3 | # Except this file 4 | !.gitignore -------------------------------------------------------------------------------- /web/tailwind.config.js: -------------------------------------------------------------------------------- 1 | var merge = require("lodash/merge"); 2 | 3 | // Use relative paths for imports 4 | const baseThemes = require("./tailwind-themes/tailwind.config.js"); 5 | 6 | const customThemes = process.env.NEXT_PUBLIC_THEME 7 | ? require( 8 | process.env.NEXT_PUBLIC_THEME 9 | ? `./tailwind-themes/custom/${process.env.NEXT_PUBLIC_THEME}/tailwind.config.js` 10 | : "./tailwind-themes/custom/default/tailwind.config.js" 11 | ) 12 | : null; 13 | 14 | /** @type {import('tailwindcss').Config} */ 15 | module.exports = customThemes ? merge(baseThemes, customThemes) : baseThemes; 16 | -------------------------------------------------------------------------------- /web/tests/e2e/admin_auth.setup.ts: -------------------------------------------------------------------------------- 1 | // dependency for all admin user tests 2 | import { test as setup } from "@chromatic-com/playwright"; 3 | 4 | setup("authenticate as admin", async ({ browser }) => { 5 | const context = await browser.newContext({ storageState: "admin_auth.json" }); 6 | const page = await context.newPage(); 7 | await page.goto("http://localhost:3000/chat"); 8 | await page.waitForURL("http://localhost:3000/chat"); 9 | }); 10 | -------------------------------------------------------------------------------- /web/tests/e2e/constants.js: -------------------------------------------------------------------------------- 1 | export const TEST_USER_CREDENTIALS = { 2 | email: "user1@test.com", 3 | password: "User1Password123!", 4 | }; 5 | 6 | export const TEST_ADMIN_CREDENTIALS = { 7 | email: "admin_user@test.com", 8 | password: "TestPassword123!", 9 | }; 10 | 11 | export const TEST_ADMIN2_CREDENTIALS = { 12 | email: "admin2_user@test.com", 13 | password: "TestPassword123!", 14 | }; 15 | --------------------------------------------------------------------------------