MCPcopy
hub / github.com/promptfoo/promptfoo / getShareableModelAuditUrl

Function getShareableModelAuditUrl

src/share.ts:887–899  ·  view source on GitHub ↗
(
  _audit: ModelAudit,
  remoteAuditId: string,
  showAuth: boolean = false,
)

Source from the content-addressed store, hash-verified

885 * @returns The shareable URL for the model audit.
886 */
887export function getShareableModelAuditUrl(
888 _audit: ModelAudit,
889 remoteAuditId: string,
890 showAuth: boolean = false,
891): string {
892 const appBaseUrl = cloudConfig.isEnabled()
893 ? cloudConfig.getAppUrl()
894 : getShareViewBaseUrl() || getDefaultShareViewBaseUrl();
895
896 const fullUrl = `${appBaseUrl}/model-audit/${remoteAuditId}`;
897
898 return showAuth ? fullUrl : stripAuthFromUrl(fullUrl);
899}

Callers 2

shareCommandFunction · 0.90

Calls 5

getShareViewBaseUrlFunction · 0.90
stripAuthFromUrlFunction · 0.85
getAppUrlMethod · 0.80
isEnabledMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…