pull/286/head
Kye 1 year ago
parent f667ca7cad
commit 154b8cccde

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

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

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

@ -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",
]

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

Loading…
Cancel
Save