Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion weaviate/connect/v4.py
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,14 @@ def __init__(
self._connected = False
self._skip_init_checks = skip_init_checks

self._headers = {"content-type": "application/json"}
client_type = "sync" if isinstance(self, ConnectionSync) else "async"
embedded_suffix = "-embedded" if self.embedded_db is not None else ""
client_header = f"weaviate-client-python/{client_version}-{client_type}{embedded_suffix}"

self._headers = {
"content-type": "application/json",
"X-Weaviate-Client": client_header,
}
self.__add_weaviate_embedding_service_header(connection_params.http.host)
if additional_headers is not None:
_validate_input(_ValidateArgument([dict], "additional_headers", additional_headers))
Expand Down