This documentation is for the unstable version of GoodData, currrently in development.
For stable version, go to the latest stable version of this article.
For stable version, go to the latest stable version of this article.
compute.
build_exec_def_from_chat_result
build_exec_def_from_chat_result(chat_result: Any, is_cancellable: bool) -> ExecutionDefinition
Build execution definition from chat result.
Parameters
| name | type | description |
|---|---|---|
| chat_result | Any | ChatResult object containing visualization details from AI chat response |
| is_cancellable | bool | Whether the execution of this definition should be cancelled when the connection is interrupted. |
Returns
| type | description |
|---|---|
| ExecutionDefinition | Execution definition built from chat result 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)