Core Maxim Python SDK functionality and main entry point.
Name | Type | Description |
---|---|---|
api_key | Optional[str], optional | The API key for the Maxim instance. Defaults to None. |
base_url | Optional[str], optional | The base URL for the Maxim instance. Defaults to None. |
cache | Optional[MaximCache], optional | The cache to use for the Maxim instance. Defaults to None. |
debug | Optional[bool], optional | Whether to enable debug logging. Defaults to False. |
raise_exceptions | Optional[bool], optional | Whether to raise exceptions during logging operations. Defaults to False. |
prompt_management | Optional[bool], optional | Whether to enable prompt management. Defaults to False. |
Name | Type | Description |
---|---|---|
api_key | str | The API key for the Maxim instance. |
base_url | Optional[str], optional | The base URL for the Maxim instance. Defaults to “https://app.getmaxim.ai”. |
cache | Optional[MaximCache], optional | The cache to use for the Maxim instance. Defaults to None. |
debug | Optional[bool], optional | Whether to enable debug logging. Defaults to False. |
raise_exceptions | Optional[bool], optional | Whether to raise exceptions during logging operations. Defaults to False. |
prompt_management | Optional[bool], optional | Whether to enable prompt management. Defaults to False. |
Name | Type | Description |
---|---|---|
config | Union[Config, ConfigDict] | The configuration object to convert. |
Name | Type | Description |
---|---|---|
config | Config | The configuration for the Maxim instance. |
Name | Type | Description |
---|---|---|
cache | Optional[MaximCache], optional | Custom cache implementation to use. |
Name | Description |
---|---|
[Maxim](/sdk/python/references/maxim) | The current Maxim instance for method chaining. |
Name | Type | Description |
---|---|---|
val | bool | True to enable exception raising, False to disable. |
Name | Description |
---|---|
[Maxim](/sdk/python/references/maxim) | The current Maxim instance for method chaining. |
Name | Type | Description |
---|---|---|
id | str | The id of the prompt. |
rule | QueryRule | The rule to match the prompt against. |
Name | Description |
---|---|
Optional[[Prompt](/sdk/python/references/models/prompt)] | The prompt object if found, otherwise None. |
Name | Type | Description |
---|---|---|
rule | QueryRule | The rule to match the prompts against. |
Name | Description |
---|---|
List[[Prompt](/sdk/python/references/models/prompt)] | A list of prompts that match the given rule. |
Name | Type | Description |
---|---|---|
id | str | The id of the prompt chain. |
rule | QueryRule | The rule to match the prompt chain against. |
Name | Description |
---|---|
Optional[[PromptChain](/sdk/python/references/models/prompt_chain)] | The prompt chain object if found, otherwise None. |
Name | Type | Description |
---|---|---|
id | str | The id of the folder. |
Name | Description |
---|---|
Optional[[Folder](/sdk/python/references/models/folder)] | The folder object if found, otherwise None. |
Name | Type | Description |
---|---|---|
rule | QueryRule | The rule to match the folders against. |
Name | Description |
---|---|
List[[Folder](/sdk/python/references/models/folder)] | A list of folders that match the given rule. |
Name | Type | Description |
---|---|---|
config | LoggerConfig | The configuration for the logger. |
Name | Description |
---|---|
[Logger](/sdk/python/references/logger/logger) | The logger object. |
Name | Type | Description |
---|---|---|
name | str | The name of the test run. |
in_workspace_id | str | The workspace id to create the test run in. |
Name | Description |
---|---|
[TestRunBuilder](/sdk/python/references/test_runs/test_run_builder) | The test run builder object. |
Name | Type | Description |
---|---|---|
model | str | The model name to use for completion. The expected format is “provider/model_name”. Example “openai/gpt-3.5-turbo”. |
messages | List[ChatCompletionMessage] | List of chat messages in the conversation |
tools | Optional[List[Tool]], optional | List of tools available to the model. Defaults to None. |
**kwargs | Additional model parameters to pass to the completion request |
Name | Description |
---|---|
Optional[[PromptResponse](/sdk/python/references/models/prompt)] | The completion response if successful, None otherwise |