GetEmbeddingAsFile

Converts an embedding vector from text format to binary container data.

Format 

GetEmbeddingAsFile ( text {; fileNameWithExtension } )

Parameters 

text - any text expression representing embedding vectors as a JSON array.

fileNameWithExtension - any text expression representing the filename and extension to use for the returned container data. If not specified, a default filename and extension is used.

Parameters in braces { } are optional.

Data type returned 

container

Originated in version 

21.0

Description 

The GetEmbeddingAsFile and GetEmbeddingAsText functions convert embedding vectors between text (a JSON array) and binary container data. They may be useful for exporting vectors for use outside of a FileMaker Pro file or for importing them into a FileMaker Pro file.

Example 1 

Converts the embedding vector in the Meetings::Note_Embedding_JSON text field into binary data and stores it as a file in the Meetings::Note_Embedding container field with the specified filename.

Copy
Set Field [ Meetings::Note_Embedding ; GetEmbeddingAsFile ( Meetings::Note_Embedding_JSON ; "embedding_from_FileMaker.fve" ) ]