Whatever message this page gives is out now! Go check it out!
embedAll(array text)Parameter | Type | Required | Description |
text | Array | Yes | Array of text strings to embed (batch input). |
<cfscript>
embeddingModel = {
provider: "openai",
modelName: "text-embedding-3-small",
apiKey: #application.apiKey#
};
texts = [
"Machine learning is a subset of artificial intelligence",
"ColdFusion is a rapid application development platform",
"Vector databases enable semantic search capabilities",
"Embeddings represent text as numerical vectors",
"Natural language processing uses neural networks"
];
result = embeddingModel.embedAll(texts);
writeDump(result)
break;
hasEmbeddings = isDefined("result") AND isStruct(result) AND structKeyExists(result, "embeddings") AND isArray(result.embeddings) AND arrayLen(result.embeddings) EQ 5;
writeOutput(hasEmbeddings);
</cfscript>