mirror of
https://gitee.com/wanwujie/deer-flow
synced 2026-04-03 14:22:13 +08:00
feat: update save-demo
This commit is contained in:
@@ -4,11 +4,14 @@ import path from "path";
|
||||
import { env } from "process";
|
||||
|
||||
export async function main() {
|
||||
const threadId = process.argv[2];
|
||||
const url = new URL(
|
||||
`http://localhost:2026/api/langgraph/threads/${threadId}/history`,
|
||||
const url = new URL(process.argv[2]);
|
||||
const threadId = url.pathname.split("/").pop();
|
||||
const host = url.host;
|
||||
const apiURL = new URL(
|
||||
`/api/langgraph/threads/${threadId}/history`,
|
||||
`${url.protocol}//${host}`,
|
||||
);
|
||||
const response = await fetch(url, {
|
||||
const response = await fetch(apiURL, {
|
||||
method: "POST",
|
||||
headers: {
|
||||
"Content-Type": "application/json",
|
||||
|
||||
Reference in New Issue
Block a user