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 MaximGeminiChatSession(Chat)
Maxim Gemini chat session.
This class represents a Maxim wrapped Gemini chat session.
__init__
def __init__(chat: Chat,
logger: Logger,
trace_id: Optional[str] = None,
is_local_trace: Optional[bool] = False)
Initialize a Maxim wrapped Gemini 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
def send_message(
message: Union[list[PartUnionDict], PartUnionDict],
generation_name: Optional[str] = None) -> GenerateContentResponse
Send a message to the Maxim wrapped Gemini chat session.
Arguments:
| Name | Description |
|---|
message | The message to send. |
generation_name | The name of the generation. |
Returns:
| Name | Description |
|---|
GenerateContentResponse | The response from the Maxim wrapped Gemini chat session. |
send_message_stream
@override
def send_message_stream(message: Union[list[PartUnionDict], PartUnionDict],
generation_name: Optional[str] = None)
Send a message to the Maxim wrapped Gemini chat session stream.
Arguments:
| Name | Description |
|---|
message | The message to send. |
generation_name | The name of the generation. |
__getattr__
def __getattr__(name: str) -> Any
Get an attribute from the chat session.
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 session.
Arguments:
| Name | Description |
|---|
name | The name of the attribute. |
value | The value of the attribute. |
end_trace
End the trace of the chat session.
This method will end the trace of the chat session if the trace id is not None and the trace is local.
class MaximGeminiChats(Chats)
Maxim Gemini chats.
This class represents a Maxim wrapped Gemini chats.
__init__
def __init__(chats: Chats, logger: Logger)
Initialize a Maxim wrapped Gemini chats.
Arguments:
| Name | Description |
|---|
chats | The chats. |
logger | The logger. |
create
@override
def create(*,
model: str,
config: GenerateContentConfigOrDict = None,
history: Optional[list[Content]] = None,
trace_id: Optional[str] = None,
session_id: Optional[str] = None) -> Chat
Create a Maxim wrapped Gemini 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. |
session_id | The session id. |
Returns:
| Name | Description |
|---|
Chat | The Maxim wrapped Gemini 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 MaximGeminiModels(Models)
Maxim Gemini models.
This class represents a Maxim wrapped Gemini models.
__init__
def __init__(models: Models, logger: Logger)
Initialize a Maxim wrapped Gemini models.
Arguments:
| Name | Description |
|---|
models | The models. |
logger | The logger. |
generate_content_stream
@override
def generate_content_stream(
*,
model: str,
contents: Union[ContentListUnion, ContentListUnionDict],
config: Optional[GenerateContentConfigOrDict] = None,
trace_id: Optional[str] = None,
generation_name: Optional[str] = None
) -> Iterator[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 |
|---|
Iterator[GenerateContentResponse] | The content stream. |
generate_content
@override
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 content. |
__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 MaximGeminiClient(Client)
Maxim Gemini client.
This class represents a Maxim wrapped Gemini client.
__init__
def __init__(client: Client, logger: Logger)
Initialize a Maxim wrapped Gemini client.
Arguments:
| Name | Description |
|---|
client | The client. |
logger | The logger. |
chats
@property
def chats() -> MaximGeminiChats
Get the Maxim wrapped Gemini chats.
Returns:
| Name | Description |
|---|
[MaximGeminiChats](/sdk/python/references/logger/gemini/client) | The Maxim wrapped Gemini chats. |
aio
@property
def aio() -> MaximGeminiAsyncClient
Get the Maxim wrapped Gemini async client.
Returns:
| Name | Description |
|---|
[MaximGeminiAsyncClient](/sdk/python/references/logger/gemini/async_client) | The Maxim wrapped Gemini async client. |
models
@property
def models() -> MaximGeminiModels
Get the Maxim wrapped Gemini models.
Returns:
| Name | Description |
|---|
[MaximGeminiModels](/sdk/python/references/logger/gemini/client) | The Maxim wrapped Gemini models. |
__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. |