MCPcopy
hub / github.com/openai/openai-python / _prepare_request

Method _prepare_request

src/openai/_base_client.py:1553–1562  ·  view source on GitHub ↗

This method is used as a callback for mutating the `Request` object after it has been constructed. This is useful for cases where you want to add certain headers based off of the request properties, e.g. `url`, `method` etc.

(
        self,
        request: httpx.Request,  # noqa: ARG002
    )

Source from the content-addressed store, hash-verified

1551 return options
1552
1553 async def _prepare_request(
1554 self,
1555 request: httpx.Request, # noqa: ARG002
1556 ) -> None:
1557 """This method is used as a callback for mutating the `Request` object
1558 after it has been constructed.
1559 This is useful for cases where you want to add certain headers based off of
1560 the request properties, e.g. `url`, `method` etc.
1561 """
1562 return None
1563
1564 async def _send_request(
1565 self,

Callers 1

requestMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected