Document Interfaces
IAIDocument
Document interface from the AI Providers SDK for RAG operations.src/interfaces.ts
This interface is defined in the
@obsidian-ai-providers/sdk package. It represents a document chunk used in retrieval-augmented generation (RAG).Reference Interfaces
FileReference
Represents a file in the vault for the action palette file picker.src/interfaces.ts
Full path to the file in the vaultExample:
"folder/note.md"File name without extensionExample:
"note"File extensionExample:
"md" or "pdf"CommandReference
Represents an Obsidian command.src/interfaces.ts
Command name/ID
Human-readable command description
ProviderReference
Represents an AI provider for selection in the action palette.src/interfaces.ts
Unique provider ID
Model name or display name
Provider service name (e.g., “Ollama”, “OpenAI”)
Optional URL to the provider service
ModelReference
Represents a specific AI model.src/interfaces.ts
Model ID used by the providerExample:
"llama3.2:latest"Display name for the modelExample:
"Llama 3.2"CreativityReference
Represents a creativity level option.src/interfaces.ts
Creativity level keyValues:
"", "low", "medium", "high"Localized display name for the creativity level
SystemPromptReference
Represents a reusable system prompt from actions.src/interfaces.ts
Action name that provides this system prompt
The system prompt text
Token and Event Interfaces
TextToken
Represents a parsed token from user input in the action palette.src/interfaces.ts
Type of token parsed from input
Raw content of the token
Start position in the input string
End position in the input string
Resolved file path (when type is
"file")Command name (when type is
"command")ActionPaletteSubmitEvent
Event data when the action palette is submitted.src/interfaces.ts
User input text/prompt
Array of file paths selected for context
Optional system prompt selected from action templates
Callback Types
Function signatures for action palette callbacks.src/interfaces.ts
GetFilesCallback
Returns available files for selection.GetProvidersCallback
Returns available AI providers.OnProviderChangeCallback
Called when user changes the selected provider.GetModelsCallback
Returns available models for a given provider.OnModelChangeCallback
Called when user changes the selected model.OnCreativityChangeCallback
Called when user changes the creativity level.GetSystemPromptsCallback
Returns available system prompts from actions.Usage Example
These interfaces are used throughout the action palette implementation insrc/main.ts:240-322: