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]>
8.7 KiB
ScoresApi
All URIs are relative to https://api.hanzo.ai
| Method | HTTP request | Description |
|---|---|---|
| consoleCreateScore | POST /v1/console/scores | Create a score |
| consoleDeleteScore | DELETE /v1/console/scores/{scoreId} | Delete a score |
| consoleGetScore | GET /v1/console/scores/{scoreId} | Get a score by ID |
| consoleListScores | GET /v1/console/scores | Get all scores |
| evalsGetV1EvalsScores | GET /v1/evals/scores | List scores |
consoleCreateScore
ConsoleCreateComment200Response consoleCreateScore(consoleCreateScoreRequest)
Create a score
Example
// Import classes:
//import ai.hanzo.sdk.infrastructure.*
//import ai.hanzo.sdk.models.*
val apiInstance = ScoresApi()
val consoleCreateScoreRequest : ConsoleCreateScoreRequest = // ConsoleCreateScoreRequest |
try {
val result : ConsoleCreateComment200Response = apiInstance.consoleCreateScore(consoleCreateScoreRequest)
println(result)
} catch (e: ClientException) {
println("4xx response calling ScoresApi#consoleCreateScore")
e.printStackTrace()
} catch (e: ServerException) {
println("5xx response calling ScoresApi#consoleCreateScore")
e.printStackTrace()
}
Parameters
| Name | Type | Description | Notes |
|---|---|---|---|
| consoleCreateScoreRequest | ConsoleCreateScoreRequest |
Return type
ConsoleCreateComment200Response
Authorization
Configure bearerAuth statically:
ApiClient.accessToken = ""
Configure bearerAuth dynamically:
apiInstance.accessTokenProvider = { "" }
HTTP request headers
- Content-Type: application/json
- Accept: application/json
consoleDeleteScore
kotlin.Any consoleDeleteScore(scoreId)
Delete a score
Example
// Import classes:
//import ai.hanzo.sdk.infrastructure.*
//import ai.hanzo.sdk.models.*
val apiInstance = ScoresApi()
val scoreId : kotlin.String = scoreId_example // kotlin.String |
try {
val result : kotlin.Any = apiInstance.consoleDeleteScore(scoreId)
println(result)
} catch (e: ClientException) {
println("4xx response calling ScoresApi#consoleDeleteScore")
e.printStackTrace()
} catch (e: ServerException) {
println("5xx response calling ScoresApi#consoleDeleteScore")
e.printStackTrace()
}
Parameters
| Name | Type | Description | Notes |
|---|---|---|---|
| scoreId | 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
consoleGetScore
ConsoleScore consoleGetScore(scoreId)
Get a score by ID
Example
// Import classes:
//import ai.hanzo.sdk.infrastructure.*
//import ai.hanzo.sdk.models.*
val apiInstance = ScoresApi()
val scoreId : kotlin.String = scoreId_example // kotlin.String |
try {
val result : ConsoleScore = apiInstance.consoleGetScore(scoreId)
println(result)
} catch (e: ClientException) {
println("4xx response calling ScoresApi#consoleGetScore")
e.printStackTrace()
} catch (e: ServerException) {
println("5xx response calling ScoresApi#consoleGetScore")
e.printStackTrace()
}
Parameters
| Name | Type | Description | Notes |
|---|---|---|---|
| scoreId | 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
consoleListScores
ConsoleListScores200Response consoleListScores(page, limit, userId, name, fromTimestamp, toTimestamp, source,
operator,value, scoreIds, configId, dataType, environment)
Get all scores
Example
// Import classes:
//import ai.hanzo.sdk.infrastructure.*
//import ai.hanzo.sdk.models.*
val apiInstance = ScoresApi()
val page : kotlin.Int = 56 // kotlin.Int |
val limit : kotlin.Int = 56 // kotlin.Int |
val userId : kotlin.String = userId_example // kotlin.String |
val name : kotlin.String = name_example // kotlin.String |
val fromTimestamp : java.time.OffsetDateTime = 2013-10-20T19:20:30+01:00 // java.time.OffsetDateTime |
val toTimestamp : java.time.OffsetDateTime = 2013-10-20T19:20:30+01:00 // java.time.OffsetDateTime |
val source : kotlin.String = source_example // kotlin.String |
val `operator` : kotlin.String = `operator`_example // kotlin.String |
val `value` : java.math.BigDecimal = 8.14 // java.math.BigDecimal |
val scoreIds : kotlin.String = scoreIds_example // kotlin.String |
val configId : kotlin.String = configId_example // kotlin.String |
val dataType : kotlin.String = dataType_example // kotlin.String |
val environment : kotlin.collections.List<kotlin.String> = // kotlin.collections.List<kotlin.String> |
try {
val result : ConsoleListScores200Response = apiInstance.consoleListScores(page, limit, userId, name, fromTimestamp, toTimestamp, source, `operator`, `value`, scoreIds, configId, dataType, environment)
println(result)
} catch (e: ClientException) {
println("4xx response calling ScoresApi#consoleListScores")
e.printStackTrace()
} catch (e: ServerException) {
println("5xx response calling ScoresApi#consoleListScores")
e.printStackTrace()
}
Parameters
| page | kotlin.Int| | [optional] [default to 1] | | limit | kotlin.Int| | [optional] [default to 50] | | userId | kotlin.String| | [optional] | | name | kotlin.String| | [optional] | | fromTimestamp | java.time.OffsetDateTime| | [optional] | | toTimestamp | java.time.OffsetDateTime| | [optional] | | source | kotlin.String| | [optional] [enum: API, EVAL, ANNOTATION] | | `operator` | kotlin.String| | [optional] | | `value` | java.math.BigDecimal| | [optional] | | scoreIds | kotlin.String| | [optional] | | configId | kotlin.String| | [optional] | | dataType | kotlin.String| | [optional] [enum: NUMERIC, CATEGORICAL, BOOLEAN] |
| Name | Type | Description | Notes |
|---|---|---|---|
| environment | kotlin.collections.List<kotlin.String> | [optional] |
Return type
Authorization
Configure bearerAuth statically:
ApiClient.accessToken = ""
Configure bearerAuth dynamically:
apiInstance.accessTokenProvider = { "" }
HTTP request headers
- Content-Type: Not defined
- Accept: application/json
evalsGetV1EvalsScores
EvalsGetV1EvalsScores200Response evalsGetV1EvalsScores(runName, limit)
List scores
Example
// Import classes:
//import ai.hanzo.sdk.infrastructure.*
//import ai.hanzo.sdk.models.*
val apiInstance = ScoresApi()
val runName : kotlin.String = runName_example // kotlin.String |
val limit : kotlin.Int = 56 // kotlin.Int |
try {
val result : EvalsGetV1EvalsScores200Response = apiInstance.evalsGetV1EvalsScores(runName, limit)
println(result)
} catch (e: ClientException) {
println("4xx response calling ScoresApi#evalsGetV1EvalsScores")
e.printStackTrace()
} catch (e: ServerException) {
println("5xx response calling ScoresApi#evalsGetV1EvalsScores")
e.printStackTrace()
}
Parameters
| runName | kotlin.String| | [optional] |
| Name | Type | Description | Notes |
|---|---|---|---|
| limit | kotlin.Int | [optional] [default to 50] |
Return type
EvalsGetV1EvalsScores200Response
Authorization
Configure bearerAuth statically:
ApiClient.accessToken = ""
Configure bearerAuth dynamically:
apiInstance.accessTokenProvider = { "" }
HTTP request headers
- Content-Type: Not defined
- Accept: application/json