Skip to content
/ gossip Public

Gossip is a lightweight, fast, and reliable Go module designed to interact with APIs from popular AI inference providers.

License

Notifications You must be signed in to change notification settings

bgeen/gossip

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

gossip

Gossip mascot

Gossip stands for "Go Simple Standards for Inference Providers". It is a lightweight, fast, and reliable Go module designed to interact with APIs from popular AI inference providers.

Its goal is to be ergonomic for developers while maintaining speed and reliability.

⚠️ Note: This module focuses on the most essential and commonly used features from each provider, rather than offering a full abstraction of every available API capability.

✅ Supported Providers & Features

OpenAI

  • ✅ Chat Completion
  • ✅ Function Calling
  • 🔜 Parallel Function Calling (Coming Soon)
  • 🔜 Prompt Caching (Coming Soon)

Anthropic

  • ✅ Chat Completion
  • ✅ Function Calling
  • 🔜 Parallel Function Calling (Coming Soon)
  • 🔜 Prompt Caching (Coming Soon)

Groq

  • ✅ Chat Completion
  • ✅ Function Calling
  • 🔜 Parallel Function Calling (Coming Soon)
  • 🔜 Prompt Caching (Coming Soon)

Usage

Chat Completion

package main

import (
	"fmt"

	provider "go.bgeen.com/gossip/providers"
)

func main() {
	agent, err := provider.NewAgent("openai:gpt-4o", provider.WithTemperature(0.8))
	if err != nil {
		fmt.Println(err)
		return
	}
	result := agent.Run("what is consciousness?")
	fmt.Println(result.Data)
}
Tool Calling
package main

import (
	"fmt"
	"strings"

	provider "go.bgeen.com/gossip/providers"
)

func main1() {
	agent, err := provider.NewAgent("anthropic:claude-3-5-sonnet-latest", provider.WithTemperature(0.8))
	if err != nil {
		fmt.Println(err)
		return
	}
	agent.RegisterTool(FindCityTemp, ParamsFindCityTemp{}, "find the weather temperature of the provided city name")
	result := agent.Run("whats the current temperature in delhi?")
	fmt.Println(result.Data)
}

type ParamsFindCityTemp struct {
	CityName string `json:"city_name" desctiption:"name of the city"`
}

func FindCityTemp(params ParamsFindCityTemp) string {
	if strings.ToLower(params.CityName) == "kolkata" {
		return "26 degree"
	}
	return "city not found"
}

About

Gossip is a lightweight, fast, and reliable Go module designed to interact with APIs from popular AI inference providers.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages