Skip to content

speakeasy-sdks/honeyhive-go-sdk

Repository files navigation

HoneyHive Go SDK

HoneyHive is a model observability and evaluation platform that helps you continuously improve your models in production. We help you evaluate, deploy, monitor and fine-tune both closed and open-source large language models for production use-cases, allowing you to optimize model performance & align your models with your users’ preferences.

SDK Installation

go get github.com/speakeasy-sdks/honeyhive-go-sdk

Authentication

After signing up on the app, you can find your API key in the Settings page.

SDK Example Usage

package main

import (
    "context"
    "log"
    "github.com/speakeasy-sdks/honeyhive-go-sdk"
    "github.com/speakeasy-sdks/honeyhive-go-sdk/pkg/models/shared"
    "github.com/speakeasy-sdks/honeyhive-go-sdk/pkg/models/operations"
)

func main() {
    s := honeyhive.New(honeyhive.WithSecurity(
        shared.Security{
            BearerAuth: shared.SchemeBearerAuth{
                Authorization: "Bearer YOUR_BEARER_TOKEN_HERE",
            },
        },
    ))
    
    req := operations.CreateDatasetRequest{
        Request: shared.Dataset{
            Description: "unde",
            File: "deserunt",
            Name: "porro",
            Purpose: "nulla",
            Task: "id",
        },
    }

    ctx := context.Background()
    res, err := s.Dataset.CreateDataset(ctx, req)
    if err != nil {
        log.Fatal(err)
    }

    if res.CreateDatasetResponse != nil {
        // handle response
    }
}

SDK Available Operations

Dataset

  • CreateDataset - Create Dataset
  • DeleteDataset - Delete Datasets
  • FindDatasets - Get Datasets

Feedback

  • CreateFeedback - Create Feedback

FineTunedModel

  • FindFineTunedModels - This endpoint gets the fine-tuned models being managed by the user.

Generation

  • GetGeneration - Get Generations
  • IngestGenerations - Create Generation for Task
  • ModelPromptCreateGeneration - Create Generation for Model and Prompt
  • TaskCreateGeneration - Create Generation for Task

Metric

  • CreateMetric - Create Metric
  • FindMetrics - Get Metrics

Prompt

  • ChangePrompt - Update Prompts
  • CreatePrompt - Create Prompt
  • DeletePrompt - Delete Prompts
  • FindPrompts - Get Prompts

Task

  • CreateTask - Create a new task
  • FindAllTasks - Find all Tasks
  • UpdateTask - Update an existing task

SDK Generated by Speakeasy