export type GetApiInferenceClustersClusterIdInferencesArgs = {cluster_id: string}; export type GetApiInferenceClustersClusterIdInferencesOptions = {baseUrl: string, fetch?: typeof fetch | undefined}; /** * [Retired] List cluster member inferences * * GET /inference-clusters/{cluster_id}/inferences */ export const getApiInferenceClustersClusterIdInferences = async (args: GetApiInferenceClustersClusterIdInferencesArgs, options: GetApiInferenceClustersClusterIdInferencesOptions) => { const {baseUrl, fetch: fetchFn = fetch} = options ?? {} const query = new URLSearchParams() const headers = new Headers() const url = `${baseUrl.replace(/\/+$/, '')}/inference-clusters/${encodeURIComponent(String(args.cluster_id))}/inferences${query.size > 0 ? `?${query}` : ''}` const res = await fetchFn(url, {method: "GET", headers}) if (!res.ok) throw new Error(`Request failed with status ${res.status}`, {cause: {status: res.status, body: await res.text()}}) return undefined };