Merge pull request #369 from evelynmitchell/basevectordb

AbstractVectorDB, pinecone
pull/346/merge
Eternal Reclaimer 12 months ago committed by GitHub
commit 6946f493da
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -0,0 +1,49 @@
# Release Notes
## 3.7.5
2024-01-21
### Bug Fixes
Fix imports of Agent, SequentialWorkflow, ModelParallelizer, Task, OpenAIChat, Gemini, GPT4VisionAPI
### New Features
New model: Odin for Object Detection and tracking
New mode: Ultralytics Object recognition YOLO
New Tokenizers
Schema generator for prompts.
New prompt for worker agent.
New structure: plan, step
New tool: execute tool
New logger: get_logger
Example for worker_agent
## 3.6.8
2024-01-19
### Bug Fixes
Removed ModelScope
Removed CogAgent
### New Features
Added ultralytics vision models
Added TimmModel to wrap timm models
### Other
Loosened version of timm

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

@ -63,3 +63,4 @@ psutil
ultralytics
supervision
scikit-image
pinecone-client

@ -1,11 +1,11 @@
from swarms.memory.base_vectordb import AbstractDatabase
from swarms.memory.base_vectordb import AbstractVectorDatabase
from swarms.memory.short_term_memory import ShortTermMemory
from swarms.memory.sqlite import SQLiteDB
from swarms.memory.weaviate_db import WeaviateDB
from swarms.memory.visual_memory import VisualShortTermMemory
__all__ = [
"AbstractDatabase",
"AbstractVectorDatabase",
"ShortTermMemory",
"SQLiteDB",
"WeaviateDB",

@ -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

@ -9,7 +9,7 @@ from typing import Any, Callable, Dict, List, Optional, Tuple
from termcolor import colored
from swarms.memory.base_vectordb import AbstractDatabase
from swarms.memory.base_vectordb import AbstractVectorDatabase
from swarms.prompts.agent_system_prompts import (
AGENT_SYSTEM_PROMPT_3,
)
@ -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,

@ -276,7 +276,7 @@ class ChildTool(BaseTool):
}
return tool_input
@root_validator()
@root_validator(skip_on_failure=True)
def raise_deprecation(cls, values: Dict) -> Dict:
"""Raise deprecation warning if callback_manager is used."""
if values.get("callback_manager") is not None:

Loading…
Cancel
Save