MCPcopy Create free account
hub / github.com/TeleBoxOrg/TeleBox_Plugins / extractFileName

Function extractFileName

sum/sum.ts:469–505  ·  view source on GitHub ↗
(message: any)

Source from the content-addressed store, hash-verified

467 "anthropic-version": "2023-06-01",
468 "Content-Type": "application/json",
469 },
470 timeout,
471 },
472 );
473 const content = response.data?.content
474 ?.filter((item: any) => item?.type === "text")
475 ?.map((item: any) => item.text)
476 ?.join("\n")
477 ?.trim();
478 if (!content) throw new Error("Anthropic 返回内容为空");
479 return content;
480}
481
482async function callWithProtocol(
483 protocol: Exclude<ProviderProtocol, "auto">,
484 provider: CustomProvider,
485 input: string,
486 timeout: number,
487): Promise<string> {
488 switch (protocol) {
489 case "responses":
490 return callResponses(
491 provider.api_key,
492 provider.base_url,
493 provider.model,
494 input,
495 timeout,
496 );
497 case "gemini":
498 return callGemini(
499 provider.api_key,
500 provider.base_url,
501 provider.model,
502 input,
503 timeout,
504 );
505 case "anthropic":
506 return callAnthropic(
507 provider.api_key,
508 provider.base_url,

Callers 2

getGroupMessagesFunction · 0.85
getGroupMessagesByTimeFunction · 0.85

Calls 1

isStickerOrEmojiFunction · 0.85

Tested by

no test coverage detected