-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
tse-developer
committed
Dec 20, 2024
1 parent
6ab4d82
commit 4836804
Showing
493 changed files
with
28,251 additions
and
5,570 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
|
||
|
||
# AccessToken | ||
|
||
|
||
## Properties | ||
|
||
| Name | Type | Description | Notes | | ||
|------------ | ------------- | ------------- | -------------| | ||
|**id** | **String** | GUID of the auth token. | [optional] | | ||
|**token** | **String** | Bearer auth token. | | | ||
|**org** | [**OrgInfo**](OrgInfo.md) | | | | ||
|**user** | [**UserInfo**](UserInfo.md) | | | | ||
|**creationTimeInMillis** | **Float** | Token creation time in milliseconds. | | | ||
|**expirationTimeInMillis** | **Float** | Token expiration time in milliseconds. | | | ||
|
||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,223 @@ | ||
# AiApi | ||
|
||
All URIs are relative to *https://localhost:443* | ||
|
||
| Method | HTTP request | Description | | ||
|------------- | ------------- | -------------| | ||
| [**createConversation**](AiApi.md#createConversation) | **POST** /api/rest/2.0/ai/conversation/create | | | ||
| [**sendMessage**](AiApi.md#sendMessage) | **POST** /api/rest/2.0/ai/conversation/{conversation_identifier}/converse | | | ||
| [**singleAnswer**](AiApi.md#singleAnswer) | **POST** /api/rest/2.0/ai/answer/create | | | ||
|
||
|
||
<a id="createConversation"></a> | ||
# **createConversation** | ||
> Conversation createConversation(createConversationRequest) | ||
|
||
|
||
Version: 10.4.0.cl or later Creates a Conversation object to start an AI-driven conversation based on a specific data model. Requires at least view access to the metadata object specified in the request. #### Usage guidelines This API requires the `metadata_identifier` parameter to define the context for the conversation. You can also specify the tokens to initiate the conversation as shown in this example: `\"tokens\": \"[tea],[sales],[type]\"` If the API request is successful, ThoughtSpot returns the ID of the conversation. > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. | ||
|
||
### Example | ||
```java | ||
// Import classes: | ||
import org.thoughtspot.client.ApiClient; | ||
import org.thoughtspot.client.ApiException; | ||
import org.thoughtspot.client.Configuration; | ||
import org.thoughtspot.client.auth.*; | ||
import org.thoughtspot.client.models.*; | ||
import org.thoughtspot.client.api.AiApi; | ||
|
||
public class Example { | ||
public static void main(String[] args) { | ||
ApiClient defaultClient = Configuration.getDefaultApiClient(); | ||
defaultClient.setBasePath("https://localhost:443"); | ||
|
||
// Configure HTTP bearer authorization: bearerAuth | ||
HttpBearerAuth bearerAuth = (HttpBearerAuth) defaultClient.getAuthentication("bearerAuth"); | ||
bearerAuth.setBearerToken("BEARER TOKEN"); | ||
|
||
AiApi apiInstance = new AiApi(defaultClient); | ||
CreateConversationRequest createConversationRequest = new CreateConversationRequest(); // CreateConversationRequest | | ||
try { | ||
Conversation result = apiInstance.createConversation(createConversationRequest); | ||
System.out.println(result); | ||
} catch (ApiException e) { | ||
System.err.println("Exception when calling AiApi#createConversation"); | ||
System.err.println("Status code: " + e.getCode()); | ||
System.err.println("Reason: " + e.getResponseBody()); | ||
System.err.println("Response headers: " + e.getResponseHeaders()); | ||
e.printStackTrace(); | ||
} | ||
} | ||
} | ||
``` | ||
|
||
### Parameters | ||
|
||
| Name | Type | Description | Notes | | ||
|------------- | ------------- | ------------- | -------------| | ||
| **createConversationRequest** | [**CreateConversationRequest**](CreateConversationRequest.md)| | | | ||
|
||
### Return type | ||
|
||
[**Conversation**](Conversation.md) | ||
|
||
### Authorization | ||
|
||
[bearerAuth](../README.md#bearerAuth) | ||
|
||
### HTTP request headers | ||
|
||
- **Content-Type**: application/json | ||
- **Accept**: application/json | ||
|
||
### HTTP response details | ||
| Status code | Description | Response headers | | ||
|-------------|-------------|------------------| | ||
| **200** | Common successful response | - | | ||
| **201** | Common error response | - | | ||
| **400** | Operation failed | - | | ||
| **500** | Operation failed | - | | ||
|
||
<a id="sendMessage"></a> | ||
# **sendMessage** | ||
> List<ResponseMessage> sendMessage(conversationIdentifier, sendMessageRequest) | ||
|
||
|
||
Version: 10.4.0.cl or later Allows sending a follow-up message to an ongoing conversation within the context of the metadata model. Requires at least view access to the metadata object specified in the request. #### Usage guidelines The API requires you to specify the `conversation_identifier` in the request path, and a `metadata_identifier` and `message` string in the request body. If the API request is successful, ThoughtSpot returns the session ID, tokens used in the conversation, and visualization type. > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. | ||
|
||
### Example | ||
```java | ||
// Import classes: | ||
import org.thoughtspot.client.ApiClient; | ||
import org.thoughtspot.client.ApiException; | ||
import org.thoughtspot.client.Configuration; | ||
import org.thoughtspot.client.auth.*; | ||
import org.thoughtspot.client.models.*; | ||
import org.thoughtspot.client.api.AiApi; | ||
|
||
public class Example { | ||
public static void main(String[] args) { | ||
ApiClient defaultClient = Configuration.getDefaultApiClient(); | ||
defaultClient.setBasePath("https://localhost:443"); | ||
|
||
// Configure HTTP bearer authorization: bearerAuth | ||
HttpBearerAuth bearerAuth = (HttpBearerAuth) defaultClient.getAuthentication("bearerAuth"); | ||
bearerAuth.setBearerToken("BEARER TOKEN"); | ||
|
||
AiApi apiInstance = new AiApi(defaultClient); | ||
String conversationIdentifier = "conversationIdentifier_example"; // String | Unique identifier of the conversation. | ||
SendMessageRequest sendMessageRequest = new SendMessageRequest(); // SendMessageRequest | | ||
try { | ||
List<ResponseMessage> result = apiInstance.sendMessage(conversationIdentifier, sendMessageRequest); | ||
System.out.println(result); | ||
} catch (ApiException e) { | ||
System.err.println("Exception when calling AiApi#sendMessage"); | ||
System.err.println("Status code: " + e.getCode()); | ||
System.err.println("Reason: " + e.getResponseBody()); | ||
System.err.println("Response headers: " + e.getResponseHeaders()); | ||
e.printStackTrace(); | ||
} | ||
} | ||
} | ||
``` | ||
|
||
### Parameters | ||
|
||
| Name | Type | Description | Notes | | ||
|------------- | ------------- | ------------- | -------------| | ||
| **conversationIdentifier** | **String**| Unique identifier of the conversation. | | | ||
| **sendMessageRequest** | [**SendMessageRequest**](SendMessageRequest.md)| | | | ||
|
||
### Return type | ||
|
||
[**List<ResponseMessage>**](ResponseMessage.md) | ||
|
||
### Authorization | ||
|
||
[bearerAuth](../README.md#bearerAuth) | ||
|
||
### HTTP request headers | ||
|
||
- **Content-Type**: application/json | ||
- **Accept**: application/json | ||
|
||
### HTTP response details | ||
| Status code | Description | Response headers | | ||
|-------------|-------------|------------------| | ||
| **200** | Common successful response | - | | ||
| **201** | Common error response | - | | ||
| **400** | Operation failed | - | | ||
| **500** | Operation failed | - | | ||
|
||
<a id="singleAnswer"></a> | ||
# **singleAnswer** | ||
> ResponseMessage singleAnswer(singleAnswerRequest) | ||
|
||
|
||
Version: 10.4.0.cl or later Processes a natural language query and returns an AI-generated response based on a specified data model. Requires at least view access to the metadata object specified in the request. > ###### Note: > * This endpoint is currently in Beta. Breaking changes may be introduced before the endpoint is made Generally Available. > * This endpoint requires Spotter - please contact ThoughtSpot support to enable Spotter on your cluster. | ||
|
||
### Example | ||
```java | ||
// Import classes: | ||
import org.thoughtspot.client.ApiClient; | ||
import org.thoughtspot.client.ApiException; | ||
import org.thoughtspot.client.Configuration; | ||
import org.thoughtspot.client.auth.*; | ||
import org.thoughtspot.client.models.*; | ||
import org.thoughtspot.client.api.AiApi; | ||
|
||
public class Example { | ||
public static void main(String[] args) { | ||
ApiClient defaultClient = Configuration.getDefaultApiClient(); | ||
defaultClient.setBasePath("https://localhost:443"); | ||
|
||
// Configure HTTP bearer authorization: bearerAuth | ||
HttpBearerAuth bearerAuth = (HttpBearerAuth) defaultClient.getAuthentication("bearerAuth"); | ||
bearerAuth.setBearerToken("BEARER TOKEN"); | ||
|
||
AiApi apiInstance = new AiApi(defaultClient); | ||
SingleAnswerRequest singleAnswerRequest = new SingleAnswerRequest(); // SingleAnswerRequest | | ||
try { | ||
ResponseMessage result = apiInstance.singleAnswer(singleAnswerRequest); | ||
System.out.println(result); | ||
} catch (ApiException e) { | ||
System.err.println("Exception when calling AiApi#singleAnswer"); | ||
System.err.println("Status code: " + e.getCode()); | ||
System.err.println("Reason: " + e.getResponseBody()); | ||
System.err.println("Response headers: " + e.getResponseHeaders()); | ||
e.printStackTrace(); | ||
} | ||
} | ||
} | ||
``` | ||
|
||
### Parameters | ||
|
||
| Name | Type | Description | Notes | | ||
|------------- | ------------- | ------------- | -------------| | ||
| **singleAnswerRequest** | [**SingleAnswerRequest**](SingleAnswerRequest.md)| | | | ||
|
||
### Return type | ||
|
||
[**ResponseMessage**](ResponseMessage.md) | ||
|
||
### Authorization | ||
|
||
[bearerAuth](../README.md#bearerAuth) | ||
|
||
### HTTP request headers | ||
|
||
- **Content-Type**: application/json | ||
- **Accept**: application/json | ||
|
||
### HTTP response details | ||
| Status code | Description | Response headers | | ||
|-------------|-------------|------------------| | ||
| **200** | Common successful response | - | | ||
| **201** | Common error response | - | | ||
| **400** | Operation failed | - | | ||
| **500** | Operation failed | - | | ||
|
Oops, something went wrong.