gitextract_vw5kjonn/ ├── .dockerignore ├── .github/ │ ├── actions/ │ │ └── decide/ │ │ ├── .gitignore │ │ ├── action.yml │ │ ├── index.js │ │ └── package.json │ └── workflows/ │ ├── backend-test.yml │ ├── deploy.yml │ ├── regression.yml │ ├── release.yml │ └── verify.yml ├── .gitignore ├── CONTRIBUTING.md ├── LICENSE.txt ├── README.md ├── backend/ │ ├── .dockerignore │ ├── .gitignore │ ├── .pre-commit-config.yaml │ ├── .python-version │ ├── Dockerfile │ ├── Makefile │ ├── README.md │ ├── alembic.ini │ ├── app/ │ │ ├── __init__.py │ │ ├── alembic/ │ │ │ ├── env.py │ │ │ ├── script.py.mako │ │ │ └── versions/ │ │ │ ├── 00534dc350db_.py │ │ │ ├── 041fbef26e3a_.py │ │ │ ├── 04947f9684ab_public_chat_engine.py │ │ │ ├── 04d4f05116ed_.py │ │ │ ├── 04d81be446c3_.py │ │ │ ├── 10f36e8a25c4_.py │ │ │ ├── 197bc8be72d1_.py │ │ │ ├── 211f3c5aa125_chunking_settings.py │ │ │ ├── 27a6723b767a_.py │ │ │ ├── 2adc0b597dcd_int_enum_type.py │ │ │ ├── 2fc10c21bf88_.py │ │ │ ├── 749767db5505_add_recommend_questions.py │ │ │ ├── 8093333c0d87_.py │ │ │ ├── 830fd9c44f39_.py │ │ │ ├── 94b198e20946_.py │ │ │ ├── a54f966436ce_evaluation.py │ │ │ ├── a8c79553c9f6_.py │ │ │ ├── ac6e4d58580d_.py │ │ │ ├── bd17a4ebccc5_.py │ │ │ ├── c7f016a904c1_.py │ │ │ ├── d2ad44deab20_multiple_kb.py │ │ │ ├── dfee070b8abd_.py │ │ │ ├── e32f1e546eec_.py │ │ │ └── eb0b85608c0a_.py │ │ ├── api/ │ │ │ ├── __init__.py │ │ │ ├── admin_routes/ │ │ │ │ ├── __init__.py │ │ │ │ ├── chat/ │ │ │ │ │ ├── __init__.py │ │ │ │ │ └── routes.py │ │ │ │ ├── chat_engine.py │ │ │ │ ├── document/ │ │ │ │ │ ├── __init__.py │ │ │ │ │ └── routes.py │ │ │ │ ├── embedding_model/ │ │ │ │ │ ├── __init__.py │ │ │ │ │ ├── models.py │ │ │ │ │ └── routes.py │ │ │ │ ├── evaluation/ │ │ │ │ │ ├── __init__.py │ │ │ │ │ ├── evaluation_dataset.py │ │ │ │ │ ├── evaluation_task.py │ │ │ │ │ ├── models.py │ │ │ │ │ └── tools.py │ │ │ │ ├── feedback.py │ │ │ │ ├── knowledge_base/ │ │ │ │ │ ├── __init__.py │ │ │ │ │ ├── chunk/ │ │ │ │ │ │ ├── __init__.py │ │ │ │ │ │ ├── models.py │ │ │ │ │ │ └── routes.py │ │ │ │ │ ├── data_source/ │ │ │ │ │ │ ├── __init__.py │ │ │ │ │ │ ├── models.py │ │ │ │ │ │ └── routes.py │ │ │ │ │ ├── document/ │ │ │ │ │ │ ├── models.py │ │ │ │ │ │ └── routes.py │ │ │ │ │ ├── graph/ │ │ │ │ │ │ ├── __init__.py │ │ │ │ │ │ ├── knowledge/ │ │ │ │ │ │ │ ├── __init__.py │ │ │ │ │ │ │ └── routes.py │ │ │ │ │ │ ├── models.py │ │ │ │ │ │ └── routes.py │ │ │ │ │ ├── models.py │ │ │ │ │ └── routes.py │ │ │ │ ├── langfuse.py │ │ │ │ ├── legacy_retrieve.py │ │ │ │ ├── llm/ │ │ │ │ │ ├── __init__.py │ │ │ │ │ └── routes.py │ │ │ │ ├── models.py │ │ │ │ ├── reranker_model/ │ │ │ │ │ ├── __init__.py │ │ │ │ │ └── routes.py │ │ │ │ ├── semantic_cache.py │ │ │ │ ├── site_setting.py │ │ │ │ ├── stats.py │ │ │ │ ├── upload.py │ │ │ │ └── user.py │ │ │ ├── deps.py │ │ │ ├── main.py │ │ │ └── routes/ │ │ │ ├── __init__.py │ │ │ ├── api_key.py │ │ │ ├── chat.py │ │ │ ├── chat_engine.py │ │ │ ├── document.py │ │ │ ├── feedback.py │ │ │ ├── index.py │ │ │ ├── models.py │ │ │ ├── retrieve/ │ │ │ │ ├── __init__.py │ │ │ │ ├── models.py │ │ │ │ └── routes.py │ │ │ └── user.py │ │ ├── api_server.py │ │ ├── auth/ │ │ │ ├── api_keys.py │ │ │ ├── db.py │ │ │ ├── schemas.py │ │ │ └── users.py │ │ ├── celery.py │ │ ├── core/ │ │ │ ├── config.py │ │ │ └── db.py │ │ ├── evaluation/ │ │ │ ├── evals.py │ │ │ └── evaluators/ │ │ │ ├── __init__.py │ │ │ ├── e2e_rag_evaluator.py │ │ │ ├── language_detector.py │ │ │ └── toxicity.py │ │ ├── exceptions.py │ │ ├── experiments/ │ │ │ ├── sql_extraction.py │ │ │ └── sql_sample_gen.py │ │ ├── file_storage/ │ │ │ ├── __init__.py │ │ │ ├── base.py │ │ │ └── local.py │ │ ├── logger.py │ │ ├── models/ │ │ │ ├── __init__.py │ │ │ ├── api_key.py │ │ │ ├── auth.py │ │ │ ├── base.py │ │ │ ├── chat.py │ │ │ ├── chat_engine.py │ │ │ ├── chat_message.py │ │ │ ├── chunk.py │ │ │ ├── data_source.py │ │ │ ├── document.py │ │ │ ├── embed_model.py │ │ │ ├── entity.py │ │ │ ├── evaluation_dataset.py │ │ │ ├── evaluation_task.py │ │ │ ├── feedback.py │ │ │ ├── knowledge_base.py │ │ │ ├── knowledge_base_scoped/ │ │ │ │ ├── __init__.py │ │ │ │ └── table_naming.py │ │ │ ├── llm.py │ │ │ ├── recommend_question.py │ │ │ ├── relationship.py │ │ │ ├── reranker_model.py │ │ │ ├── semantic_cache.py │ │ │ ├── site_setting.py │ │ │ ├── staff_action_log.py │ │ │ └── upload.py │ │ ├── rag/ │ │ │ ├── __init__.py │ │ │ ├── build_index.py │ │ │ ├── chat/ │ │ │ │ ├── __init__.py │ │ │ │ ├── chat_flow.py │ │ │ │ ├── chat_service.py │ │ │ │ ├── config.py │ │ │ │ ├── retrieve/ │ │ │ │ │ └── retrieve_flow.py │ │ │ │ └── stream_protocol.py │ │ │ ├── datasource/ │ │ │ │ ├── __init__.py │ │ │ │ ├── base.py │ │ │ │ ├── consts.py │ │ │ │ ├── file.py │ │ │ │ ├── web_base.py │ │ │ │ ├── web_single_page.py │ │ │ │ └── web_sitemap.py │ │ │ ├── default_prompt.py │ │ │ ├── embeddings/ │ │ │ │ ├── local/ │ │ │ │ │ └── local_embedding.py │ │ │ │ ├── open_like/ │ │ │ │ │ └── openai_like_embedding.py │ │ │ │ ├── provider.py │ │ │ │ └── resolver.py │ │ │ ├── indices/ │ │ │ │ ├── __init__.py │ │ │ │ ├── knowledge_graph/ │ │ │ │ │ ├── __init__.py │ │ │ │ │ ├── base.py │ │ │ │ │ ├── extractor.py │ │ │ │ │ ├── graph_store/ │ │ │ │ │ │ ├── __init__.py │ │ │ │ │ │ ├── helpers.py │ │ │ │ │ │ ├── schema.py │ │ │ │ │ │ ├── tidb_graph_editor.py │ │ │ │ │ │ └── tidb_graph_store.py │ │ │ │ │ └── schema.py │ │ │ │ └── vector_search/ │ │ │ │ ├── __init__.py │ │ │ │ └── vector_store/ │ │ │ │ ├── __init__.py │ │ │ │ └── tidb_vector_store.py │ │ │ ├── knowledge_base/ │ │ │ │ ├── __init__.py │ │ │ │ ├── config.py │ │ │ │ ├── index_store.py │ │ │ │ └── schema.py │ │ │ ├── llms/ │ │ │ │ ├── dspy.py │ │ │ │ ├── provider.py │ │ │ │ └── resolver.py │ │ │ ├── node_parser/ │ │ │ │ ├── __init__.py │ │ │ │ └── file/ │ │ │ │ └── markdown.py │ │ │ ├── postprocessors/ │ │ │ │ ├── __init__.py │ │ │ │ └── metadata_post_filter.py │ │ │ ├── query_dispatcher.py │ │ │ ├── question_gen/ │ │ │ │ ├── __init__.py │ │ │ │ ├── helpers.py │ │ │ │ └── query_decomposer.py │ │ │ ├── rerankers/ │ │ │ │ ├── baisheng/ │ │ │ │ │ └── baisheng_reranker.py │ │ │ │ ├── local/ │ │ │ │ │ └── local_reranker.py │ │ │ │ ├── provider.py │ │ │ │ ├── resolver.py │ │ │ │ └── vllm/ │ │ │ │ └── vllm_reranker.py │ │ │ ├── retrievers/ │ │ │ │ ├── __init__.py │ │ │ │ ├── chunk/ │ │ │ │ │ ├── __init__.py │ │ │ │ │ ├── fusion_retriever.py │ │ │ │ │ ├── helpers.py │ │ │ │ │ ├── schema.py │ │ │ │ │ └── simple_retriever.py │ │ │ │ ├── knowledge_graph/ │ │ │ │ │ ├── __init__.py │ │ │ │ │ ├── fusion_retriever.py │ │ │ │ │ ├── schema.py │ │ │ │ │ └── simple_retriever.py │ │ │ │ └── multiple_knowledge_base.py │ │ │ ├── semantic_cache/ │ │ │ │ ├── __init__.py │ │ │ │ └── base.py │ │ │ ├── types.py │ │ │ └── utils.py │ │ ├── repositories/ │ │ │ ├── __init__.py │ │ │ ├── base_repo.py │ │ │ ├── chat.py │ │ │ ├── chat_engine.py │ │ │ ├── chunk.py │ │ │ ├── data_source.py │ │ │ ├── document.py │ │ │ ├── embedding_model.py │ │ │ ├── feedback.py │ │ │ ├── graph.py │ │ │ ├── knowledge_base.py │ │ │ ├── llm.py │ │ │ ├── reranker_model.py │ │ │ ├── staff_action_log.py │ │ │ └── user.py │ │ ├── site_settings/ │ │ │ ├── __init__.py │ │ │ ├── default.py │ │ │ ├── default_settings.yml │ │ │ └── types.py │ │ ├── staff_action/ │ │ │ └── __init__.py │ │ ├── tasks/ │ │ │ ├── __init__.py │ │ │ ├── build_index.py │ │ │ ├── evaluate.py │ │ │ └── knowledge_base.py │ │ ├── types.py │ │ └── utils/ │ │ ├── aes.py │ │ ├── namespace.py │ │ ├── singleflight_cache.py │ │ ├── tracing.py │ │ └── uuid6.py │ ├── bootstrap.py │ ├── dspy_compiled_program/ │ │ └── decompose_query/ │ │ ├── demos.json │ │ └── program.json │ ├── dspy_program.py │ ├── local_embedding_reranker/ │ │ ├── .dockerignore │ │ ├── Dockerfile │ │ ├── main.py │ │ └── requirements.txt │ ├── main.py │ ├── prestart.sh │ ├── pyproject.toml │ ├── supervisord.conf │ └── tests/ │ ├── __init__.py │ ├── conftest.py │ ├── test_dynamic_models.py │ └── test_llms.py ├── core/ │ ├── .cursor/ │ │ └── rules/ │ │ └── code-style.mdc │ ├── .gitignore │ ├── .python-version │ ├── Makefile │ ├── README.md │ ├── autoflow/ │ │ ├── __init__.py │ │ ├── chunkers/ │ │ │ ├── __init__.py │ │ │ ├── base.py │ │ │ ├── helper.py │ │ │ └── text.py │ │ ├── configs/ │ │ │ ├── __init__.py │ │ │ ├── chunkers/ │ │ │ │ ├── __init__.py │ │ │ │ ├── base.py │ │ │ │ └── text.py │ │ │ ├── db.py │ │ │ ├── knowledge_base.py │ │ │ ├── main.py │ │ │ └── models/ │ │ │ ├── __init__.py │ │ │ ├── embeddings/ │ │ │ │ ├── __init__.py │ │ │ │ ├── base.py │ │ │ │ ├── common.py │ │ │ │ ├── jina_ai.py │ │ │ │ └── openai.py │ │ │ ├── llms/ │ │ │ │ ├── __init__.py │ │ │ │ ├── base.py │ │ │ │ ├── common.py │ │ │ │ └── openai.py │ │ │ ├── manager.py │ │ │ ├── providers/ │ │ │ │ ├── __init__.py │ │ │ │ ├── base.py │ │ │ │ ├── jinaai.py │ │ │ │ └── openai.py │ │ │ └── rerankers/ │ │ │ ├── __init__.py │ │ │ ├── base.py │ │ │ ├── common.py │ │ │ └── jina_ai.py │ │ ├── data_types.py │ │ ├── db.py │ │ ├── knowledge_base/ │ │ │ ├── __init__.py │ │ │ ├── base.py │ │ │ └── prompts.py │ │ ├── knowledge_graph/ │ │ │ ├── __init__.py │ │ │ ├── extractors/ │ │ │ │ ├── __init__.py │ │ │ │ ├── base.py │ │ │ │ └── simple.py │ │ │ ├── index.py │ │ │ ├── programs/ │ │ │ │ ├── __init__.py │ │ │ │ ├── eval_graph.py │ │ │ │ ├── extract_covariates.py │ │ │ │ └── extract_graph.py │ │ │ ├── retrievers/ │ │ │ │ ├── __init__.py │ │ │ │ ├── base.py │ │ │ │ ├── simple.py │ │ │ │ └── weighted.py │ │ │ └── types.py │ │ ├── loaders/ │ │ │ ├── __init__.py │ │ │ ├── base.py │ │ │ ├── helper.py │ │ │ ├── markdown.py │ │ │ ├── pdf.py │ │ │ └── webpage.py │ │ ├── main.py │ │ ├── models/ │ │ │ ├── __init__.py │ │ │ ├── embedding_models/ │ │ │ │ ├── __init__.py │ │ │ │ └── litellm.py │ │ │ ├── llms/ │ │ │ │ ├── __init__.py │ │ │ │ ├── dspy.py │ │ │ │ └── litellm.py │ │ │ ├── manager.py │ │ │ ├── provider.py │ │ │ └── rerank_models/ │ │ │ ├── __init__.py │ │ │ └── litellm.py │ │ ├── orms/ │ │ │ ├── __init__.py │ │ │ └── base.py │ │ ├── py.typed │ │ ├── storage/ │ │ │ ├── __init__.py │ │ │ ├── doc_store/ │ │ │ │ ├── __init__.py │ │ │ │ ├── base.py │ │ │ │ ├── tidb_doc_store.py │ │ │ │ └── types.py │ │ │ ├── graph_store/ │ │ │ │ ├── __init__.py │ │ │ │ ├── base.py │ │ │ │ ├── tidb_graph_store.py │ │ │ │ └── types.py │ │ │ └── types.py │ │ ├── types.py │ │ └── utils/ │ │ ├── hash.py │ │ ├── uuid6.py │ │ └── vector.py │ ├── examples/ │ │ ├── README.md │ │ ├── quickstart/ │ │ │ ├── fixtures/ │ │ │ │ ├── analyze-slow-queries.md │ │ │ │ └── tidb-overview.md │ │ │ └── quickstart.ipynb │ │ └── streamlit/ │ │ ├── README.md │ │ ├── build-knowledge-search-with-autoflow-and-streamlit.py │ │ └── reqs.txt │ ├── experimental/ │ │ ├── README.md │ │ └── kg_extraction/ │ │ └── extract_graph.ipynb │ ├── pyproject.toml │ └── tests/ │ ├── __init__.py │ ├── conftest.py │ ├── fixtures/ │ │ ├── analyze-slow-queries.md │ │ └── tidb-overview.md │ ├── knowledge_base/ │ │ ├── __init__.py │ │ ├── test_kb_with_namespace.py │ │ └── test_kb_without_namespace.py │ ├── knowledge_graph/ │ │ ├── programs/ │ │ │ └── test_extract_graph.py │ │ └── test_kg_extractor.py │ ├── models/ │ │ └── test_model_manager.py │ └── storage/ │ ├── __init__.py │ ├── doc_store/ │ │ └── test_tidb_doc_store.py │ └── graph_store/ │ ├── __init__.py │ └── test_tidb_graph_store.py ├── docker-compose-cn.yml ├── docker-compose.dev.yml ├── docker-compose.yml ├── docs/ │ ├── .gitignore │ ├── mdx-components.ts │ ├── next-sitemap.config.js │ ├── next.config.mjs │ ├── package.json │ ├── src/ │ │ ├── app/ │ │ │ ├── [[...mdxPath]]/ │ │ │ │ └── page.jsx │ │ │ ├── _app.tsx │ │ │ ├── _ignored/ │ │ │ │ ├── _meta.js │ │ │ │ └── page.mdx │ │ │ ├── _meta.ts │ │ │ ├── globals.css │ │ │ └── layout.jsx │ │ └── content/ │ │ ├── README.md │ │ ├── _meta.ts │ │ ├── chat-engine.mdx │ │ ├── deploy-with-docker.mdx │ │ ├── embedding-model.mdx │ │ ├── evaluation.mdx │ │ ├── faq.mdx │ │ ├── index.mdx │ │ ├── javascript.mdx │ │ ├── knowledge-base.mdx │ │ ├── llm.mdx │ │ ├── quick-start.mdx │ │ ├── releases/ │ │ │ ├── _meta.ts │ │ │ ├── index.mdx │ │ │ ├── v0.1.0.md │ │ │ ├── v0.2.0.md │ │ │ ├── v0.3.0.md │ │ │ └── v0.4.0.md │ │ ├── requirements.mdx │ │ ├── reranker-model.mdx │ │ └── resources.mdx │ └── tsconfig.json ├── e2e/ │ ├── .gitignore │ ├── README.md │ ├── deploy-test-result.sh │ ├── docker-compose.yml │ ├── global.setup.ts │ ├── package.json │ ├── playwright.config.ts │ ├── prepare-test.sh │ ├── res/ │ │ └── sample-evaluation-dataset.csv │ ├── start-test.sh │ ├── test-html/ │ │ ├── example-doc-1.html │ │ ├── example-doc-2.html │ │ ├── example-sitemap.xml │ │ ├── widget-controlled.html │ │ └── widget.html │ ├── tests/ │ │ ├── api-keys.spec.ts │ │ ├── api.spec.ts │ │ ├── bootstrap.ts │ │ ├── chat-engine.spec.ts │ │ ├── chat.spec.ts │ │ ├── datasource.spec.ts │ │ ├── evaluation.spec.ts │ │ ├── knowledge-base.spec.ts │ │ ├── site-settings.spec.ts │ │ └── widget.spec.ts │ ├── utils/ │ │ ├── chat.ts │ │ ├── forms.ts │ │ └── login.ts │ └── vercel.json └── frontend/ ├── .gitignore ├── .nvmrc ├── .prettierignore ├── Dockerfile ├── app/ │ ├── .eslintrc.json │ ├── .gitignore │ ├── .storybook/ │ │ ├── main.ts │ │ └── preview.ts │ ├── README.md │ ├── components.json │ ├── jest.config.ts │ ├── jest.polyfills.js │ ├── next-sitemap.config.js │ ├── next.config.ts │ ├── notice.md │ ├── package.json │ ├── postcss.config.mjs │ ├── public/ │ │ └── chats.mock.txt │ ├── src/ │ │ ├── api/ │ │ │ ├── .gitignore │ │ │ ├── api-keys.ts │ │ │ ├── auth.ts │ │ │ ├── chat-engines.ts │ │ │ ├── chats.ts │ │ │ ├── commons.ts │ │ │ ├── datasources.ts │ │ │ ├── documents.ts │ │ │ ├── embedding-models.ts │ │ │ ├── evaluations.ts │ │ │ ├── feedbacks.ts │ │ │ ├── graph.ts │ │ │ ├── knowledge-base.ts │ │ │ ├── llms.ts │ │ │ ├── providers.ts │ │ │ ├── rag.ts │ │ │ ├── rerankers.ts │ │ │ ├── site-settings.ts │ │ │ ├── stats.ts │ │ │ ├── system.ts │ │ │ └── users.ts │ │ ├── app/ │ │ │ ├── (experimental)/ │ │ │ │ └── experimental-features/ │ │ │ │ └── route.ts │ │ │ ├── (main)/ │ │ │ │ ├── (.)auth/ │ │ │ │ │ └── login/ │ │ │ │ │ ├── loading.tsx │ │ │ │ │ ├── page.client.tsx │ │ │ │ │ └── page.tsx │ │ │ │ ├── (admin)/ │ │ │ │ │ ├── chat-engines/ │ │ │ │ │ │ ├── [id]/ │ │ │ │ │ │ │ └── page.tsx │ │ │ │ │ │ ├── new/ │ │ │ │ │ │ │ └── page.tsx │ │ │ │ │ │ └── page.tsx │ │ │ │ │ ├── embedding-models/ │ │ │ │ │ │ ├── [id]/ │ │ │ │ │ │ │ └── page.tsx │ │ │ │ │ │ ├── create/ │ │ │ │ │ │ │ └── page.tsx │ │ │ │ │ │ └── page.tsx │ │ │ │ │ ├── evaluation/ │ │ │ │ │ │ ├── datasets/ │ │ │ │ │ │ │ ├── [id]/ │ │ │ │ │ │ │ │ ├── items/ │ │ │ │ │ │ │ │ │ ├── [itemId]/ │ │ │ │ │ │ │ │ │ │ └── page.tsx │ │ │ │ │ │ │ │ │ └── new/ │ │ │ │ │ │ │ │ │ └── page.tsx │ │ │ │ │ │ │ │ ├── not-found.tsx │ │ │ │ │ │ │ │ └── page.tsx │ │ │ │ │ │ │ ├── create/ │ │ │ │ │ │ │ │ └── page.tsx │ │ │ │ │ │ │ └── page.tsx │ │ │ │ │ │ ├── page.tsx │ │ │ │ │ │ └── tasks/ │ │ │ │ │ │ ├── [id]/ │ │ │ │ │ │ │ ├── not-found.tsx │ │ │ │ │ │ │ └── page.tsx │ │ │ │ │ │ ├── create/ │ │ │ │ │ │ │ └── page.tsx │ │ │ │ │ │ └── page.tsx │ │ │ │ │ ├── feedbacks/ │ │ │ │ │ │ └── page.tsx │ │ │ │ │ ├── knowledge-bases/ │ │ │ │ │ │ ├── [id]/ │ │ │ │ │ │ │ ├── (special)/ │ │ │ │ │ │ │ │ ├── data-sources/ │ │ │ │ │ │ │ │ │ └── new/ │ │ │ │ │ │ │ │ │ └── page.tsx │ │ │ │ │ │ │ │ └── documents/ │ │ │ │ │ │ │ │ └── [documentId]/ │ │ │ │ │ │ │ │ └── chunks/ │ │ │ │ │ │ │ │ └── page.tsx │ │ │ │ │ │ │ ├── (tabs)/ │ │ │ │ │ │ │ │ ├── data-sources/ │ │ │ │ │ │ │ │ │ └── page.tsx │ │ │ │ │ │ │ │ ├── index-progress/ │ │ │ │ │ │ │ │ │ └── page.tsx │ │ │ │ │ │ │ │ ├── knowledge-graph-explorer/ │ │ │ │ │ │ │ │ │ ├── create-synopsis-entity/ │ │ │ │ │ │ │ │ │ │ └── page.tsx │ │ │ │ │ │ │ │ │ └── page.tsx │ │ │ │ │ │ │ │ ├── layout.tsx │ │ │ │ │ │ │ │ ├── page.tsx │ │ │ │ │ │ │ │ ├── settings/ │ │ │ │ │ │ │ │ │ └── page.tsx │ │ │ │ │ │ │ │ └── tabs.tsx │ │ │ │ │ │ │ ├── api.ts │ │ │ │ │ │ │ └── context.tsx │ │ │ │ │ │ ├── new/ │ │ │ │ │ │ │ └── page.tsx │ │ │ │ │ │ └── page.tsx │ │ │ │ │ ├── layout.tsx │ │ │ │ │ ├── llms/ │ │ │ │ │ │ ├── [id]/ │ │ │ │ │ │ │ └── page.tsx │ │ │ │ │ │ ├── create/ │ │ │ │ │ │ │ └── page.tsx │ │ │ │ │ │ └── page.tsx │ │ │ │ │ ├── reranker-models/ │ │ │ │ │ │ ├── [id]/ │ │ │ │ │ │ │ └── page.tsx │ │ │ │ │ │ ├── create/ │ │ │ │ │ │ │ └── page.tsx │ │ │ │ │ │ └── page.tsx │ │ │ │ │ ├── site-settings/ │ │ │ │ │ │ ├── custom_js/ │ │ │ │ │ │ │ └── page.tsx │ │ │ │ │ │ ├── integrations/ │ │ │ │ │ │ │ └── page.tsx │ │ │ │ │ │ ├── layout.tsx │ │ │ │ │ │ └── page.tsx │ │ │ │ │ └── stats/ │ │ │ │ │ └── trending/ │ │ │ │ │ └── page.tsx │ │ │ │ ├── (user)/ │ │ │ │ │ ├── api-keys/ │ │ │ │ │ │ └── page.tsx │ │ │ │ │ ├── c/ │ │ │ │ │ │ └── page.tsx │ │ │ │ │ └── layout.tsx │ │ │ │ ├── c/ │ │ │ │ │ └── [id]/ │ │ │ │ │ └── page.tsx │ │ │ │ ├── layout.tsx │ │ │ │ ├── nav.tsx │ │ │ │ └── page.tsx │ │ │ ├── RootProviders.tsx │ │ │ ├── api/ │ │ │ │ └── [[...fallback_placeholder]]/ │ │ │ │ └── route.ts │ │ │ ├── auth/ │ │ │ │ └── login/ │ │ │ │ └── page.tsx │ │ │ ├── chart-theme.css │ │ │ ├── globals.css │ │ │ └── layout.tsx │ │ ├── components/ │ │ │ ├── admin-page-heading.tsx │ │ │ ├── admin-page-layout.tsx │ │ │ ├── api-keys/ │ │ │ │ └── CreateApiKeyForm.tsx │ │ │ ├── auth/ │ │ │ │ └── AuthProvider.tsx │ │ │ ├── auto-scroll/ │ │ │ │ ├── auto-scroll.stories.tsx │ │ │ │ ├── auto-scroll.tsx │ │ │ │ ├── context.ts │ │ │ │ ├── index.ts │ │ │ │ ├── manual-scroll-voter.tsx │ │ │ │ ├── use-auto-scroll-voter.ts │ │ │ │ └── use-request-scroll.ts │ │ │ ├── branding.tsx │ │ │ ├── cells/ │ │ │ │ ├── actions.tsx │ │ │ │ ├── boolean.tsx │ │ │ │ ├── datetime.tsx │ │ │ │ ├── error-message.tsx │ │ │ │ ├── link.tsx │ │ │ │ ├── metadata.tsx │ │ │ │ ├── mono.tsx │ │ │ │ ├── percent.tsx │ │ │ │ └── reference.tsx │ │ │ ├── charts/ │ │ │ │ ├── IndexProgressChart.stories.tsx │ │ │ │ ├── IndexProgressChart.tsx │ │ │ │ ├── TotalCard.stories.tsx │ │ │ │ ├── TotalCard.tsx │ │ │ │ └── TrendsChart.tsx │ │ │ ├── chat/ │ │ │ │ ├── ask.tsx │ │ │ │ ├── chat-controller.test.ts │ │ │ │ ├── chat-controller.ts │ │ │ │ ├── chat-hooks.tsx │ │ │ │ ├── chat-message-controller.test.ts │ │ │ │ ├── chat-message-controller.ts │ │ │ │ ├── chat-new-dialog.tsx │ │ │ │ ├── chat-stream-state.ts │ │ │ │ ├── chat-stream.state.test.ts │ │ │ │ ├── chats-history.tsx │ │ │ │ ├── chats-table.tsx │ │ │ │ ├── conversation-message-groups.scss │ │ │ │ ├── conversation-message-groups.tsx │ │ │ │ ├── conversation.test.tsx │ │ │ │ ├── conversation.tsx │ │ │ │ ├── debug-info.tsx │ │ │ │ ├── knowledge-graph-debug-info.tsx │ │ │ │ ├── message-annotation-history-stackvm.tsx │ │ │ │ ├── message-annotation-history.tsx │ │ │ │ ├── message-answer.tsx │ │ │ │ ├── message-auto-scroll.tsx │ │ │ │ ├── message-beta-alert.tsx │ │ │ │ ├── message-content-sources.tsx │ │ │ │ ├── message-content.test.tsx │ │ │ │ ├── message-content.tsx │ │ │ │ ├── message-error.tsx │ │ │ │ ├── message-feedback.tsx │ │ │ │ ├── message-input.tsx │ │ │ │ ├── message-operations.tsx │ │ │ │ ├── message-recommend-questions.tsx │ │ │ │ ├── message-section.tsx │ │ │ │ ├── testutils.ts │ │ │ │ ├── use-ask.ts │ │ │ │ ├── use-message-feedback.ts │ │ │ │ └── utils.ts │ │ │ ├── chat-engine/ │ │ │ │ ├── chat-engines-table.tsx │ │ │ │ ├── create-chat-engine-form.tsx │ │ │ │ ├── hooks.ts │ │ │ │ ├── kb-list-select.tsx │ │ │ │ └── update-chat-engine-form.tsx │ │ │ ├── code-theme.scss │ │ │ ├── config-viewer.tsx │ │ │ ├── copy-button.tsx │ │ │ ├── dangerous-action-button.tsx │ │ │ ├── data-table-heading.tsx │ │ │ ├── data-table-remote.tsx │ │ │ ├── data-table.tsx │ │ │ ├── datasource/ │ │ │ │ ├── create-datasource-form.tsx │ │ │ │ ├── datasource-card.tsx │ │ │ │ ├── datasource-create-option.tsx │ │ │ │ ├── no-datasource-placeholder.tsx │ │ │ │ └── update-datasource-form.tsx │ │ │ ├── date-format.tsx │ │ │ ├── date-range-picker.tsx │ │ │ ├── diff-seconds.tsx │ │ │ ├── document-viewer.tsx │ │ │ ├── documents/ │ │ │ │ ├── documents-table-filters.tsx │ │ │ │ └── documents-table.tsx │ │ │ ├── embedding-models/ │ │ │ │ ├── CreateEmbeddingModelForm.tsx │ │ │ │ ├── EmbeddingModelInfo.tsx │ │ │ │ ├── EmbeddingModelsTable.tsx │ │ │ │ ├── UpdateEmbeddingModelForm.tsx │ │ │ │ └── hooks.tsx │ │ │ ├── error-card.tsx │ │ │ ├── evaluations/ │ │ │ │ ├── cells.tsx │ │ │ │ ├── create-evaluation-dataset-form.stories.tsx │ │ │ │ ├── create-evaluation-dataset-form.tsx │ │ │ │ ├── create-evaluation-dataset-item-form.stories.tsx │ │ │ │ ├── create-evaluation-dataset-item-form.tsx │ │ │ │ ├── create-evaluation-task-form.stories.tsx │ │ │ │ ├── create-evaluation-task-form.tsx │ │ │ │ ├── evaluation-dataset-info.tsx │ │ │ │ ├── evaluation-dataset-items-table.tsx │ │ │ │ ├── evaluation-datasets-table.tsx │ │ │ │ ├── evaluation-task-info.stories.tsx │ │ │ │ ├── evaluation-task-info.tsx │ │ │ │ ├── evaluation-task-items-table.tsx │ │ │ │ ├── evaluation-tasks-table.tsx │ │ │ │ ├── hooks.ts │ │ │ │ ├── keyword-filter-toolbar.tsx │ │ │ │ └── update-evaluation-dataset-item-form.tsx │ │ │ ├── feedbacks/ │ │ │ │ └── feedbacks-table.tsx │ │ │ ├── form/ │ │ │ │ ├── biz.tsx │ │ │ │ ├── control-widget.tsx │ │ │ │ ├── create-entity-form.tsx │ │ │ │ ├── field-layout.tsx │ │ │ │ ├── root-error.tsx │ │ │ │ ├── utils.ts │ │ │ │ └── widgets/ │ │ │ │ ├── CodeInput.tsx │ │ │ │ ├── FileInput.tsx │ │ │ │ ├── FilesInput.tsx │ │ │ │ └── PromptInput.tsx │ │ │ ├── form-sections.tsx │ │ │ ├── graph/ │ │ │ │ ├── GraphCreateEntity.tsx │ │ │ │ ├── GraphEditor.tsx │ │ │ │ ├── action.ts │ │ │ │ ├── components/ │ │ │ │ │ ├── EditingButton.tsx │ │ │ │ │ ├── EntitiesTable.tsx │ │ │ │ │ ├── InputField.tsx │ │ │ │ │ ├── JsonEditor.tsx │ │ │ │ │ ├── JsonField.tsx │ │ │ │ │ ├── LinkDetails.tsx │ │ │ │ │ ├── NetworkCanvas.tsx │ │ │ │ │ ├── NetworkContext.ts │ │ │ │ │ ├── NetworkViewer.tsx │ │ │ │ │ ├── NodeDetails.tsx │ │ │ │ │ ├── SearchEntity.tsx │ │ │ │ │ ├── SearchEntityById.tsx │ │ │ │ │ └── TextareaField.tsx │ │ │ │ ├── index.ts │ │ │ │ ├── network/ │ │ │ │ │ ├── CanvasNetworkRenderer.ts │ │ │ │ │ ├── Network.ts │ │ │ │ │ └── NetworkRendererOptions.ts │ │ │ │ ├── remote.ts │ │ │ │ ├── selectEntities.ts │ │ │ │ ├── useDirtyEntity.ts │ │ │ │ ├── useDirtyRelationship.ts │ │ │ │ ├── useNetwork.ts │ │ │ │ └── utils.ts │ │ │ ├── gtag-provider.tsx │ │ │ ├── html-viewer.tsx │ │ │ ├── icons/ │ │ │ │ └── index.ts │ │ │ ├── knowledge-base/ │ │ │ │ ├── create-knowledge-base-form.stories.tsx │ │ │ │ ├── create-knowledge-base-form.tsx │ │ │ │ ├── document-chunks-table.tsx │ │ │ │ ├── empty-state.tsx │ │ │ │ ├── form-index-methods.tsx │ │ │ │ ├── hooks.ts │ │ │ │ ├── knowledge-base-card.stories.tsx │ │ │ │ ├── knowledge-base-card.tsx │ │ │ │ ├── knowledge-base-chunking-config-fields.tsx │ │ │ │ ├── knowledge-base-index.tsx │ │ │ │ └── knowledge-base-settings-form.tsx │ │ │ ├── llm/ │ │ │ │ ├── CreateLLMForm.tsx │ │ │ │ ├── LLMsTable.tsx │ │ │ │ ├── LlmInfo.tsx │ │ │ │ ├── UpdateLLMForm.tsx │ │ │ │ └── hooks.ts │ │ │ ├── loader.tsx │ │ │ ├── managed-dialog-close.tsx │ │ │ ├── managed-dialog.tsx │ │ │ ├── managed-panel.tsx │ │ │ ├── model-component-info.tsx │ │ │ ├── nextjs/ │ │ │ │ └── NextLink.tsx │ │ │ ├── option-detail.tsx │ │ │ ├── portal-provider.tsx │ │ │ ├── provider-description.tsx │ │ │ ├── py-viewer.tsx │ │ │ ├── remark-content/ │ │ │ │ ├── components.tsx │ │ │ │ ├── context.tsx │ │ │ │ ├── highlight.ts │ │ │ │ ├── index.ts │ │ │ │ ├── remark-content.stories.tsx │ │ │ │ ├── remark-content.tsx │ │ │ │ └── style.scss │ │ │ ├── reranker/ │ │ │ │ ├── CreateRerankerForm.tsx │ │ │ │ ├── RerankerInfo.tsx │ │ │ │ ├── RerankerModelsTable.tsx │ │ │ │ ├── UpdateRerankerForm.tsx │ │ │ │ └── hooks.ts │ │ │ ├── resource-not-found.tsx │ │ │ ├── row-checkbox.tsx │ │ │ ├── secondary-navigator-list.tsx │ │ │ ├── security-setting-provider.tsx │ │ │ ├── settings/ │ │ │ │ ├── CustomJsSettings.tsx │ │ │ │ ├── IntegrationsSettings.tsx │ │ │ │ ├── LinkArrayField.tsx │ │ │ │ ├── SettingsField.tsx │ │ │ │ ├── StringArrayField.tsx │ │ │ │ ├── WebsiteSettings.tsx │ │ │ │ └── WidgetSnippet.tsx │ │ │ ├── settings-form/ │ │ │ │ ├── GeneralSettingsField.tsx │ │ │ │ ├── GeneralSettingsForm.tsx │ │ │ │ ├── accessor-helper.ts │ │ │ │ ├── context.tsx │ │ │ │ ├── index.ts │ │ │ │ └── utils.ts │ │ │ ├── signin.tsx │ │ │ ├── site-header-actions.tsx │ │ │ ├── site-header.tsx │ │ │ ├── site-nav.tsx │ │ │ ├── system/ │ │ │ │ ├── BootstrapStatusProvider.tsx │ │ │ │ └── SystemWizardBanner.tsx │ │ │ ├── theme-toggle.tsx │ │ │ ├── theme.stories.tsx │ │ │ ├── themed-style.ts │ │ │ ├── ui/ │ │ │ │ ├── accordion.tsx │ │ │ │ ├── alert-dialog.tsx │ │ │ │ ├── alert.tsx │ │ │ │ ├── aspect-ratio.tsx │ │ │ │ ├── avatar.tsx │ │ │ │ ├── badge.tsx │ │ │ │ ├── breadcrumb.tsx │ │ │ │ ├── button.tsx │ │ │ │ ├── calendar.tsx │ │ │ │ ├── card.tsx │ │ │ │ ├── carousel.tsx │ │ │ │ ├── chart.tsx │ │ │ │ ├── checkbox.tsx │ │ │ │ ├── collapsible.tsx │ │ │ │ ├── command.tsx │ │ │ │ ├── context-menu.tsx │ │ │ │ ├── dialog.tsx │ │ │ │ ├── dot-pattern.tsx │ │ │ │ ├── drawer.tsx │ │ │ │ ├── dropdown-menu.tsx │ │ │ │ ├── form.beta.tsx │ │ │ │ ├── form.tsx │ │ │ │ ├── hover-card.tsx │ │ │ │ ├── input-otp.tsx │ │ │ │ ├── input.tsx │ │ │ │ ├── label.tsx │ │ │ │ ├── menubar.tsx │ │ │ │ ├── navigation-menu.tsx │ │ │ │ ├── pagination.tsx │ │ │ │ ├── popover.tsx │ │ │ │ ├── progress.tsx │ │ │ │ ├── radio-group.tsx │ │ │ │ ├── resizable.tsx │ │ │ │ ├── scroll-area.tsx │ │ │ │ ├── select.tsx │ │ │ │ ├── separator.tsx │ │ │ │ ├── sheet.tsx │ │ │ │ ├── sidebar.tsx │ │ │ │ ├── skeleton.tsx │ │ │ │ ├── slider.tsx │ │ │ │ ├── sonner.tsx │ │ │ │ ├── switch.tsx │ │ │ │ ├── table.tsx │ │ │ │ ├── tabs.tsx │ │ │ │ ├── textarea.tsx │ │ │ │ ├── toast.tsx │ │ │ │ ├── toaster.tsx │ │ │ │ ├── toggle-group.tsx │ │ │ │ ├── toggle.tsx │ │ │ │ ├── tooltip.tsx │ │ │ │ └── use-toast.ts │ │ │ ├── use-active-theme.ts │ │ │ ├── use-data-table.ts │ │ │ ├── use-href.ts │ │ │ ├── use-latest-ref.tsx │ │ │ ├── use-search-param.ts │ │ │ ├── use-size.ts │ │ │ └── website-setting-provider.tsx │ │ ├── core/ │ │ │ └── schema/ │ │ │ ├── NOTICE.md │ │ │ └── settings/ │ │ │ └── security.ts │ │ ├── experimental/ │ │ │ ├── chat-verify-service/ │ │ │ │ ├── api.mock.ts │ │ │ │ ├── api.react-server.ts │ │ │ │ ├── api.tidbai-widget.ts │ │ │ │ ├── api.ts │ │ │ │ ├── message-verify-result-markdown.tsx │ │ │ │ ├── message-verify.stories.tsx │ │ │ │ └── message-verify.tsx │ │ │ ├── experimental-features-provider.tsx │ │ │ └── experimental-features.ts │ │ ├── hooks/ │ │ │ ├── use-mobile.tsx │ │ │ └── use-model-provider.ts │ │ └── lib/ │ │ ├── auth.ts │ │ ├── buffered-readable-stream.test.ts │ │ ├── buffered-readable-stream.ts │ │ ├── errors.ts │ │ ├── react.ts │ │ ├── request/ │ │ │ ├── authenticationHeaders.mock.ts │ │ │ ├── authenticationHeaders.react-server.ts │ │ │ ├── authenticationHeaders.tidbai-widget.ts │ │ │ ├── authenticationHeaders.ts │ │ │ ├── base-url.mock.ts │ │ │ ├── base-url.react-server.ts │ │ │ ├── base-url.tidbai-widget.ts │ │ │ ├── base-url.ts │ │ │ ├── errors.ts │ │ │ ├── index.ts │ │ │ ├── list-all-helper.ts │ │ │ ├── params.ts │ │ │ ├── response-handlers.ts │ │ │ └── url.ts │ │ ├── stackvm/ │ │ │ ├── core/ │ │ │ │ ├── index.ts │ │ │ │ ├── instructions/ │ │ │ │ │ ├── index.ts │ │ │ │ │ ├── instructions.ts │ │ │ │ │ └── registry.ts │ │ │ │ ├── model.ts │ │ │ │ ├── types.ts │ │ │ │ └── visit.ts │ │ │ └── index.ts │ │ ├── strings.ts │ │ ├── tanstack-form.ts │ │ ├── typing-utils.ts │ │ ├── ui-error.tsx │ │ ├── utils.ts │ │ ├── zod.test.ts │ │ └── zod.ts │ ├── tailwind.config.ts │ └── tsconfig.json ├── package.json ├── packages/ │ └── widget-react/ │ ├── .eslintrc.cjs │ ├── .gitignore │ ├── README.md │ ├── USAGE.md │ ├── index.html │ ├── package.json │ ├── postcss.config.js │ ├── src/ │ │ ├── Widget.css │ │ ├── Widget.tsx │ │ ├── index.css │ │ ├── library.tsx │ │ ├── load-config.ts │ │ ├── overrides/ │ │ │ ├── README.md │ │ │ └── components/ │ │ │ ├── code-theme.scss │ │ │ └── remark-content/ │ │ │ └── style.scss │ │ ├── prepare-gtag.ts │ │ └── vite-env.d.ts │ ├── tailwind.config.ts │ ├── tsconfig.app.json │ ├── tsconfig.json │ ├── tsconfig.node.json │ └── vite.config.ts ├── patches/ │ ├── @jest__environment@29.7.0.patch │ └── jest-runtime@29.7.0.patch └── pnpm-workspace.yaml