Skip to main content

Embed Text using Embed  

Automatically embed text into vectors using your configured embedding model.
The text is automatically embedded with an embedding model of your choice (can be defined in your config.hx.json file). The default embedding model is text-embedding-ada-002 from OpenAI.
Make sure to set your OPENAI_API_KEY environment variable with your API key in the same location as the queries.hx, schema.hx and config.hx.json files. When using the SDKs or curling the endpoint, the query name must match what is defined in the queries.hx file exactly.

Example 1: Creating a vector from text

Here’s how to run the query using the SDKs or curl

Example 2: Searching with text embeddings

Here’s how to run the query using the SDKs or curl

Example 3: Creating a vector and connecting it to a user

Here’s how to run the query using the SDKs or curl

Example 4: Semantic search with postfiltering

Here’s how to run the query using the SDKs or curl