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]>
7.0 KiB
MemoriesApi
All URIs are relative to https://api.hanzo.ai
| Method | HTTP request | Description |
|---|---|---|
| chatDeleteMemoriesBykey | DELETE /v1/chat/memories/{key} | Delete a memory |
| chatGetMemories | GET /v1/chat/memories | Get all user memories |
| chatPatchMemoriesBykey | PATCH /v1/chat/memories/{key} | Update a memory |
| chatPatchMemoriesPreferences | PATCH /v1/chat/memories/preferences | Update memory preferences |
| chatPostMemories | POST /v1/chat/memories | Create a memory |
chatDeleteMemoriesBykey
kotlin.Any chatDeleteMemoriesBykey(key)
Delete a memory
Example
// Import classes:
//import ai.hanzo.sdk.infrastructure.*
//import ai.hanzo.sdk.models.*
val apiInstance = MemoriesApi()
val key : kotlin.String = key_example // kotlin.String |
try {
val result : kotlin.Any = apiInstance.chatDeleteMemoriesBykey(key)
println(result)
} catch (e: ClientException) {
println("4xx response calling MemoriesApi#chatDeleteMemoriesBykey")
e.printStackTrace()
} catch (e: ServerException) {
println("5xx response calling MemoriesApi#chatDeleteMemoriesBykey")
e.printStackTrace()
}
Parameters
| Name | Type | Description | Notes |
|---|---|---|---|
| key | kotlin.String |
Return type
Authorization
Configure bearerAuth statically:
ApiClient.accessToken = ""
Configure bearerAuth dynamically:
apiInstance.accessTokenProvider = { "" }
HTTP request headers
- Content-Type: Not defined
- Accept: application/json
chatGetMemories
ChatGetMemories200Response chatGetMemories()
Get all user memories
Example
// Import classes:
//import ai.hanzo.sdk.infrastructure.*
//import ai.hanzo.sdk.models.*
val apiInstance = MemoriesApi()
try {
val result : ChatGetMemories200Response = apiInstance.chatGetMemories()
println(result)
} catch (e: ClientException) {
println("4xx response calling MemoriesApi#chatGetMemories")
e.printStackTrace()
} catch (e: ServerException) {
println("5xx response calling MemoriesApi#chatGetMemories")
e.printStackTrace()
}
Parameters
This endpoint does not need any parameter.
Return type
Authorization
Configure bearerAuth statically:
ApiClient.accessToken = ""
Configure bearerAuth dynamically:
apiInstance.accessTokenProvider = { "" }
HTTP request headers
- Content-Type: Not defined
- Accept: application/json
chatPatchMemoriesBykey
kotlin.Any chatPatchMemoriesBykey(key, chatPatchMemoriesBykeyRequest)
Update a memory
Example
// Import classes:
//import ai.hanzo.sdk.infrastructure.*
//import ai.hanzo.sdk.models.*
val apiInstance = MemoriesApi()
val key : kotlin.String = key_example // kotlin.String |
val chatPatchMemoriesBykeyRequest : ChatPatchMemoriesBykeyRequest = // ChatPatchMemoriesBykeyRequest |
try {
val result : kotlin.Any = apiInstance.chatPatchMemoriesBykey(key, chatPatchMemoriesBykeyRequest)
println(result)
} catch (e: ClientException) {
println("4xx response calling MemoriesApi#chatPatchMemoriesBykey")
e.printStackTrace()
} catch (e: ServerException) {
println("5xx response calling MemoriesApi#chatPatchMemoriesBykey")
e.printStackTrace()
}
Parameters
| key | kotlin.String| | |
| Name | Type | Description | Notes |
|---|---|---|---|
| chatPatchMemoriesBykeyRequest | ChatPatchMemoriesBykeyRequest |
Return type
Authorization
Configure bearerAuth statically:
ApiClient.accessToken = ""
Configure bearerAuth dynamically:
apiInstance.accessTokenProvider = { "" }
HTTP request headers
- Content-Type: application/json
- Accept: application/json
chatPatchMemoriesPreferences
kotlin.Any chatPatchMemoriesPreferences(chatPatchMemoriesPreferencesRequest)
Update memory preferences
Example
// Import classes:
//import ai.hanzo.sdk.infrastructure.*
//import ai.hanzo.sdk.models.*
val apiInstance = MemoriesApi()
val chatPatchMemoriesPreferencesRequest : ChatPatchMemoriesPreferencesRequest = // ChatPatchMemoriesPreferencesRequest |
try {
val result : kotlin.Any = apiInstance.chatPatchMemoriesPreferences(chatPatchMemoriesPreferencesRequest)
println(result)
} catch (e: ClientException) {
println("4xx response calling MemoriesApi#chatPatchMemoriesPreferences")
e.printStackTrace()
} catch (e: ServerException) {
println("5xx response calling MemoriesApi#chatPatchMemoriesPreferences")
e.printStackTrace()
}
Parameters
| Name | Type | Description | Notes |
|---|---|---|---|
| chatPatchMemoriesPreferencesRequest | ChatPatchMemoriesPreferencesRequest |
Return type
Authorization
Configure bearerAuth statically:
ApiClient.accessToken = ""
Configure bearerAuth dynamically:
apiInstance.accessTokenProvider = { "" }
HTTP request headers
- Content-Type: application/json
- Accept: application/json
chatPostMemories
ChatPostMemories201Response chatPostMemories(chatPostMemoriesRequest)
Create a memory
Example
// Import classes:
//import ai.hanzo.sdk.infrastructure.*
//import ai.hanzo.sdk.models.*
val apiInstance = MemoriesApi()
val chatPostMemoriesRequest : ChatPostMemoriesRequest = // ChatPostMemoriesRequest |
try {
val result : ChatPostMemories201Response = apiInstance.chatPostMemories(chatPostMemoriesRequest)
println(result)
} catch (e: ClientException) {
println("4xx response calling MemoriesApi#chatPostMemories")
e.printStackTrace()
} catch (e: ServerException) {
println("5xx response calling MemoriesApi#chatPostMemories")
e.printStackTrace()
}
Parameters
| Name | Type | Description | Notes |
|---|---|---|---|
| chatPostMemoriesRequest | ChatPostMemoriesRequest |
Return type
Authorization
Configure bearerAuth statically:
ApiClient.accessToken = ""
Configure bearerAuth dynamically:
apiInstance.accessTokenProvider = { "" }
HTTP request headers
- Content-Type: application/json
- Accept: application/json