DeepchecksLLMClient#

class DeepchecksLLMClient#

DeepchecksLLMClient is the class through which you can interact with the Deepchecks LLM API.

__init__(host: str = None, api_token: str = None, log_level: int = 30, silent_mode: bool = False)#

Init Deepchecks LLM Client. Connect to the server and perform a simple handshake with the API.

Parameters:
hoststr

The URL of the Deepchecks server to communicate with. By default, it’s set to the Deepchecks LLM host (https://app.llm.deepchecks.com), but you can override it by providing a custom URL. If not provided, the value is read from the environment variable DEEPCHECKS_LLM_HOST.

api_tokenstr

Deepchecks API Token (can be generated from the UI). If not provided, the value is read from the environment variable DEEPCHECKS_LLM_API_TOKEN.

silent_mode: bool, default=False

If True, the SDK will print logs upon encountering errors rather than raising them

log_level: int, default=logging.WARNING

Set SDK loggers logging level

Returns:
None
__new__(*args, **kwargs)#

Attributes

DeepchecksLLMClient.api

Get the API object for the client.

Methods

DeepchecksLLMClient.annotate(app_name, ...)

Annotate a specific interaction by its user_interaction_id.

DeepchecksLLMClient.create_app_version(...)

Create a new application.

DeepchecksLLMClient.create_application(...)

Create a new application.

DeepchecksLLMClient.create_custom_property(...)

Define a custom property for the current application.

DeepchecksLLMClient.data_iterator(app_name, ...)

Fetch all interactions from the specified environment type (PROD/EVAL) as an iterable.

DeepchecksLLMClient.delete_custom_property(...)

Delete a custom property for the current application.

DeepchecksLLMClient.delete_interactions(...)

Delete specific interactions by their user_interaction_ids.

DeepchecksLLMClient.get_application_config(...)

Write the auto-annotation YAML configuration file to the specified path.

DeepchecksLLMClient.get_applications()

Get all applications as Application objects.

DeepchecksLLMClient.get_custom_properties(...)

Get the custom properties defined for the current application.

DeepchecksLLMClient.get_data(app_name, ...)

Fetch all the interactions from the specified environment (PROD/EVAL) as a pandas DataFrame.

DeepchecksLLMClient.get_data_if_calculations_completed(...)

Check if calculations for specified events are completed by calling get_interactions_complete_status.

DeepchecksLLMClient.get_interaction_by_user_interaction_id(...)

Get a specific interaction by its user_interaction_id.

DeepchecksLLMClient.get_interactions_complete_status(...)

Get the completion status of interactions for specified events and user interaction IDs.

DeepchecksLLMClient.get_pentest_prompts(app_name)

Get pentest prompts for the application.

DeepchecksLLMClient.get_versions([app_name])

Get all versions of an application as Version objects.

DeepchecksLLMClient.log_batch_interactions(...)

Log multiple interactions at once.

DeepchecksLLMClient.log_interaction(...[, ...])

Log a single interaction.

DeepchecksLLMClient.update_application_config(...)

Update the auto-annotation YAML configuration file for the current application.

DeepchecksLLMClient.update_custom_property(...)

Update a custom property for the current application.

DeepchecksLLMClient.update_interaction(...)

Update a specific interaction by its user_interaction_id.