internal/

directory
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Nov 13, 2025 License: Apache-2.0

README

Internal Examples

This directory contains comprehensive examples that test all features of the Braintrust Go SDK. These examples are primarily used for:

  • SDK development and validation - Ensuring all features work correctly
  • Regression testing - Catching breaking changes during development
  • Feature coverage - Demonstrating every SDK capability

Purpose

Unlike the customer-facing examples in the parent directory, these examples are not optimized for learning. They are "kitchen sink" examples that exercise many features at once to verify SDK functionality.

Examples

Provider Kitchen Sinks

Comprehensive examples testing all features for each AI provider:

  • anthropic/ - All Anthropic features (messages, tools, streaming, thinking, vision)
  • openai-v1/ - All OpenAI v1 features (chat, streaming, tools, vision)
  • openai-v2/ - All OpenAI v2 features (Responses API, reasoning, conversations)
  • genai/ - All Gemini features (text, system instruction, multi-turn, streaming, functions, safety, JSON mode, multimodal)
  • langchaingo/ - All LangChainGo features (simple, multi-turn, chains, tools, agents, retriever, streaming, system prompt, temperature, max tokens, prefill, stop sequences, long context, metadata)
Specialized Testing
  • langchaingo-anthropic/ - LangChainGo with Anthropic provider (uses forked langchaingo)
  • functions/ - Functions API usage (loading tasks/scorers with FunctionOpts)
  • rewrite/ - Manual tracing and evaluator API testing
  • email-evals/ - Realistic eval example with complex scoring
  • eval-updates/ - Testing Update option for appending to experiments
  • temporal/ - Temporal workflow distributed tracing (worker + client)

For Learning

If you're learning the Braintrust SDK, start with the examples in the parent directory (../). Those examples are concise, focused, and designed for customer education.

Directories

Path Synopsis
Anthropic kitchen sink - tests all the Anthropic features with minimal code
Anthropic kitchen sink - tests all the Anthropic features with minimal code
This is a realistic eval example.
This is a realistic eval example.
This example demonstrates using the Update option to append results to an existing experiment.
This example demonstrates using the Update option to append results to an existing experiment.
Package main demonstrates a comprehensive "kitchen sink" example that combines as much Braintrust SDK functionality as possible into a single executable.
Package main demonstrates a comprehensive "kitchen sink" example that combines as much Braintrust SDK functionality as possible into a single executable.

Jump to

Keyboard shortcuts

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