getXClosestEmbeddings
$0.01/invocation
Retrieve the closest embeddings with our 'getXClosestEmbedding' function. Provide a query string, an array of strings, and specify the desired number of closest matches (X). The function generates embeddings for all strings and returns the top X closest matches. Streamline your similarity search tasks and enhance data analysis with this essential embedding retrieval tool.
getXClosestEmbeddings(
)
=
loading...
API
python
Ruby
>_
Google Sheets
Chat
Email
To use this function in your Ruby application:
1. Install it:
gem install func_live
2. Copy over this snippet:
FuncLive.token = 'FUNC_TOKEN'
FuncLive.("getXClosestEmbeddings", {
"text": "Who is Birdperson",
"items": [
"Rick Sanchez is a brilliant but eccentric scientist, known for his chaotic adventures across the multiverse alongside his reluctant companion Morty.",
"Morty Smith, a regular teenager, often finds himself thrust into absurd and perilous situations across different dimensions, grappling with the consequences of his grandfather's actions.",
"Birdperson, a skilled and loyal ally, is often seen accompanying Rick on his adventures and offering wisdom and support.",
"Squanchy, a fun-loving party enthusiast with a unique and colorful appearance, is often found reveling in the chaos alongside Rick and the gang.",
"Mr. Poopybutthole, a beloved family friend known for his quirky personality and memorable catchphrase, brings joy and laughter wherever he goes.",
"Unity, a sentient hive mind capable of controlling entire planets, has a complicated relationship with Rick and a penchant for exploration and experimentation.",
"Mr. Meeseeks, a helpful yet tormented entity, is summoned into existence to fulfill a singular purpose, often leading to humorous and disastrous consequences.",
"Beth Smith, a determined individual, has a desire to keep her family together, navigating the challenges of parenthood and personal identity in a chaotic universe.",
"Jerry Smith, an insecure but well-meaning family man, is constantly striving to find his place in the world despite his many shortcomings.",
"Summer Smith, a typical teenage girl with an adventurous spirit, often finds herself embroiled in bizarre and dangerous situations alongside her family."
],
"X": 3
})
3. Make sure to replace FUNC_TOKEN with an actual token from tokens.wakeflow.io
For more information: https://rubygems.org/gems/func_live