diff --git a/docs/swarms/memory/weaviate.md b/docs/swarms/memory/weaviate.md index da28be4e..7044f1ad 100644 --- a/docs/swarms/memory/weaviate.md +++ b/docs/swarms/memory/weaviate.md @@ -20,10 +20,10 @@ This documentation provides a comprehensive guide on how to use the Weaviate API ## Installation -Before using the Weaviate API Client, make sure to install the `weaviate-client` library. You can install it using pip: +Before using the Weaviate API Client, make sure to install the `swarms` library. You can install it using pip: ```bash -pip install weaviate-client +pip install swarms ``` ## Initialization @@ -46,7 +46,7 @@ To use the Weaviate API Client, you need to initialize an instance of the `Weavi Here's an example of how to initialize a WeaviateClient: ```python -from weaviate_client import WeaviateClient +from swarms.memory import WeaviateClient weaviate_client = WeaviateClient( http_host="YOUR_HTTP_HOST", diff --git a/playground/demos/optimize_llm_stack/vllm.py b/playground/demos/optimize_llm_stack/vllm.py new file mode 100644 index 00000000..ac0733af --- /dev/null +++ b/playground/demos/optimize_llm_stack/vllm.py @@ -0,0 +1,15 @@ +from swarms.models import vLLM + +# Initialize vLLM with custom model and parameters +custom_vllm = vLLM( + model_name="custom/model", + tensor_parallel_size=8, + trust_remote_code=True, + revision="abc123", + temperature=0.7, + top_p=0.8 +) + +# Generate text with custom configuration +generated_text = custom_vllm.run("Create a poem about nature.") +print(generated_text) \ No newline at end of file diff --git a/playground/demos/optimize_llm_stack/weaviate.py b/playground/demos/optimize_llm_stack/weaviate.py new file mode 100644 index 00000000..8360aa4c --- /dev/null +++ b/playground/demos/optimize_llm_stack/weaviate.py @@ -0,0 +1,14 @@ +from swarms.memory import WeaviateClient + +weaviate_client = WeaviateClient( + http_host="YOUR_HTTP_HOST", + http_port="YOUR_HTTP_PORT", + http_secure=True, + grpc_host="YOUR_gRPC_HOST", + grpc_port="YOUR_gRPC_PORT", + grpc_secure=True, + auth_client_secret="YOUR_APIKEY", + additional_headers={"X-OpenAI-Api-Key": "YOUR_OPENAI_APIKEY"}, + additional_config=None, # You can pass additional configuration here +) + diff --git a/swarms/memory/__init__.py b/swarms/memory/__init__.py index e916d5a8..47229bac 100644 --- a/swarms/memory/__init__.py +++ b/swarms/memory/__init__.py @@ -1,3 +1,10 @@ # from swarms.memory.pinecone import PineconeVector # from swarms.memory.base import BaseVectorStore # from swarms.memory.pg import PgVectorVectorStore +from swarms.memory.weaviate import WeaviateClient +from swarms.memory.base_vectordb import VectorDatabase + +__all__ = [ + "WeaviateClient", + "VectorDatabase", +] diff --git a/swarms/models/__init__.py b/swarms/models/__init__.py index be64908d..9455a772 100644 --- a/swarms/models/__init__.py +++ b/swarms/models/__init__.py @@ -8,7 +8,7 @@ from swarms.models.openai_models import ( AzureOpenAI, OpenAIChat, ) # noqa: E402 - +from swarms.models.vllm import vLLM # noqa: E402 # from swarms.models.zephyr import Zephyr # noqa: E402 from swarms.models.biogpt import BioGPT # noqa: E402 from swarms.models.huggingface import HuggingfaceLLM # noqa: E402 @@ -29,6 +29,7 @@ from swarms.models.layoutlm_document_qa import ( ) # noqa: E402 from swarms.models.gpt4_vision_api import GPT4VisionAPI # noqa: E402 + # from swarms.models.gpt4v import GPT4Vision # from swarms.models.dalle3 import Dalle3 # from swarms.models.distilled_whisperx import DistilWhisperModel # noqa: E402