DeepchecksLLMClient.log_interaction#
- DeepchecksLLMClient.log_interaction(app_name: str, version_name: str, env_type: EnvType, input: str, output: str, full_prompt: str = None, information_retrieval: List[str] | str = None, annotation: AnnotationType = None, annotation_reason: str = None, user_interaction_id: str = None, started_at: datetime | float | None = None, finished_at: datetime | float | None = None, steps: List[Step] = None, custom_props: Dict[str, Any] = None, vuln_type: str | None = None, vuln_trigger_str: str | None = None, topic: str | None = None) str #
Log a single interaction.
- Parameters:
- app_namestr
Application name
- version_namestr
Name of the version to which this interaction will be added
- env_typeEnvType
Type of environment
- inputstr
Input data
- outputstr
Output data
- full_promptstr
Full prompt data
- information_retrievalstr
Information retrieval
- annotationAnnotationType
Annotation type of the interaction
- user_interaction_idstr
Unique identifier of the interaction
- started_atdatetime or float
Timestamp the interaction started at. Datetime format is deprecated, use timestamp instead
- finished_atdatetime or float
Timestamp the interaction finished at. Datetime format is deprecated, use timestamp instead
- stepslist of Step
List of steps taken during the interaction
- custom_propsdict
Additional custom properties
- annotation_reasonstr, optional
Reason for the annotation
- vuln_typestr, optional
Type of vulnerability (Only used in case of EnvType.PENTEST and must be sent there).
- vuln_trigger_strstr, optional
Vulnerability trigger string (Only used in case of EnvType.PENTEST and is optional there).
- Returns:
- str
The uuid of the interaction