mirror of
https://github.com/dograh-hq/dograh.git
synced 2026-06-07 07:55:16 +02:00
feat: add qa node in workflow builder (#172)
* feat: add qa node in workflow builder * feat: add qa analysis token usage in usage_info * fix: mask the API key in QA node * feat: add advanced configuration in QA node
This commit is contained in:
parent
f1f4830012
commit
a836825b83
30 changed files with 1619 additions and 265 deletions
|
|
@ -12,15 +12,16 @@ References:
|
|||
"""
|
||||
|
||||
import os
|
||||
|
||||
# Load environment variables before importing anything else
|
||||
from pathlib import Path
|
||||
from typing import AsyncGenerator
|
||||
from urllib.parse import urlparse, urlunparse
|
||||
|
||||
# Load environment variables before importing anything else
|
||||
from dotenv import load_dotenv
|
||||
|
||||
# Load .env.test from api directory for test configuration
|
||||
env_path = Path(__file__).parent / ".env.test"
|
||||
# Load .env.test before importing api.constants (which reads DATABASE_URL at import time)
|
||||
env_path = Path(__file__).resolve().parent / ".env.test"
|
||||
load_dotenv(env_path)
|
||||
|
||||
import logging
|
||||
|
|
@ -29,6 +30,8 @@ import sys
|
|||
import loguru
|
||||
import pytest
|
||||
|
||||
from api.constants import APP_ROOT_DIR # noqa: E402
|
||||
|
||||
|
||||
def setup_test_logging():
|
||||
"""Configure logging for tests using LOG_LEVEL from .env.test"""
|
||||
|
|
@ -191,7 +194,7 @@ async def run_migrations(database_url: str):
|
|||
from alembic.config import Config
|
||||
|
||||
# Get alembic.ini path
|
||||
alembic_ini_path = Path(__file__).parent / "alembic.ini"
|
||||
alembic_ini_path = APP_ROOT_DIR / "alembic.ini"
|
||||
|
||||
# Create alembic config
|
||||
alembic_cfg = Config(str(alembic_ini_path))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue