MCPcopy
hub / github.com/LAION-AI/Open-Assistant / createInferenceClient

Function createInferenceClient

website/src/lib/oasst_inference_client.ts:112–122  ·  view source on GitHub ↗
(jwt: JWT)

Source from the content-addressed store, hash-verified

110}
111
112export const createInferenceClient = (jwt: JWT) => {
113 const info: TrustedClient = {
114 api_key: process.env.INFERENCE_SERVER_API_KEY,
115 client: "website",
116 provider_account_id: jwt.backendUserId,
117 user_id: jwt.sub,
118 username: jwt.name,
119 };
120 const token = Buffer.from(JSON.stringify(info)).toString("base64");
121 return new OasstInferenceClient(token);
122};

Callers 12

getServerSidePropsFunction · 0.90
getServerSidePropsFunction · 0.90
index.tsFile · 0.90
hide.tsFile · 0.90
title.tsFile · 0.90
events.tsFile · 0.90
models.tsFile · 0.90
vote.tsFile · 0.90
message.tsFile · 0.90
handlerFunction · 0.90

Calls 1

toStringMethod · 0.80

Tested by

no test coverage detected