bubo

package module
v0.0.19 Latest Latest
Warning

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

Go to latest
Published: Jan 1, 2025 License: MIT Imports: 2 Imported by: 0

README ยถ

๐Ÿฆ‰ Bubo: A Framework for Building AI Agents

Bubo is a Go framework for creating and orchestrating AI agents, with first-class support for OpenAI's GPT models and function calling capabilities.

๐ŸŒŸ Overview

Bubo provides a robust foundation for building AI agents that can:

  • Execute tools and functions
  • Handle streaming responses
  • Process multi-modal inputs (text, images, audio)
  • Manage complex conversation threads
  • Run parallel tool executions

โœจ Key Features

  • ๐Ÿ›  Flexible Agent System

    • Define custom agents with specific tools and capabilities
    • Configure model parameters and instructions
    • Support for parallel tool execution
  • ๐Ÿ”Œ OpenAI Integration

    • First-class support for OpenAI's chat models
    • Streaming support for real-time responses
    • Function calling capabilities
    • Multi-modal content handling (text, images, audio)
  • ๐Ÿ“ Rich Message Handling

    • Support for various message types (user, assistant, tool calls)
    • Structured content parts for different media types
    • Thread management for complex conversations
  • ๐Ÿ”ง Tool System

    • Define custom tools with JSON schema validation
    • Support for parallel tool execution
    • Structured tool responses and error handling
  • ๐Ÿ“Š Observability

    • Detailed logging with zerolog integration
    • Stream events for real-time monitoring
    • Error tracking and handling

๐Ÿš€ Getting Started

package main

import (
  "github.com/casualjim/bubo"
  "github.com/openai/openai-go"
)

func main() {
  // Create a new agent
  agent := bubo.NewAgent(
    "my-agent",
    string(openai.ChatModelGPT4),
    "Your agent instructions here",
  )

  // Add tools
  agent.AddTool(bubo.AgentToolDefinition{
    Name: "my-tool",
    Function: &bubo.FunctionDefinition{
      // Define your tool's schema and behavior
    },
  })

  // Configure parallel tool execution
  agent.EnableParallelToolCalls()
}

๐Ÿ“ฆ Installation

go get github.com/casualjim/bubo

๐Ÿ›  Requirements

  • Go 1.23.3 or higher
  • OpenAI API key for AI capabilities

๐Ÿ“ License

This project is licensed under the terms specified in the LICENSE file.

Documentation ยถ

Index ยถ

Constants ยถ

This section is empty.

Variables ยถ

This section is empty.

Functions ยถ

func WithOwls ยถ added in v0.0.19

func WithOwls(owl api.Owl, extraOwls ...api.Owl) opts.Option[DefaultParliament]

Types ยถ

type DefaultParliament ยถ added in v0.0.19

type DefaultParliament struct {
	// contains filtered or unexported fields
}

type Parliament ยถ added in v0.0.19

type Parliament interface{}

func NewParliament ยถ added in v0.0.19

func NewParliament(options ...opts.Option[DefaultParliament]) Parliament

Directories ยถ

Path Synopsis
cmd
bubo-tool-gen command
examples
basic/minimal command
internal
shorttermmemory
Package shorttermmemory provides functionality for managing the runtime state of message processing, including message aggregation, forking, and joining of message streams, as well as usage tracking.
Package shorttermmemory provides functionality for managing the runtime state of message processing, including message aggregation, forking, and joining of message streams, as well as usage tracking.
Package messages provides types and functionality for handling multi-part message content in different formats including text, images, and audio.
Package messages provides types and functionality for handling multi-part message content in different formats including text, images, and audio.
pkg

Jump to

Keyboard shortcuts

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