mirror of
https://github.com/invariantlabs-ai/invariant-gateway.git
synced 2026-08-23 17:12:29 +02:00
Use pyproject.toml instead of requirements.txt and fix some broken tests.
This commit is contained in:
@@ -8,8 +8,7 @@ from typing import Optional
|
||||
import fastapi
|
||||
from httpx import HTTPStatusError
|
||||
|
||||
from common.guardrails import Guardrail, GuardrailAction, GuardrailRuleSet
|
||||
from common.authorization import extract_authorization_from_headers
|
||||
from gateway.common.guardrails import Guardrail, GuardrailAction, GuardrailRuleSet
|
||||
|
||||
|
||||
def extract_policy_from_headers(request: Optional[fastapi.Request]) -> Optional[str]:
|
||||
@@ -40,7 +39,7 @@ class GatewayConfig:
|
||||
Loads the guardrails from the file specified in GUARDRAILS_FILE_PATH.
|
||||
Returns the guardrails file content as a string.
|
||||
"""
|
||||
from integrations.guardrails import _preload
|
||||
from gateway.integrations.guardrails import _preload
|
||||
|
||||
guardrails_file = os.getenv("GUARDRAILS_FILE_PATH", "")
|
||||
if not guardrails_file:
|
||||
|
||||
@@ -5,9 +5,9 @@ from typing import Any, Dict, Optional
|
||||
|
||||
import fastapi
|
||||
|
||||
from common.config_manager import GatewayConfig
|
||||
from common.guardrails import GuardrailRuleSet, Guardrail, GuardrailAction
|
||||
from common.authorization import (
|
||||
from gateway.common.config_manager import GatewayConfig
|
||||
from gateway.common.guardrails import GuardrailRuleSet, Guardrail, GuardrailAction
|
||||
from gateway.common.authorization import (
|
||||
extract_guardrail_service_authorization_from_headers,
|
||||
)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user