mirror of
https://github.com/hanzo-java/sdk.git
synced 2026-11-20 20:02:20 +00:00
Regenerated with the java row's packages moved up a level: `cloud` under ai.hanzo named nothing a caller needed. ApiClient, JSON and the rest of the invoker sit in ai.hanzo beside the hand-written Hanzo; the examples are ai.hanzo.examples. An import of ai.hanzo.cloud.* becomes ai.hanzo.*. The artifact keeps its coordinate, ai.hanzo:hanzo-java-cloud. Co-authored-by: Hanzo Dev <[email protected]>
30 lines
1.1 KiB
Groovy
30 lines
1.1 KiB
Groovy
// The six canonical flows. Every Hanzo SDK ships the same six under
|
|
// examples/<flow>/ — the list is data in hanzoai/openapi flows.yaml, not a
|
|
// choice this repo makes.
|
|
//
|
|
// They are compiled by `./gradlew build`, which is the point: an example that
|
|
// does not compile is worse than no example.
|
|
|
|
// One source directory: examples/<flow>/<Flow>.java. Nothing else lives here —
|
|
// HANZO_API_KEY, HANZO_BASE_URL and HANZO_ORG_ID are resolved by ai.hanzo.Hanzo
|
|
// in the client itself, so an example wires up the same way a reader's program
|
|
// does instead of demonstrating a helper only the examples have.
|
|
sourceSets.main.java {
|
|
srcDirs = ['.']
|
|
exclude 'build/**'
|
|
}
|
|
|
|
dependencies {
|
|
implementation project(':hanzo-java-cloud')
|
|
}
|
|
|
|
// ./gradlew hello | chat | money | store | agent | tools
|
|
['hello', 'chat', 'money', 'store', 'agent', 'tools'].each { flow ->
|
|
tasks.register(flow, JavaExec) {
|
|
group = 'hanzo'
|
|
description = "Run the $flow example."
|
|
mainClass = "ai.hanzo.examples.${flow.capitalize()}"
|
|
classpath = sourceSets.main.runtimeClasspath
|
|
}
|
|
}
|