MCPcopy Create free account
hub / github.com/di-sukharev/opencommit / batchEmbedContents

Function batchEmbedContents

out/cli.cjs:79575–79581  ·  view source on GitHub ↗
(apiKey, model, params, requestOptions)

Source from the content-addressed store, hash-verified

79573async function countTokens(apiKey, model, params, singleRequestOptions) {
79574 const response = await makeModelRequest(model, Task.COUNT_TOKENS, apiKey, false, JSON.stringify(params), singleRequestOptions);
79575 return response.json();
79576}
79577async function embedContent(apiKey, model, params, requestOptions) {
79578 const response = await makeModelRequest(model, Task.EMBED_CONTENT, apiKey, false, JSON.stringify(params), requestOptions);
79579 return response.json();
79580}
79581async function batchEmbedContents(apiKey, model, params, requestOptions) {
79582 const requestsWithModel = params.requests.map((request3) => {
79583 return Object.assign(Object.assign({}, request3), { model });
79584 });

Callers 1

batchEmbedContentsMethod · 0.85

Calls 2

makeModelRequestFunction · 0.85
jsonMethod · 0.45

Tested by

no test coverage detected