Signal · Methods
signal.embed
signal.embed(input) returns embeddings: one vector for a string, or for an array of strings an array of vectors in input order, from a single request. Example: the provider response lists the vectors last first, and Signal returns them in input order. The vectors are scripted; no model is called.
{
model: 'written-here',
input: ['The Tempest', 'Twelfth Night'],
}[
{ index: 1, embedding: [0.12, 0.88, 0.05] },
{ index: 0, embedding: [0.91, 0.1, 0.02] },
][[0.91, 0.1, 0.02], [0.12, 0.88, 0.05]]
Runs in this page on the installed package. The input and the expected output are defined by the example.