MCPcopy Index your code
hub / github.com/sqlchat/sqlchat / getApiEndpoint

Function getApiEndpoint

src/pages/api/chat.ts:10–14  ·  view source on GitHub ↗
(apiEndpoint: string)

Source from the content-addressed store, hash-verified

8};
9
10const getApiEndpoint = (apiEndpoint: string) => {
11 const url = new URL(apiEndpoint);
12 url.pathname = "/v1/chat/completions";
13 return url;
14};
15
16const handler = async (req: NextRequest) => {
17 const reqBody = await req.json();

Callers 1

handlerFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected