Embeddings Settings
Embeddings Settings
toothfairyai@latest…Manager for embeddings settings operations.
This manager provides methods to create, update, and manage embeddings settings.
Example:
>>> client = ToothFairyClient(api_key="...", workspace_id="...")
>>> embeddings_settings = client.embeddings_settings.get(...)
Accessed via client.embeddingsSettings.
Methods
| Method | HTTP | Endpoint |
|---|---|---|
update | POST | POST /embeddings_settings/update |
get | GET | GET /embeddings_settings/get/{embeddings_settings_id} |
update
Update embeddings settings.
def update(
embeddings_settings_id: str,
max_chunk_words: Optional[int] = None,
max_overlap_sentences: Optional[int] = None,
chunking_strategy: Optional[str] = None,
image_extraction_strategy: Optional[str] = None,
min_image_width: Optional[int] = None,
min_image_height: Optional[int] = None,
aspect_ratio_min: Optional[float] = None,
aspect_ratio_max: Optional[float] = None
) -> EmbeddingsSettings
Endpoint: POST /embeddings_settings/update · API service
Request fields
| Python kwarg | Wire field | Type | Required | Description |
|---|---|---|---|---|
workspace_id | workspaceid | string | no | Unique workspace identifier (UUID v4) |
max_chunk_words | maxChunkWords | integer | no | Maximum words per chunk when splitting documents (200-1500) |
max_overlap_sentences | maxOverlapSentences | integer | no | Number of overlapping sentences between chunks (0-5) |
chunking_strategy | chunkingStrategy | string | no | Chunking strategy: keywords or summary |
Allowed: keywords, summary |
| image_extraction_strategy | imageExtractionStrategy | string | no | Image extraction strategy: safe or brute
Allowed: safe, brute |
| min_image_width | minImageWidth | integer | no | Minimum image width for extraction (pixels, min 100) |
| min_image_height | minImageHeight | integer | no | Minimum image height for extraction (pixels, min 100) |
| aspect_ratio_min | aspectRatioMin | string | no | Minimum aspect ratio for image extraction (0.1-1.0) |
| aspect_ratio_max | aspectRatioMax | string | no | Maximum aspect ratio for image extraction (min 1.0) |
Always pass
snake_casekeyword arguments — the Python kwarg column shows the exact name to use for each wire field (as a named parameter where it appears in the method signature, otherwise via**kwargs). The SDK converts it deterministically to thecamelCasewire key the API expects. PassingcamelCasedirectly is deprecated: it emits a warning and converts to the same wire key.
Response fields
| Field | Type | Description |
|---|---|---|
workspaceid | string | Unique workspace identifier (UUID v4) |
maxChunkWords | integer | Maximum words per chunk when splitting documents (200-1500) |
maxOverlapSentences | integer | Number of overlapping sentences between chunks (0-5) |
chunkingStrategy | string | Chunking strategy: keywords or summary |
Allowed: keywords, summary |
| imageExtractionStrategy | string | Image extraction strategy: safe or brute
Allowed: safe, brute |
| minImageWidth | integer | Minimum image width for extraction (pixels, min 100) |
| minImageHeight | integer | Minimum image height for extraction (pixels, min 100) |
| aspectRatioMin | string | Minimum aspect ratio for image extraction (0.1-1.0) |
| aspectRatioMax | string | Maximum aspect ratio for image extraction (min 1.0) |
Example
client.embeddingsSettings.update(embeddings_settings_id="agent-id")
get
Get a embeddings_settings by ID.
def get(embeddings_settings_id: str) -> EmbeddingsSettings
Endpoint: GET /embeddings_settings/get/{embeddings_settings_id} · API service
Response
Returns the EmbeddingsSettings object — fields documented in the update section above.
Example
client.embeddingsSettings.get(embeddings_settings_id="agent-id")