AI Placement¶
obsidian_palace.vault.placement
¶
AI-assisted file placement within the Obsidian vault.
Uses Claude to analyze the vault structure and incoming content to determine the optimal location for new files.
logger = logging.getLogger(__name__)
module-attribute
¶
ANTHROPIC_API_URL = 'https://api.anthropic.com/v1/messages'
module-attribute
¶
PLACEMENT_MODEL = 'claude-sonnet-4-20250514'
module-attribute
¶
determine_placement(content: str, title: str | None = None) -> str
async
¶
Use AI to determine where a new note should be placed in the vault.
Sends the vault's folder structure and the note's content to Claude, which returns a recommended path.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
content
|
str
|
The markdown content of the note. |
required |
title
|
str | None
|
Optional title for additional context. |
None
|
Returns:
| Type | Description |
|---|---|
str
|
A relative path within the vault (e.g., "Projects/ObsidianPalace/design-notes.md"). |