Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to connect to separate gRPC host in WeaviateDocumentStore #1170

Open
koty11 opened this issue Nov 8, 2024 · 0 comments
Open

How to connect to separate gRPC host in WeaviateDocumentStore #1170

koty11 opened this issue Nov 8, 2024 · 0 comments
Labels
bug Something isn't working integration:weaviate

Comments

@koty11
Copy link

koty11 commented Nov 8, 2024

Describe the bug
Hello Haystack team,

I'm currently working with a Weaviate setup where the REST API and gRPC services are hosted on different domains. Specifically, I have:

REST API Host: https://weaviate.xxyy.com
gRPC Host: https://weaviate.grpc.xxyy.com

In the original Weaviate Python client library, it's possible to specify different hosts for the REST and gRPC connections using the ConnectionParams class:

from weaviate.connect import ConnectionParams
import weaviate

connection_params = ConnectionParams.from_params(
    http_host="weaviate.xxyy.com",
    http_port=443,
    http_secure=True,
    grpc_host="weaviate.grpc.xxyy.com",
    grpc_port=443,
    grpc_secure=True,
)
client = weaviate.Client(connection_params=connection_params)

This configuration allows me to connect to the REST API and gRPC services using different hosts and ports.

Issue:

In Haystack's WeaviateDocumentStore, there doesn't seem to be an option to specify separate hosts for the REST API and gRPC connections. The url parameter sets both to the same host, and there's no exposed parameter to set a different gRPC host.

To Reproduce
Here's the current initialization in Haystack:

from haystack_integrations.document_stores.weaviate.document_store import WeaviateDocumentStore
from haystack_integrations.document_stores.weaviate.auth import AuthApiKey

document_store = WeaviateDocumentStore(
    url="https://weaviate.xxyy.com",
    auth_client_secret=AuthApiKey(api_key="your_weaviate_api_key"),
    grpc_secure=True,
)

Describe your environment (please complete the following information):

  • OS: Linux
  • Haystack version: 2.6
  • Integration version:
@koty11 koty11 added the bug Something isn't working label Nov 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working integration:weaviate
Projects
None yet
Development

No branches or pull requests

2 participants