Spaces:
Runtime error
Runtime error
File size: 382 Bytes
0ad3564 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | # apps/rag/services/api_client.py
import httpx
from django.conf import settings
def fastapi_client(request):
token = request.COOKIES.get("access_token")
return httpx.Client(
base_url=settings.FASTAPI_BASE_URL,
headers={
"Authorization": f"Bearer {token}",
"Content-Type": "application/json",
},
timeout=300.0,
) |