AgentImageExpectation

class AgentImageExpectation

Returned by

Clone()

Call this method if you want to use API-objects in multiple contexts, e.g. if you want to insert a specific test step in multiple blocks.

Returns:

A copy of this object

Return type:

AgentImageExpectation

GetMediaReference()

Returns the media access that will be used if the reference type is set to ‘media’.

Returns:

The media reference

Return type:

str

GetPrompt()

Returns the prompt.

Returns:

The prompt of the expression

Return type:

str

GetReference()

Returns the path to the reference image.

Returns:

Path to an image file

Return type:

str

GetReferenceType()

Returns the method by which the image is referenced.

Returns:

Type of reference

Return type:

str

SetMediaReference(mediaReference)

Specifies which media reference to use. This will only have effect if the reference type is set to ‘media’ (see SetReferenceType()). E.g. if the active Test Configuration (.tcf) defines a media source called ‘CAM’ then the media reference should also be set to ‘CAM’ in order to access images relative to the ‘CAM’ media source.

Parameters:
mediaReference : str

The reference to the media access

SetPrompt(prompt)

Sets the prompt for the test step that will be sent to the agent.

Parameters:
prompt : str

Prompt for the test step

SetReference(reference)

Sets the path to the reference image(s) that will be sent to the agent.

Parameters:
reference : str

Path to one or multiple image files

SetReferenceType(referenceType)

Sets how the image path is referenced. If set to “object” the reference image is expected to be an absolute path. If set to “workspace” the path is evaluated relative to the workspace directory. If set to “media” the path is relative to one of the media directories defined in the current Test Configuration (.tcf). The concrete media reference can be specified with SetMediaReference(). Setting the reference type to ‘media’ will set the media reference to the first found media source if no other reference was specified.

Parameters:
referenceType : str

One of “none”, “media”, “workspace”, “object”