bbi

package
v0.0.0-llm.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 19, 2025 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Register

func Register(name string, driver Driver)

Types

type Driver

type Driver interface {
	NewSession(dagql.Object, *dagql.Server) Session
}

BBI stands for "Body-Brain Interface". A BBI implements a strategy for mapping a Dagger object's API to LLM function calls The perfect BBI has not yet been designed, so there are multiple BBI implementations, and an interface for easily swapping them out. Hopefully in the future the perfect BBI design will emerge, and we can retire the pluggable interface.

type Session

type Session interface {
	// Return a set of tools for the next llm loop
	// The tools may modify the state without worrying about synchronization:
	// it's the agent's responsibility to not call tools concurrently.
	Tools() []Tool
	Self() dagql.Object
}

A stateful BBI session

func NewSession

func NewSession(driver string, self dagql.Object, srv *dagql.Server) (Session, error)

Start a new BBI session

type Tool

type Tool struct {
	Name        string
	Description string
	Schema      map[string]interface{}
	Call        func(context.Context, interface{}) (interface{}, error)
}

A frontend for LLM tool calling

Directories

Path Synopsis
gql

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL