OpenAI resource path exists

Script windmill Verified

by admin ยท 8/13/2023

The script

Submitted by admin Typescript (fetch-only)
Verified 370 days ago
1
/**
2
 * OpenAI resource path exists
3
 *
4
 */
5
export async function main(workspace: string) {
6
  const url = new URL(
7
    `${BASE_URL}/api/w/${workspace}/workspaces/exists_openai_resource_path`
8
  );
9

10
  const response = await fetch(url, {
11
    method: "GET",
12
    headers: {
13
      Authorization: "Bearer " + WM_TOKEN,
14
    },
15
    body: undefined,
16
  });
17
  return await response.text();
18
}
19