MCPcopy Create free account
hub / github.com/027xiguapi/code-box / getSummary

Function getSummary

utils/coze.ts:6–27  ·  view source on GitHub ↗
(url: string)

Source from the content-addressed store, hash-verified

4const appId = process.env.PLASMO_PUBLIC_COZE_APPID
5
6export async function getSummary(url: string) {
7 const data = {
8 workflow_id: workflowId,
9 app_id: appId,
10 parameters: {
11 url: url
12 }
13 }
14 try {
15 const res = await fetch(cozeUrl, {
16 method: "POST",
17 headers: {
18 Authorization: `Bearer ${token}`,
19 "Content-Type": "application/json"
20 },
21 body: JSON.stringify(data)
22 }).then((response) => response.json()) // 解析返回的 JSON 数据
23 return res
24 } catch (error) {
25 console.error("Error:", error)
26 }
27}

Callers 1

CustomOverlayFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected