mirror of
https://github.com/BerriAI/litellm.git
synced 2026-09-08 22:21:35 +00:00
feat: support per-function ledger paths
Enables looking up a ledger by SDK function instead of a single hardcoded OCR path.
This commit is contained in:
parent
79586d10cc
commit
09585ae0de
1 changed files with 8 additions and 1 deletions
|
|
@ -5,7 +5,14 @@ from dataclasses import dataclass
|
|||
from pathlib import Path
|
||||
from typing import Any
|
||||
|
||||
LEDGER_PATH = Path(__file__).parent / "core" / "ocr" / "ocr_test_ledger.json"
|
||||
LEDGER_ROOT = Path(__file__).parent / "core"
|
||||
|
||||
|
||||
def ledger_path_for(sdk_function: str) -> Path:
|
||||
return LEDGER_ROOT / sdk_function / f"{sdk_function}_test_ledger.json"
|
||||
|
||||
|
||||
LEDGER_PATH = ledger_path_for("ocr")
|
||||
|
||||
|
||||
@dataclass(frozen=True, slots=True)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue