UInworldTextEmbedder | Inherits from: UObject
Provides functionality to embed text as vector embeddings using Inworld AI’s Text Embedding services. This class offers both synchronous and asynchronous methods for embedding text inputs into high-dimensional vector representations. Delegates can be used to handle asynchronous results, which include success indicators and the resulting embeddings. Text embeddings are useful for semantic similarity comparisons, intent matching, and knowledge retrieval operations.
Methods
Reference
CreateInworldTextEmbedder
Creates an instance of UInworldTextEmbedder with the given configuration ID.
Examples
Parameters
| Parameter | Type | Description | 
|---|---|---|
| ConfigId | const FString& | Identifier for the configuration to use for creating the text embedder. | 
Returns
Type:UInworldTextEmbedder*
Description: A pointer to the instance of UInworldTextEmbedder.
Embed
Embeds the input text into embeddings synchronously.
Examples
Parameters
| Parameter | Type | Description | 
|---|---|---|
| Text | const TArray<FString>& | An array of text strings to embed. | 
| OutTextEmbeddings | TArray<FInworldTextEmbedding>& | Outputs the resulting embeddings if embedding succeeds. | 
Returns
Type:bool
Description: True if the embedding operation is successful, false otherwise.
EmbedAsync
Embeds the input text into embeddings asynchronously.
Examples
Parameters
| Parameter | Type | Description | 
|---|---|---|
| Text | const TArray<FString>& | An array of text strings to embed. | 
| Callback | FOnTextEmbedded | A delegate to handle the embedding result asynchronously. | 
EmbedAsync
