toolkit

command module
v0.1.12 Latest Latest
Warning

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

Go to latest
Published: May 6, 2025 License: MIT Imports: 2 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

README

Blaxel Toolkit

Install cli on MacOS

brew tap beamlit/blaxel
brew install blaxel

Sample usage of SDK

package main

import (
	"context"
	"log/slog"
	"os"

	"github.com/davecgh/go-spew/spew"
	"github.com/beamlit/toolkit/sdk"
)

var BASE_URL = "https://api.blaxel.ai/v0"
var RUN_URL = "https://run.blaxel.ai"

func init() {
	if url := os.Getenv("BL_API_URL"); url != "" {
		BASE_URL = url
	}
	if runUrl := os.Getenv("BL_RUN_URL"); runUrl != "" {
		RUN_URL = runUrl
	}
}
func main() {
	ctx := context.Background()

	client, err := sdk.NewClientWithCredentials(sdk.RunClientWithCredentials{
		ApiURL:      BASE_URL,
		RunURL:      RUN_URL,
		Credentials: sdk.Credentials{APIKey: "BL_96UX6OFWA6JG9IA1NDE7CCMED22U8Z2F"},
		Workspace:   "chris",
	})
	if err != nil {
		slog.Error("Error creating client", "error", err)
		os.Exit(1)
	}

	if err != nil {
		slog.Error("Error creating client", "error", err)
		os.Exit(1)
	}

	env, err := client.PutAgentWithResponse(ctx, "test", sdk.PutAgentJSONRequestBody{
		Name:        sdk.BlString("test"),
		DisplayName: sdk.BlString("Test"),
	})
	if err != nil {
		slog.Error("Error updating agent", "error", err)
		os.Exit(1)
	}
	spew.Dump(&env.JSON200)
}

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
cli
Package sdk provides primitives to interact with the openapi HTTP API.
Package sdk provides primitives to interact with the openapi HTTP API.

Jump to

Keyboard shortcuts

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