Logger
portkey.Client
Portkey client implementation for API interactions and model integration.
This module is a wrapper around the Portkey client that allows for easy integration with Maxim.
It instruments the Portkey client to log to Maxim.
It also provides a wrapper around the Portkey chat-completions client that allows for easy integration with Maxim.
instrument_portkey
Attach Maxim OpenAI wrappers to a Portkey client.
This helper patches the openai_client
attribute of a Portkey
or
AsyncPortkey
instance so that all OpenAI-compatible calls are logged
via Maxim.
Arguments:
Name | Description |
---|---|
client | Instance of Portkey or AsyncPortkey client. |
logger | Maxim [Logger](/sdk/python/references/logger/logger) instance. |
Returns:
The same client instance with its openai_client
patched.