kopia lustrzana https://github.com/transitive-bullshit/chatgpt-api
23 wiersze
436 B
TypeScript
23 wiersze
436 B
TypeScript
![]() |
import type { Deployment } from '@agentic/platform-api-client'
|
||
|
|
||
|
export function pruneDeployment(
|
||
|
deployment: Deployment,
|
||
|
{ verbose = false }: { verbose?: boolean }
|
||
|
): Deployment {
|
||
|
if (!verbose) {
|
||
|
const d = structuredClone(deployment)
|
||
|
|
||
|
if (d.readme) {
|
||
|
d.readme = '<omitted>'
|
||
|
}
|
||
|
|
||
|
if (d.originAdapter?.type === 'openapi') {
|
||
|
d.originAdapter.spec = '<omitted>'
|
||
|
}
|
||
|
|
||
|
return d
|
||
|
}
|
||
|
|
||
|
return deployment
|
||
|
}
|