feat: add local text (#44)
This commits extends the "add_local" function. It adds support to take text and index/embed it.
This commit is contained in:
10
embedchain/loaders/local_text.py
Normal file
10
embedchain/loaders/local_text.py
Normal file
@@ -0,0 +1,10 @@
|
||||
class LocalTextLoader:
|
||||
|
||||
def load_data(self, content):
|
||||
meta_data = {
|
||||
"url": "local",
|
||||
}
|
||||
return [{
|
||||
"content": content,
|
||||
"meta_data": meta_data,
|
||||
}]
|
||||
Reference in New Issue
Block a user