Documentation Index
Fetch the complete documentation index at: https://www.getmaxim.ai/docs/llms.txt
Use this file to discover all available pages before exploring further.
View module source on GitHub
class MaximGeminiAsyncChatSession(AsyncChat)
Maxim Gemini async chat session.
This class represents a maxim gemini async chat session.
__init__
def __init__(chat: AsyncChat,
logger: Logger,
trace_id: Optional[str] = None,
is_local_trace: Optional[bool] = False)
Initialize a maxim gemini async chat session.
Arguments:
| Name | Description |
|---|
chat | The chat. |
logger | The logger. |
trace_id | The trace id. |
is_local_trace | Whether the trace is local. |
send_message
@override
async def send_message(
message: Union[list[PartUnionDict], PartUnionDict],
generation_name: Optional[str] = None) -> GenerateContentResponse
Send a message to the chat.
Arguments:
| Name | Description |
|---|
message | The message to send. |
generation_name | The name of the generation. |
Returns:
| Name | Description |
|---|
GenerateContentResponse | The response from the chat. |
send_message_stream
@override
async def send_message_stream(
message: Union[list[PartUnionDict], PartUnionDict],
generation_name: Optional[str] = None
) -> Awaitable[AsyncIterator[GenerateContentResponse]]
Send a message to the chat stream.
Arguments:
| Name | Description |
|---|
message | The message to send. |
generation_name | The name of the generation. |
Returns:
| Name | Description |
|---|
Awaitable[AsyncIterator[GenerateContentResponse]] | The response from the chat. |
__getattr__
def __getattr__(name: str) -> Any
Get an attribute from the chat.
Arguments:
| Name | Description |
|---|
name | The name of the attribute. |
Returns:
| Name | Description |
|---|
Any | The attribute. |
__setattr__
def __setattr__(name: str, value: Any) -> None
Set an attribute on the chat.
Arguments:
| Name | Description |
|---|
name | The name of the attribute. |
value | The value of the attribute. |
end_trace
End the trace.
This method ends the trace if it is local and the trace id is not None.
class MaximGeminiAsyncChats(AsyncChats)
Maxim Gemini async chats.
This class represents a maxim gemini async chats.
__init__
def __init__(chats: AsyncChats, logger: Logger)
Initialize a maxim gemini async chats.
create
@override
def create(*,
model: str,
config: GenerateContentConfigOrDict = None,
history: Optional[list[Content]] = None,
trace_id: Optional[str] = None) -> AsyncChat
Create a chat session.
Arguments:
| Name | Description |
|---|
model | The model to use. |
config | The config to use. |
history | The history to use. |
trace_id | The trace id. |
Returns:
| Name | Description |
|---|
AsyncChat | The chat session. |
__getattr__
def __getattr__(name: str) -> Any
Get an attribute from the chats.
Arguments:
| Name | Description |
|---|
name | The name of the attribute. |
Returns:
| Name | Description |
|---|
Any | The attribute. |
__setattr__
def __setattr__(name: str, value: Any) -> None
Set an attribute on the chats.
Arguments:
| Name | Description |
|---|
name | The name of the attribute. |
value | The value of the attribute. |
class MaximGeminiAsyncModels(AsyncModels)
Maxim Gemini async models.
This class represents a maxim gemini async models.
__init__
def __init__(models: AsyncModels, logger: Logger)
Initialize a maxim gemini async models.
Arguments:
| Name | Description |
|---|
models | The models. |
logger | The logger. |
generate_content_stream
@override
async def generate_content_stream(
*,
model: str,
contents: Union[ContentListUnion, ContentListUnionDict],
config: Optional[GenerateContentConfigOrDict] = None,
trace_id: Optional[str] = None,
generation_name: Optional[str] = None
) -> Awaitable[AsyncIterator[GenerateContentResponse]]
Generate content stream.
Arguments:
| Name | Description |
|---|
model | The model to use. |
contents | The contents to use. |
config | The config to use. |
trace_id | The trace id. |
generation_name | The generation name. |
Returns:
| Name | Description |
|---|
Awaitable[AsyncIterator[GenerateContentResponse]] | The response from the models. |
generate_content
@override
async def generate_content(
*,
model: str,
contents: Union[ContentListUnion, ContentListUnionDict],
config: Optional[GenerateContentConfigOrDict] = None,
trace_id: Optional[str] = None,
generation_name: Optional[str] = None) -> GenerateContentResponse
Generate content.
Arguments:
| Name | Description |
|---|
model | The model to use. |
contents | The contents to use. |
config | The config to use. |
trace_id | The trace id. |
generation_name | The generation name. |
Returns:
| Name | Description |
|---|
GenerateContentResponse | The response from the models. |
__getattr__
def __getattr__(name: str) -> Any
Get an attribute from the models.
Arguments:
| Name | Description |
|---|
name | The name of the attribute. |
Returns:
| Name | Description |
|---|
Any | The attribute. |
__setattr__
def __setattr__(name: str, value: Any) -> None
Set an attribute on the models.
Arguments:
| Name | Description |
|---|
name | The name of the attribute. |
value | The value of the attribute. |
class MaximGeminiAsyncClient(AsyncClient)
Maxim Gemini async client.
This class represents a maxim gemini async client.
__init__
def __init__(client: AsyncClient, logger: Logger)
Initialize a maxim gemini async client.
Arguments:
| Name | Description |
|---|
client | The client. |
logger | The logger. |
__getattr__
def __getattr__(name: str) -> Any
Get an attribute from the client.
Arguments:
| Name | Description |
|---|
name | The name of the attribute. |
Returns:
| Name | Description |
|---|
Any | The attribute. |
__setattr__
def __setattr__(name: str, value: Any) -> None
Set an attribute on the client.
Arguments:
| Name | Description |
|---|
name | The name of the attribute. |
value | The value of the attribute. |