MCPcopy Create free account
hub / github.com/OpenDCAI/Paper2Any / resolve_cli_image_credentials

Function resolve_cli_image_credentials

script/cli_env.py:61–71  ·  view source on GitHub ↗
(
    image_api_url: str | None,
    image_api_key: str | None,
    *,
    fallback_url: str | None = None,
    fallback_key: str | None = None,
)

Source from the content-addressed store, hash-verified

59
60
61def resolve_cli_image_credentials(
62 image_api_url: str | None,
63 image_api_key: str | None,
64 *,
65 fallback_url: str | None = None,
66 fallback_key: str | None = None,
67) -> tuple[str, str]:
68 return (
69 image_api_url or os.getenv("DF_IMAGE_API_URL", "") or fallback_url or os.getenv("DF_API_URL", "https://api.openai.com/v1"),
70 image_api_key or os.getenv("DF_IMAGE_API_KEY", "") or fallback_key or os.getenv("DF_API_KEY", ""),
71 )
72
73
74def find_output_artifacts(base_dir: Path, patterns: Iterable[str]) -> list[Path]:

Callers 5

run_ppt2polish_workflowFunction · 0.90
run_paper2ppt_workflowFunction · 0.90
run_pdf2ppt_workflowFunction · 0.90
run_image2ppt_workflowFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected