MCPcopy Create free account
hub / github.com/OpenRaiser/PaperFlow / _get_openai_api_key

Function _get_openai_api_key

skills/embedding/scripts/embed.py:91–94  ·  view source on GitHub ↗
(provider_hint: Optional[str] = None)

Source from the content-addressed store, hash-verified

89
90
91def _should_prefer_dashscope_credentials(provider_hint: Optional[str] = None) -> bool:
92 hint = str(provider_hint or "").strip().lower()
93 if hint in {"dashscope", "aliyun", "bailian"}:
94 return True
95
96 base_url = _get_first_env_value("OPENAI_BASE_URL", "DASHSCOPE_BASE_URL").lower()
97 return "dashscope.aliyuncs.com" in base_url

Callers 1

__init__Method · 0.85

Calls 2

_get_first_env_valueFunction · 0.70

Tested by

no test coverage detected