MCPcopy
hub / github.com/OpenBMB/ChatDev / fetchWorkflowYAML

Function fetchWorkflowYAML

frontend/src/utils/apiFunctions.js:235–247  ·  view source on GitHub ↗
(filename)

Source from the content-addressed store, hash-verified

233
234// Fetch YAML file content
235export async function fetchWorkflowYAML(filename) {
236 try {
237 const response = await fetch(apiUrl(`/api/workflows/${encodeURIComponent(filename)}/get`))
238 if (!response.ok) {
239 throw new Error(`Failed to load YAML file: ${filename}, status: ${response.status}`)
240 }
241 const data = await response.json()
242 return data.content
243 } catch (err) {
244 console.error('Failed to load YAML file:', err)
245 throw err
246 }
247}
248
249// Fetch YAML for the specified workflow
250export async function fetchYaml(filename) {

Callers

nothing calls this directly

Calls 2

apiUrlFunction · 0.85
errorMethod · 0.45

Tested by

no test coverage detected