Embedding Models
EmbeddingInputInsert
Used to create or update embedding inputs:EmbeddingInputResponse
Returned when retrieving embedding inputs:Hash Generation
Embedding inputs require a hash for deduplication and verification. Use theavenieca.encode() function:
Supported Hash Algorithms
sha256(default)sha384sha512sha224sha1sha3_256sha3_224sha3_512md5
Embedding Methods
create()
Create a new embedding input:get_all()
Retrieve all embedding inputs for a module:get_one()
Get a specific embedding input by database ID:get_one_with_hash()
Get an embedding input using its hash:update()
Update an existing embedding input:delete()
Delete an embedding input:Complete Example
Best Practices
- Consistent secrets - Use the same secret key across your application
- Unique inputs - The hash ensures deduplication of identical inputs
- Module organization - Group related inputs by module_id
- Hash verification - Use
get_one_with_hash()to verify inputs haven’t changed
Use Cases
- State mapping - Map human-readable text to state vectors
- Deduplication - Prevent duplicate embedding inputs
- Input tracking - Track what inputs generated which states
- Context preservation - Maintain semantic meaning of states