Spaces:
Running
Running
File size: 522 Bytes
a056d23 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 | from dataclasses import dataclass
from typing import Callable
@dataclass
class Provider:
name: str
base_url: str
auth_header: str
auth_value: Callable[[str], str]
handles_202: bool
env_real_key: str
PROVIDERS: dict[str, Provider] = {
"nvidia": Provider(
name="nvidia",
base_url="https://integrate.api.nvidia.com",
auth_header="Authorization",
auth_value=lambda key: f"Bearer {key}",
handles_202=True,
env_real_key="REAL_NVIDIA_KEY",
),
}
|