gemini.Client
Gemini client implementation for API interactions and model integration.
MaximGeminiChatSession
Maxim Gemini chat session.
This class represents a Maxim wrapped Gemini chat session.
__init__
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
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
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__
Get an attribute from the chat session.
Arguments:
Name | Description |
---|---|
name | The name of the attribute. |
Returns:
Name | Description |
---|---|
Any | The attribute. |
__setattr__
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.
MaximGeminiChats
Maxim Gemini chats.
This class represents a Maxim wrapped Gemini chats.
__init__
Initialize a Maxim wrapped Gemini chats.
Arguments:
Name | Description |
---|---|
chats | The chats. |
logger | The logger. |
create
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__
Get an attribute from the chats.
Arguments:
Name | Description |
---|---|
name | The name of the attribute. |
Returns:
Name | Description |
---|---|
Any | The attribute. |
__setattr__
Set an attribute on the chats.
Arguments:
Name | Description |
---|---|
name | The name of the attribute. |
value | The value of the attribute. |
MaximGeminiModels
Maxim Gemini models.
This class represents a Maxim wrapped Gemini models.
__init__
Initialize a Maxim wrapped Gemini models.
Arguments:
Name | Description |
---|---|
models | The models. |
logger | The logger. |
generate_content_stream
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
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__
Get an attribute from the models.
Arguments:
Name | Description |
---|---|
name | The name of the attribute. |
Returns:
Name | Description |
---|---|
Any | The attribute. |
__setattr__
Set an attribute on the models.
Arguments:
Name | Description |
---|---|
name | The name of the attribute. |
value | The value of the attribute. |
MaximGeminiClient
Maxim Gemini client.
This class represents a Maxim wrapped Gemini client.
__init__
Initialize a Maxim wrapped Gemini client.
Arguments:
Name | Description |
---|---|
client | The client. |
logger | The logger. |
chats
Get the Maxim wrapped Gemini chats.
Returns:
Name | Description |
---|---|
[MaximGeminiChats](/sdk/python/references/logger/gemini/client) | The Maxim wrapped Gemini chats. |
aio
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
Get the Maxim wrapped Gemini models.
Returns:
Name | Description |
---|---|
[MaximGeminiModels](/sdk/python/references/logger/gemini/client) | The Maxim wrapped Gemini models. |
__getattr__
Get an attribute from the client.
Arguments:
Name | Description |
---|---|
name | The name of the attribute. |
Returns:
Name | Description |
---|---|
Any | The attribute. |
__setattr__
Set an attribute on the client.
Arguments:
Name | Description |
---|---|
name | The name of the attribute. |
value | The value of the attribute. |