compute.

build_exec_def_from_chat_result

build_exec_def_from_chat_result(chat_result: ChatResult) -> ExecutionDefinition

Build execution definition from chat result.

Parameters

nametypedescription
chat_resultChatResultChatResult object containing visualization details from AI chat response

Returns

typedescription
execution_definitionExecutionDefinitionExecutionDefinition object containing the execution definition for the visualization

Example


host = "https://www.example.com"
token = "<your_personal_access_token>"
sdk = GoodDataSdk.create(host, token)

chat_result = sdk.compute.ai_chat(workspace_id, "Display the revenue by product")
execution_definition = sdk.compute.build_exec_def_from_chat_result(chat_result)

print(execution_definition)