fix: allow no headers for RESTClient (#2361)

This commit is contained in:
Sarah Wooders
2025-01-20 11:33:17 -08:00
committed by GitHub

View File

@@ -438,7 +438,7 @@ class RESTClient(AbstractClient):
elif password:
self.headers = {"accept": "application/json", "X-BARE-PASSWORD": f"password {password}"}
else:
raise ValueError("Either token or password must be provided")
self.headers = {"accept": "application/json"}
if headers:
self.headers.update(headers)
self._default_llm_config = default_llm_config