authentication

package
v0.3.0-beta Latest Latest
Warning

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

Go to latest
Published: Jan 14, 2024 License: MIT Imports: 2 Imported by: 0

README

Authentication

Authentican related functions.

Documentation

Overview

Package authentication provides helpful authentication-related functions.

Index

Constants

View Source
const (
	AuthHeaderKey    = "Authorization"
	AuthHeaderPrefix = "Bearer "
	OrgHeaderKey     = "OpenAI-Organization"
)

Variables

This section is empty.

Functions

func APIKey

func APIKey() string

APIKey returns the API key set by calling SetAPIKey. It is required for this to be set.

func DefaultOrganizationID

func DefaultOrganizationID() string

DefaultOrganizationID returns the default organization ID set by SetDefaultOrganizationID. It is not required for this to be set.

func SetAPIKey

func SetAPIKey(key string) error

SetAPIKey sets the API user's API key for later retrieval with APIKey.

func SetDefaultOrganizationID

func SetDefaultOrganizationID(orgID string) error

Types

This section is empty.

Jump to

Keyboard shortcuts

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