Skip to content

Module github.com/bide-ai/bide/codec/gcf ​

Go module github.com/bide-ai/bide/codec/gcf; all modules.

codec/gcf ​

github.com/bide-ai/bide/codec/gcf · pkg.go.dev · Stability: core

Package gcf provides a provider.ToolResultCodec that encodes tool results as GCF (Graph Compact Format) instead of JSON when they are sent to the model.

Functions

  • func New() provider.ToolResultCodec: New returns a GCF tool-result codec.

type Codec ​

go
type Codec struct{}

Codec renders a tool result's JSON bytes as a GCF document.

Methods

  • func (Codec) EncodeToolResult(raw json.RawMessage) (string, error): EncodeToolResult encodes the canonical JSON as GCF, keeping object keys in the tool's order and every number at exactly the value the tool returned.

Apache-2.0 licensed.