storage
Class info¶
Classes¶
Name | Children | Inherits |
---|---|---|
BaseStorageProviderConfig llmling_agent.models.storage |
||
FileStorageConfig llmling_agent.models.storage File storage configuration. |
||
Mem0Config llmling_agent.models.storage Configuration for mem0 storage. |
||
MemoryStorageConfig llmling_agent.models.storage In-memory storage configuration for testing. |
||
SQLStorageConfig llmling_agent.models.storage SQL database storage configuration. |
||
StorageConfig llmling_agent.models.storage Global storage configuration. |
||
TextLogConfig llmling_agent.models.storage Text log configuration. |
🛈 DocStrings¶
BaseStorageProviderConfig
¶
Bases: BaseModel
Source code in src/llmling_agent/models/storage.py
26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 |
|
agents
class-attribute
instance-attribute
¶
Optional set of agent names to include. If None, logs all agents.
log_commands
class-attribute
instance-attribute
¶
log_commands: bool = True
Whether to log command executions
log_context
class-attribute
instance-attribute
¶
log_context: bool = True
Whether to log context messages.
FileStorageConfig
¶
Bases: BaseStorageProviderConfig
File storage configuration.
Source code in src/llmling_agent/models/storage.py
84 85 86 87 88 89 90 91 92 93 94 95 96 |
|
format
class-attribute
instance-attribute
¶
format: FormatType = 'auto'
Storage format (auto=detect from extension)
Mem0Config
¶
Bases: BaseStorageProviderConfig
Configuration for mem0 storage.
Source code in src/llmling_agent/models/storage.py
105 106 107 108 109 110 111 112 113 114 115 116 117 118 |
|
api_key
class-attribute
instance-attribute
¶
api_key: SecretStr | None = None
API key for mem0 service.
output_format
class-attribute
instance-attribute
¶
output_format: Literal['v1.0', 'v1.1'] = 'v1.1'
API output format version. 1.1 is recommended and provides enhanced details.
MemoryStorageConfig
¶
Bases: BaseStorageProviderConfig
In-memory storage configuration for testing.
Source code in src/llmling_agent/models/storage.py
99 100 101 102 |
|
SQLStorageConfig
¶
Bases: BaseStorageProviderConfig
SQL database storage configuration.
Source code in src/llmling_agent/models/storage.py
50 51 52 53 54 55 56 57 58 59 60 61 62 |
|
auto_migration
class-attribute
instance-attribute
¶
auto_migration: bool = True
Whether to automatically add missing columns
url
class-attribute
instance-attribute
¶
url: str = Field(default_factory=get_database_path)
Database URL (e.g. sqlite:///history.db)
StorageConfig
¶
Bases: BaseModel
Global storage configuration.
Source code in src/llmling_agent/models/storage.py
131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 |
|
agents
class-attribute
instance-attribute
¶
Global agent filter. Can be overridden by provider-specific filters.
default_provider
class-attribute
instance-attribute
¶
default_provider: str | None = None
Name of default provider for history queries. If None, uses first configured provider.
filter_mode
class-attribute
instance-attribute
¶
filter_mode: FilterMode = 'and'
How to combine global and provider agent filters: - "and": Both global and provider filters must allow the agent - "override": Provider filter overrides global filter if set
log_commands
class-attribute
instance-attribute
¶
log_commands: bool = True
Whether to log command executions.
log_context
class-attribute
instance-attribute
¶
log_context: bool = True
Whether to log additions to the context.
log_conversations
class-attribute
instance-attribute
¶
log_conversations: bool = True
Whether to log conversations.
log_messages
class-attribute
instance-attribute
¶
log_messages: bool = True
Whether to log messages.
TextLogConfig
¶
Bases: BaseStorageProviderConfig
Text log configuration.
Source code in src/llmling_agent/models/storage.py
65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 |
|
format
class-attribute
instance-attribute
¶
format: LogFormat = 'chronological'
Log format template to use
get_database_path
¶
get_database_path() -> str
Get the database file path, creating directories if needed.
Source code in src/llmling_agent/models/storage.py
19 20 21 22 23 |
|