mirror of
https://github.com/hanzoai/agent.git
synced 2026-10-30 15:05:34 +00:00
Thirty-five examples in this repo and every one of them is Python. Go and TypeScript shipped clients with nothing showing how to call them, which is why an outside adopter with working SDKs in front of them wrote their own. Go's are Example functions rather than a main.go, so `go test` compiles them on every run and `go doc` attaches them to Client.Complete. An example nobody builds is prose that rots; this kind cannot drift from the API without turning the build red. TypeScript's two are in tsconfig's include for the same reason — outside it they would typecheck never. tsup takes only src/index.ts and the package ships only dist, so nothing here reaches the tarball. Both set the endpoint explicitly, and that is the point rather than boilerplate. Go's Config defaults BaseURL to api.openai.com and TypeScript's provider union names ten third parties without naming Hanzo, so an example that set only the provider would send our key to somebody else's endpoint. Worth fixing in the clients; meanwhile the examples do not teach it. Small things the examples make explicit because the first one a person copies is the one they keep: a deadline on a network call, Choices checked rather than indexed at zero, and an error printed as its message rather than as an object that can carry a key into a log. Co-authored-by: Hanzo Dev <[email protected]>
21 lines
501 B
JSON
21 lines
501 B
JSON
{
|
|
"compilerOptions": {
|
|
"target": "ES2022",
|
|
"module": "ESNext",
|
|
"moduleResolution": "bundler",
|
|
"lib": ["ES2022"],
|
|
"outDir": "./dist",
|
|
"rootDir": "./",
|
|
"declaration": true,
|
|
"declarationMap": true,
|
|
"sourceMap": true,
|
|
"strict": true,
|
|
"esModuleInterop": true,
|
|
"skipLibCheck": true,
|
|
"forceConsistentCasingInFileNames": true,
|
|
"resolveJsonModule": true
|
|
},
|
|
"include": ["src/**/*", "examples/**/*"],
|
|
"exclude": ["node_modules", "dist", "tests"]
|
|
}
|