Skip to article frontmatterSkip to article content
Site not loading correctly?

This may be due to an incorrect BASE_URL configuration. See the MyST Documentation for reference.

Embeddings - optional

PyRIT also allows to get embeddings. The embedding response is a wrapper for the OpenAI embedding API.

Fetching long content....

Embeddings Serialization

All the PyRIT’s embeddings are easily serializable. This allows you to easily save and load embeddings for later use, and be able to inspect the value of the embeddings offline (since embeddings are stored as JSON objects).

To view the json of an embedding

To save an embedding to disk

'/workspace/dbdata/16b89acd0bf3edce72697ac99f23682f46a604af57a6e57d2c42052fc87dc023.json'

To load an embedding from disk

'/workspace/dbdata/16b89acd0bf3edce72697ac99f23682f46a604af57a6e57d2c42052fc87dc023.json'