Skip to content

GrayCodeAI/hawk-sdk-go

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

35 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Hawk SDK for Go

Official Go client for the Hawk daemon API

Go License CI


The Hawk SDK for Go provides a type-safe client for interacting with the Hawk daemon API. It supports chat, streaming, session management, and health checks.

Features

  • Type-safe API - Strongly typed requests and responses
  • Streaming support - Real-time response streaming
  • Session management - Create and manage chat sessions
  • Health checks - Monitor daemon status
  • Error handling - Detailed error types and messages

Installation

go get github.com/GrayCodeAI/hawk-sdk-go

Quick Start

import hawksdk "github.com/GrayCodeAI/hawk-sdk-go"

client := hawksdk.New()

// Health check
health, err := client.Health(ctx)
fmt.Printf("Daemon version: %s\n", health.Version)

// Chat
resp, err := client.Chat(ctx, hawksdk.ChatRequest{
    Message: "Explain what a closure is in Go",
})
fmt.Println(resp.Response)

Examples

See the examples/ directory for complete runnable examples.

API Reference

Client Methods

  • Health(ctx) - Check daemon health and version
  • Chat(ctx, req) - Send a chat message
  • ChatStream(ctx, req) - Stream chat responses
  • Sessions(ctx) - List active sessions
  • Session(ctx, id) - Get session details

Contributing

Contributions are welcome — please read CONTRIBUTING.md before opening a pull request.

License

MIT - see LICENSE for details.

About

Go SDK for the hawk daemon API

Resources

License

Code of conduct

Contributing

Security policy

Stars

Watchers

Forks

Packages

 
 
 

Contributors