mirror of
https://gitee.com/wanwujie/deer-flow
synced 2026-04-28 16:24:47 +08:00
15 lines
305 B
TypeScript
15 lines
305 B
TypeScript
|
|
import { urlOfArtifact } from "./utils";
|
||
|
|
|
||
|
|
export async function loadArtifactContent({
|
||
|
|
filepath,
|
||
|
|
threadId,
|
||
|
|
}: {
|
||
|
|
filepath: string;
|
||
|
|
threadId: string;
|
||
|
|
}) {
|
||
|
|
const url = urlOfArtifact({ filepath, threadId });
|
||
|
|
const response = await fetch(url);
|
||
|
|
const text = await response.text();
|
||
|
|
return text;
|
||
|
|
}
|