MCPcopy
hub / github.com/tbxark/ChatGPT-Telegram-Workers / fetch

Function fetch

packages/lib/core/src/index.ts:10–21  ·  view source on GitHub ↗
(request: Request, env: any)

Source from the content-addressed store, hash-verified

8
9export const Workers = {
10 async fetch(request: Request, env: any): Promise<Response> {
11 try {
12 ENV.merge(env);
13 return createRouter().fetch(request);
14 } catch (e) {
15 console.error(e);
16 return new Response(JSON.stringify({
17 message: (e as Error).message,
18 stack: (e as Error).stack,
19 }), { status: 500 });
20 }
21 },
22};

Callers 15

handleCommandMessageFunction · 0.85
jsonRequestMethod · 0.85
formDataRequestMethod · 0.85
fetchImageFunction · 0.85
DalleClass · 0.85
CohereClass · 0.85
loadWorkersModelListFunction · 0.85
fetchMethod · 0.85
requestChatCompletionsFunction · 0.85
GeminiClass · 0.85
loadOpenAIModelListFunction · 0.85

Calls 3

createRouterFunction · 0.90
mergeMethod · 0.45
fetchMethod · 0.45

Tested by

no test coverage detected