<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Dapr Vector JavaScript SDK on Dapr Docs</title><link>https://docs.dapr.io/developing-applications/sdks/js/js-vector/</link><description>Recent content in Dapr Vector JavaScript SDK on Dapr Docs</description><generator>Hugo</generator><language>en</language><atom:link href="https://docs.dapr.io/developing-applications/sdks/js/js-vector/index.xml" rel="self" type="application/rss+xml"/><item><title>How to: Store and query vectors with the Dapr JavaScript SDK</title><link>https://docs.dapr.io/developing-applications/sdks/js/js-vector/js-vector-howto/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://docs.dapr.io/developing-applications/sdks/js/js-vector/js-vector-howto/</guid><description>&lt;p>Use &lt;code>DaprClient.vector&lt;/code> to store precomputed embeddings and find similar records through a Dapr vector store component. This guide covers collection configuration, upserts, retrieval, similarity queries, batch queries, and deletes.&lt;/p>
&lt;h2 id="prerequisites">Prerequisites&lt;/h2>
&lt;ul>
&lt;li>&lt;a href="https://docs.dapr.io/getting-started/install-dapr-cli/">Dapr CLI&lt;/a>&lt;/li>
&lt;li>An initialized &lt;a href="https://docs.dapr.io/getting-started/install-dapr-selfhost/">Dapr environment&lt;/a> with a Vector-capable runtime from the 1.19 release line or later&lt;/li>
&lt;li>&lt;a href="https://nodejs.org/">Node.js&lt;/a> 18 or later&lt;/li>
&lt;li>The &lt;a href="https://www.npmjs.com/package/@dapr/dapr">&lt;code>@dapr/dapr&lt;/code>&lt;/a> package, version 3.19.0 or later&lt;/li>
&lt;li>A configured vector store component, such as the in-memory component below&lt;/li>
&lt;/ul>


&lt;div class="alert alert-warning" role="alert">
&lt;h4 class="alert-heading">Runtime support&lt;/h4>

 Use a Dapr runtime that includes the Vector API. Installing JavaScript SDK 3.19.0 alone does not enable runtime support for Vector.

&lt;/div>

&lt;p>In your application directory, initialize an npm project if you do not already have one, then install the SDK:&lt;/p></description></item><item><title>Vector client usage</title><link>https://docs.dapr.io/developing-applications/sdks/js/js-vector/js-vector-client-usage/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://docs.dapr.io/developing-applications/sdks/js/js-vector/js-vector-client-usage/</guid><description>&lt;p>Vector is available through &lt;code>DaprClient.vector&lt;/code> in JavaScript SDK 3.19.0 or later. Both HTTP and gRPC use the alpha Vector API and require a Vector-capable Dapr runtime from the 1.19 release line or later. Installing the JavaScript SDK alone does not enable the Vector API.&lt;/p>
&lt;h2 id="client-lifetime-and-configuration">Client lifetime and configuration&lt;/h2>
&lt;p>Reuse a long-lived &lt;code>DaprClient&lt;/code> rather than creating a client for each operation. Await outstanding operations before calling &lt;code>await client.stop()&lt;/code> during application shutdown.&lt;/p></description></item></channel></rss>