<p>This is a sample for how to build a Spin component, which you can use to generate embeddings for texts, and compare against. The component is general-purpose in that it accepts text you want to store in the database. You can update and delete text in the database, e.g. from a web hook, or by different types of automation. You can also call the component to compare a given text string with what’s in the database already. The component will return a sorted list of text already in the database.</p> <p>This is built using the Serverless AI features in Spin and Fermyon Cloud.</p> <p>Make sure to run the ./dev/db_scheme.sql to create the required schema in the database. I.e. spin up –sqlite @dev/db_scheme.sql</p> <h2>Pre-requisites</h2> <ul> <li>spin (1.5-pre)</li> </ul> <h2>Getting Started</h2> <ul> <li>Clone the repository</li> <li>Build and Run the app, while creating the DB Schema <br> <code>spin build &amp;&amp; spin up --sqlite @dev/db_scheme.sql</code></li> <li>You can use the small front-end to play with the API.</li> </ul> <p>More details are in the sample repo.</p>