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

Function isStickerOrEmoji

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

Source from the content-addressed store, hash-verified

439 timeout: number,
440): Promise<string> {
441 const response = await axios.post(
442 `${normalizedBaseUrl(baseUrl)}/v1beta/models/${encodeURIComponent(model)}:generateContent?key=${encodeURIComponent(apiKey)}`,
443 { contents: [{ role: "user", parts: [{ text: input }] }] },
444 { headers: { "Content-Type": "application/json" }, timeout },
445 );
446 const content = response.data?.candidates?.[0]?.content?.parts
447 ?.map((part: any) => part?.text ?? "")
448 .join("")
449 .trim();
450 if (!content) throw new Error("Gemini 返回内容为空");
451 return content;
452}
453
454async function callAnthropic(
455 apiKey: string,
456 baseUrl: string,
457 model: string,
458 input: string,
459 timeout: number,
460): Promise<string> {
461 const response = await axios.post(
462 `${normalizedBaseUrl(baseUrl)}/v1/messages`,
463 { model, max_tokens: 2000, messages: [{ role: "user", content: input }] },
464 {
465 headers: {
466 "x-api-key": apiKey,
467 "anthropic-version": "2023-06-01",
468 "Content-Type": "application/json",
469 },

Callers 1

extractFileNameFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected