Coroutine-native client covering the full Hanzo /v1 cloud surface, for JVM and Android. Generated with openapi-generator kotlin (library=jvm-okhttp4, useCoroutines=true). Coordinate: ai.hanzo:sdk. Base URL: https://api.hanzo.ai. Co-authored-by: Hanzo Dev <[email protected]>
5.7 KiB
SearchAPIApi
All URIs are relative to https://api.hanzo.ai
| Method | HTTP request | Description |
|---|---|---|
| cloudProductControllerChatDocs | POST /v1/chat-docs | |
| cloudProductControllerIndexDocs | POST /v1/index-docs | |
| cloudProductControllerSearchDocs | POST /v1/search-docs |
cloudProductControllerChatDocs
kotlin.Any cloudProductControllerChatDocs(cloudProductControllerChatDocsRequest, store)
RAG chat — retrieves relevant context from the document index and returns a grounded answer.
Example
// Import classes:
//import ai.hanzo.sdk.infrastructure.*
//import ai.hanzo.sdk.models.*
val apiInstance = SearchAPIApi()
val cloudProductControllerChatDocsRequest : CloudProductControllerChatDocsRequest = // CloudProductControllerChatDocsRequest |
val store : kotlin.String = store_example // kotlin.String | Optional store/index selector (e.g. bot-docs).
try {
val result : kotlin.Any = apiInstance.cloudProductControllerChatDocs(cloudProductControllerChatDocsRequest, store)
println(result)
} catch (e: ClientException) {
println("4xx response calling SearchAPIApi#cloudProductControllerChatDocs")
e.printStackTrace()
} catch (e: ServerException) {
println("5xx response calling SearchAPIApi#cloudProductControllerChatDocs")
e.printStackTrace()
}
Parameters
| cloudProductControllerChatDocsRequest | CloudProductControllerChatDocsRequest| | |
| Name | Type | Description | Notes |
|---|---|---|---|
| store | kotlin.String | Optional store/index selector (e.g. bot-docs). | [optional] |
Return type
Authorization
Configure bearerAuth statically:
ApiClient.accessToken = ""
Configure bearerAuth dynamically:
apiInstance.accessTokenProvider = { "" }
HTTP request headers
- Content-Type: application/json
- Accept: application/json
cloudProductControllerIndexDocs
kotlin.Any cloudProductControllerIndexDocs(cloudProductControllerIndexDocsRequest, store)
Index (upsert) documents into the search backend. Write scope required.
Example
// Import classes:
//import ai.hanzo.sdk.infrastructure.*
//import ai.hanzo.sdk.models.*
val apiInstance = SearchAPIApi()
val cloudProductControllerIndexDocsRequest : CloudProductControllerIndexDocsRequest = // CloudProductControllerIndexDocsRequest |
val store : kotlin.String = store_example // kotlin.String | Optional store/index selector (e.g. bot-docs).
try {
val result : kotlin.Any = apiInstance.cloudProductControllerIndexDocs(cloudProductControllerIndexDocsRequest, store)
println(result)
} catch (e: ClientException) {
println("4xx response calling SearchAPIApi#cloudProductControllerIndexDocs")
e.printStackTrace()
} catch (e: ServerException) {
println("5xx response calling SearchAPIApi#cloudProductControllerIndexDocs")
e.printStackTrace()
}
Parameters
| cloudProductControllerIndexDocsRequest | CloudProductControllerIndexDocsRequest| | |
| Name | Type | Description | Notes |
|---|---|---|---|
| store | kotlin.String | Optional store/index selector (e.g. bot-docs). | [optional] |
Return type
Authorization
Configure bearerAuth statically:
ApiClient.accessToken = ""
Configure bearerAuth dynamically:
apiInstance.accessTokenProvider = { "" }
HTTP request headers
- Content-Type: application/json
- Accept: application/json
cloudProductControllerSearchDocs
kotlin.collections.List<kotlin.Any> cloudProductControllerSearchDocs(cloudProductControllerSearchDocsRequest, store)
Hybrid full-text + vector search over an indexed document store.
Example
// Import classes:
//import ai.hanzo.sdk.infrastructure.*
//import ai.hanzo.sdk.models.*
val apiInstance = SearchAPIApi()
val cloudProductControllerSearchDocsRequest : CloudProductControllerSearchDocsRequest = // CloudProductControllerSearchDocsRequest |
val store : kotlin.String = store_example // kotlin.String | Optional store/index selector (e.g. bot-docs).
try {
val result : kotlin.collections.List<kotlin.Any> = apiInstance.cloudProductControllerSearchDocs(cloudProductControllerSearchDocsRequest, store)
println(result)
} catch (e: ClientException) {
println("4xx response calling SearchAPIApi#cloudProductControllerSearchDocs")
e.printStackTrace()
} catch (e: ServerException) {
println("5xx response calling SearchAPIApi#cloudProductControllerSearchDocs")
e.printStackTrace()
}
Parameters
| cloudProductControllerSearchDocsRequest | CloudProductControllerSearchDocsRequest| | |
| Name | Type | Description | Notes |
|---|---|---|---|
| store | kotlin.String | Optional store/index selector (e.g. bot-docs). | [optional] |
Return type
kotlin.collections.List<kotlin.Any>
Authorization
Configure bearerAuth statically:
ApiClient.accessToken = ""
Configure bearerAuth dynamically:
apiInstance.accessTokenProvider = { "" }
HTTP request headers
- Content-Type: application/json
- Accept: application/json