summaryrefslogtreecommitdiff
path: root/libpanto-go/README.md
diff options
context:
space:
mode:
Diffstat (limited to 'libpanto-go/README.md')
-rw-r--r--libpanto-go/README.md56
1 files changed, 0 insertions, 56 deletions
diff --git a/libpanto-go/README.md b/libpanto-go/README.md
deleted file mode 100644
index 063f800..0000000
--- a/libpanto-go/README.md
+++ /dev/null
@@ -1,56 +0,0 @@
-# libpanto-go
-
-Idiomatic Go bindings for `libpanto-c` via cgo.
-
-## Build
-
-Build the C ABI first:
-
-```sh
-cd ../libpanto-c
-zig build
-```
-
-Then use the Go package from this directory:
-
-```sh
-go test ./...
-```
-
-At runtime, make sure `../libpanto-c/zig-out/lib` (or the installed equivalent) is on your platform's dynamic library path.
-
-## Example
-
-```go
-panto.Init()
-defer panto.Deinit()
-
-agent, err := panto.NewAgent(panto.Config{
- Provider: panto.ProviderConfig{
- OpenAIChat: &panto.OpenAIChatConfig{
- APIKey: os.Getenv("OPENAI_API_KEY"),
- BaseURL: "https://api.openai.com/v1",
- Model: "gpt-4.1-mini",
- },
- },
-})
-if err != nil { /* handle */ }
-defer agent.Close()
-
-stream, err := agent.Run(panto.UserMessage(panto.TextBlock("hello")))
-if err != nil { /* handle */ }
-defer stream.Close()
-
-for ev := range stream.Iter() {
- // ev is an Event interface; type-switch on the concrete event, or branch
- // on ev.EventType(). Breaking out of the loop is safe: the session store
- // is current at every step.
- switch ev := ev.(type) {
- case panto.ContentDeltaEvent:
- fmt.Print(ev.Delta)
- case panto.MessageCompleteEvent:
- // full message at agent.Conversation().Message(ev.MessageIndex)
- }
-}
-if err := stream.Err(); err != nil { /* handle */ }
-```