fixed run types

This commit is contained in:
Lorenze Jay
2024-12-17 10:05:36 -08:00
parent ef7a101631
commit 7885c5f906
4 changed files with 33 additions and 24 deletions

View File

@@ -13,9 +13,9 @@ class StringKnowledgeSource(BaseKnowledgeSource):
def model_post_init(self, _):
"""Post-initialization method to validate content."""
self.load_content()
self.validate_content()
def load_content(self):
def validate_content(self):
"""Validate string content."""
if not isinstance(self.content, str):
raise ValueError("StringKnowledgeSource only accepts string content")