Skip to content

Commit 2afe0c6

Browse files
stainless-app[bot]stainless-bot
authored andcommitted
chore(internal): add a default_query method (#402)
1 parent d5d0011 commit 2afe0c6

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

src/finch/_base_client.py

+7-1
Original file line numberDiff line numberDiff line change
@@ -457,7 +457,7 @@ def _build_request(
457457
raise RuntimeError(f"Unexpected JSON data type, {type(json_data)}, cannot merge with `extra_body`")
458458

459459
headers = self._build_headers(options)
460-
params = _merge_mappings(self._custom_query, options.params)
460+
params = _merge_mappings(self.default_query, options.params)
461461
content_type = headers.get("Content-Type")
462462

463463
# If the given Content-Type header is multipart/form-data then it
@@ -593,6 +593,12 @@ def default_headers(self) -> dict[str, str | Omit]:
593593
**self._custom_headers,
594594
}
595595

596+
@property
597+
def default_query(self) -> dict[str, object]:
598+
return {
599+
**self._custom_query,
600+
}
601+
596602
def _validate_headers(
597603
self,
598604
headers: Headers, # noqa: ARG002

0 commit comments

Comments
 (0)