View module source on GitHub

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.

MaximPortkeyClient

class MaximPortkeyClient()

Maxim instrumenter for Portkey client that directly handles chat.completion method.

__getattr__

def __getattr__(name)

Delegate all other attributes to the underlying Portkey client.

MaximPortkeyChat

class MaximPortkeyChat()

Maxim instrumenter for Portkey chat functionality.

__getattr__

def __getattr__(name)

Delegate all other attributes to the underlying chat client.

MaximAsyncPortkeyChat

class MaximAsyncPortkeyChat()

Maxim instrumenter for async Portkey chat functionality.

__getattr__

def __getattr__(name)

Delegate all other attributes to the underlying chat client.

MaximPortkeyChatCompletions

class MaximPortkeyChatCompletions()

Maxim instrumenter for Portkey chat completions.

create

def create(*args, **kwargs)

Instrumented create method that logs to Maxim.

__getattr__

def __getattr__(name)

Delegate all other attributes to the underlying completions client.

MaximAsyncPortkeyChatCompletions

class MaximAsyncPortkeyChatCompletions()

Maxim instrumenter for async Portkey chat completions.

create

async def create(*args, **kwargs)

Instrumented async create method that logs to Maxim.

__getattr__

def __getattr__(name)

Delegate all other attributes to the underlying completions client.