{
  "cells": [
    {
      "cell_type": "raw",
      "metadata": {
        "vscode": {
          "languageId": "raw"
        }
      },
      "source": [
        "# Vanna Chainlit ChromaDB 测试 Notebook\n",
        "\n",
        "这个 Notebook 用于测试项目的各种功能和 API。\n"
      ]
    },
    {
      "cell_type": "code",
      "execution_count": null,
      "metadata": {},
      "outputs": [],
      "source": [
        "# 导入必要的模块\n",
        "import sys\n",
        "import os\n",
        "\n",
        "# 添加项目根目录到 Python 路径\n",
        "sys.path.append(os.path.join(os.path.dirname(os.getcwd())))\n",
        "\n",
        "print(\"项目路径已添加到 Python 路径\")\n"
      ]
    },
    {
      "cell_type": "raw",
      "metadata": {
        "vscode": {
          "languageId": "raw"
        }
      },
      "source": [
        "## 1. 测试配置加载\n",
        "\n",
        "测试项目的各种配置是否能正常加载。\n"
      ]
    },
    {
      "cell_type": "code",
      "execution_count": null,
      "metadata": {},
      "outputs": [],
      "source": [
        "# 测试配置加载\n",
        "try:\n",
        "    import app_config\n",
        "    print(\"配置加载成功！\")\n",
        "    print(f\"LLM模型类型: {app_config.LLM_MODEL_TYPE}\")\n",
        "    print(f\"API LLM模型: {app_config.API_LLM_MODEL}\")\n",
        "    print(f\"向量数据库类型: {app_config.VECTOR_DB_TYPE}\")\n",
        "except Exception as e:\n",
        "    print(f\"配置加载失败: {e}\")\n"
      ]
    },
    {
      "cell_type": "raw",
      "metadata": {
        "vscode": {
          "languageId": "raw"
        }
      },
      "source": [
        "## 2. 测试数据管道工具\n",
        "\n",
        "测试数据管道模块的配置和功能。\n",
        "ceshi \n",
        "ceshi "
      ]
    },
    {
      "cell_type": "code",
      "execution_count": null,
      "metadata": {},
      "outputs": [],
      "source": [
        "# 测试数据管道模块\n",
        "try:\n",
        "    from data_pipeline.config import SCHEMA_TOOLS_CONFIG\n",
        "    print(\"数据管道配置加载成功！\")\n",
        "    print(f\"输出目录: {SCHEMA_TOOLS_CONFIG['output_directory']}\")\n",
        "    print(f\"最大表数量: {SCHEMA_TOOLS_CONFIG['qs_generation']['max_tables']}\")\n",
        "except Exception as e:\n",
        "    print(f\"数据管道配置加载失败: {e}\")\n"
      ]
    },
    {
      "cell_type": "raw",
      "metadata": {
        "vscode": {
          "languageId": "raw"
        }
      },
      "source": [
        "## 总结\n",
        "\n",
        "这个 Notebook 用于测试项目的各个组件，包括：\n",
        "- 配置加载\n",
        "- 数据管道工具\n",
        "- Vanna 实例创建\n",
        "- 工具函数\n",
        "- 日志系统\n",
        "\n",
        "可以根据需要添加更多的测试用例。\n",
        "\n",
        "### 使用说明\n",
        "\n",
        "1. 确保已激活项目的虚拟环境：\n",
        "   ```bash\n",
        "   .\\.venv\\Scripts\\Activate.ps1\n",
        "   ```\n",
        "\n",
        "2. 安装 Jupyter（如果尚未安装）：\n",
        "   ```bash\n",
        "   pip install jupyter\n",
        "   ```\n",
        "\n",
        "3. 启动 Jupyter：\n",
        "   ```bash\n",
        "   jupyter notebook\n",
        "   ```\n"
      ]
    }
  ],
  "metadata": {
    "language_info": {
      "name": "python"
    }
  },
  "nbformat": 4,
  "nbformat_minor": 2
}
