Skip to content

Commit 22e7f84

Browse files
authored
[BUG] Add headers to async client requests (#3236)
## Description of changes *Summarize the changes made by this PR.* - Improvements & Bug fixes - Fixes bug where headers were not being added to async client requests. Also adds the verify argument. - New functionality - ... ## Test plan *How are these changes tested?* - [ ] Tests pass locally with `pytest` for python, `yarn test` for js, `cargo test` for rust ## Documentation Changes *Are all docstrings for user-facing APIs updated if required? Do we need to make documentation changes in the [docs repository](https://github.com/chroma-core/docs)?*
1 parent 19eb065 commit 22e7f84

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

chromadb/api/async_fastapi.py

+5-1
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,11 @@ def _get_client(self) -> httpx.AsyncClient:
106106
loop_hash = 0
107107

108108
if loop_hash not in self._clients:
109-
self._clients[loop_hash] = httpx.AsyncClient(timeout=None)
109+
self._clients[loop_hash] = httpx.AsyncClient(
110+
timeout=None,
111+
headers=self._settings.chroma_server_headers,
112+
verify=self._settings.chroma_server_ssl_verify or False,
113+
)
110114

111115
return self._clients[loop_hash]
112116

0 commit comments

Comments
 (0)