MCPcopy Index your code
hub / github.com/di-sukharev/opencommit / getAudioTranslation

Function getAudioTranslation

out/cli.cjs:78225–78239  ·  view source on GitHub ↗
(context, deploymentName, fileContent, formatOrOptions, inputOptions)

Source from the content-addressed store, hash-verified

78223 tracingOptions,
78224 requestOptions
78225 })), { contentType: "multipart/form-data", body: Object.assign(Object.assign(Object.assign({}, snakeCaseKeys(rest)), { file: createFile(fileContent, "placeholder.wav") }), response_format ? { response_format } : {}) }));
78226 if (status !== "200") {
78227 throw body.error;
78228 }
78229 return response_format !== "verbose_json" ? body : camelCaseKeys(body);
78230}
78231async function getAudioTranslation(context, deploymentName, fileContent, formatOrOptions, inputOptions) {
78232 const options = inputOptions !== null && inputOptions !== void 0 ? inputOptions : typeof formatOrOptions === "string" ? {} : formatOrOptions !== null && formatOrOptions !== void 0 ? formatOrOptions : {};
78233 const response_format = typeof formatOrOptions === "string" ? formatOrOptions : void 0;
78234 const { abortSignal, onResponse, requestOptions, tracingOptions } = options, rest = __rest(options, ["abortSignal", "onResponse", "requestOptions", "tracingOptions"]);
78235 const { body, status } = await context.pathUnchecked("deployments/{deploymentName}/audio/translations", deploymentName).post(Object.assign(Object.assign({}, operationOptionsToRequestParameters({
78236 abortSignal,
78237 onResponse,
78238 tracingOptions,
78239 requestOptions
78240 })), { contentType: "multipart/form-data", body: Object.assign(Object.assign(Object.assign({}, snakeCaseKeys(rest)), { file: createFile(fileContent, "placeholder.wav") }), response_format ? { response_format } : {}) }));
78241 if (status !== "200") {
78242 throw body.error;

Callers 1

getAudioTranslationMethod · 0.85

Calls 6

__restFunction · 0.85
snakeCaseKeysFunction · 0.85
createFileFunction · 0.85
camelCaseKeysFunction · 0.85
postMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…