AbstractVectorDB, pinecone

pull/369/head
evelynmitchell 12 months ago
parent ad057a56c6
commit 8df8c68853

@ -74,6 +74,7 @@ ultralytics = "*"
timm = "*"
supervision = "*"
scikit-image = "*"
pinecone-client = "*"

@ -62,4 +62,5 @@ peft
psutil
ultralytics
supervision
scikit-image
scikit-image
pinecone-client

@ -1,12 +1,12 @@
from typing import Optional
from swarms.memory.base_vectordb import AbstractDatabase
from swarms.memory.base_vectordb import AbstractVectorDatabase
import pinecone
from attr import define, field
from swarms.utils.hash import str_to_hash
@define
class PineconeDB(AbstractDatabase):
class PineconeDB(AbstractVectorDatabase):
"""
PineconeDB is a vector storage driver that uses Pinecone as the underlying storage engine.

@ -1,5 +1,5 @@
from typing import List, Tuple, Any, Optional
from swarms.memory.base_vectordb import AbstractDatabase
from swarms.memory.base_vectordb import AbstractVectorDatabase
try:
import sqlite3
@ -9,7 +9,7 @@ except ImportError:
)
class SQLiteDB(AbstractDatabase):
class SQLiteDB(AbstractVectorDatabase):
"""
A reusable class for SQLite database operations with methods for adding,
deleting, updating, and querying data.

@ -4,7 +4,7 @@ Weaviate API Client
from typing import Any, Dict, List, Optional
from swarms.memory.base_vectordb import AbstractDatabase
from swarms.memory.base_vectordb import AbstractVectorDatabase
try:
import weaviate
@ -12,7 +12,7 @@ except ImportError:
print("pip install weaviate-client")
class WeaviateDB(AbstractDatabase):
class WeaviateDB(AbstractVectorDatabase):
"""
Weaviate API Client

@ -83,7 +83,7 @@ class Agent:
pdf_path (str): The path to the pdf
list_of_pdf (str): The list of pdf
tokenizer (Any): The tokenizer
memory (AbstractDatabase): The memory
memory (AbstractVectorDatabase): The memory
preset_stopping_token (bool): Enable preset stopping token
traceback (Any): The traceback
traceback_handlers (Any): The traceback handlers
@ -168,7 +168,7 @@ class Agent:
pdf_path: Optional[str] = None,
list_of_pdf: Optional[str] = None,
tokenizer: Optional[Any] = None,
long_term_memory: Optional[AbstractDatabase] = None,
long_term_memory: Optional[AbstractVectorDatabase] = None,
preset_stopping_token: Optional[bool] = False,
traceback: Any = None,
traceback_handlers: Any = None,

Loading…
Cancel
Save