mirror of
https://github.com/openai/openai-cookbook
synced 2024-11-19 15:25:37 +00:00
parent
9acc674919
commit
7deca069ce
@ -6,7 +6,7 @@ import { embedding } from "./openai";
|
|||||||
const MAX_CHAR_LENGTH = 250 * 4;
|
const MAX_CHAR_LENGTH = 250 * 4;
|
||||||
|
|
||||||
// This function takes a text and returns an array of embeddings for each chunk of the text
|
// This function takes a text and returns an array of embeddings for each chunk of the text
|
||||||
// The text is split into chunks of a given maximum charcter length
|
// The text is split into chunks of a given maximum character length
|
||||||
// The embeddings are computed in batches of a given size
|
// The embeddings are computed in batches of a given size
|
||||||
export async function getEmbeddingsForText({
|
export async function getEmbeddingsForText({
|
||||||
text,
|
text,
|
||||||
|
Loading…
Reference in New Issue
Block a user