An API service for multi-model chat and conversation history management.
-
Clone the repository:
git clone <repository-url> cd AI-Note
-
Install backend dependencies:
pip install -r requirements.txt
-
Set up environment variables: Create a
.envfile in the app directory with the following variables:DASHSCOPE_API_KEY=your_dashscope_api_key MOONSHOT_API_KEY=your_moonshot_api_key DEEPSEEK_API_KEY=your_deepseek_api_key GEMINI_API_KEY=your_gemini_api_key CLAUDE_API_KEY=your_claude_api_key GPT_API_KEY=your_openai_api_key DASHSCOPE_BASE_URL=https://dashscope.aliyuncs.com/compatible-mode/v1 MOONSHOT_BASE_URL=https://api.moonshot.cn/v1 DEEPSEEK_BASE_URL=https://api.deepseek.com GEMINI_BASE_URL=https://generativelanguage.googleapis.com/v1beta/openai CLAUDE_BASE_URL=your_claude_openai_compatible_base_url GPT_BASE_URL=https://api.openai.com/v1 -
Install frontend dependencies:
cd frontend npm install
Start the FastAPI server with hot reloading enabled:
uvicorn app.main:app --reloadThe API will be available at http://localhost:8000.
Start the Webview:
cd frontend
npm run devThe Webview will be available at http://localhost:3000.
Run the unit tests of different modules:
pytest -xvs app/tests/test_storage.pypytest -xvs app/tests/test_rag.pyTo view database contents for debugging:
python -m app.utils.db_viewerCheck app/routers/ for API definitions.