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.
search_ai
search_ai(workspace_id: str, question: str, deep_search: bool, limit: Optional[int], object_types: Optional[list[str]], relevant_score_threshold: Optional[float], title_to_descriptor_ratio: Optional[float]) -> Any
Search for metadata objects using similarity search.
Parameters
| name | type | description |
|---|---|---|
| workspace_id | str | workspace identifier |
| question | str | keyword/sentence input for search |
| deep_search | bool | turn on deep search - if true, content of complex objects will be searched as well |
| limit | Optional[int] | maximum number of results to return. Defaults to None. |
| object_types | Optional[list[str]] | list of object types to search for. Enum items: "attribute", "metric", "fact", "label", "date", "dataset", "visualization" and "dashboard". Defaults to None. |
| relevant_score_threshold | Optional[float] | minimum relevance score threshold for results. Defaults to None. |
| title_to_descriptor_ratio | Optional[float] | ratio of title score to descriptor score. Defaults to None. |
Returns
| type | description |
|---|---|
| Any | Search results |
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")
print(chat_result)