constant

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Aug 23, 2026 License: MIT Imports: 2 Imported by: 0

README

relaymode

Relay mode constants and URL path-to-mode mapping functions.

Key Constants

RelayModeChatCompletions, RelayModeCompletions, RelayModeEmbeddings, RelayModeModerations, RelayModeImagesGenerations, RelayModeImagesEdits, RelayModeAudioSpeech, RelayModeAudioTranscription, RelayModeAudioTranslation, RelayModeRerank, RelayModeResponses, RelayModeRealtime, RelayModeGemini, plus Midjourney and Suno task modes.

Key Functions

  • Path2RelayMode -- maps an HTTP request path to a relay mode int (e.g. /v1/chat/completions -> RelayModeChatCompletions).
  • Path2RelayModeMidjourney -- maps Midjourney-specific paths to their relay modes.
  • Path2RelaySuno -- maps Suno-specific paths and methods to their relay modes.

Usage

mode := relaymode.Path2RelayMode("/v1/chat/completions")
// mode == relaymode.RelayModeChatCompletions

Documentation

Index

Constants

View Source
const (
	RelayModeUnknown = iota
	RelayModeChatCompletions
	RelayModeCompletions
	RelayModeEmbeddings
	RelayModeModerations
	RelayModeImagesGenerations
	RelayModeImagesEdits
	RelayModeEdits

	RelayModeMidjourneyImagine
	RelayModeMidjourneyDescribe
	RelayModeMidjourneyBlend
	RelayModeMidjourneyChange
	RelayModeMidjourneySimpleChange
	RelayModeMidjourneyNotify
	RelayModeMidjourneyTaskFetch
	RelayModeMidjourneyTaskImageSeed
	RelayModeMidjourneyTaskFetchByCondition
	RelayModeMidjourneyAction
	RelayModeMidjourneyModal
	RelayModeMidjourneyShorten
	RelayModeSwapFace
	RelayModeMidjourneyUpload
	RelayModeMidjourneyVideo
	RelayModeMidjourneyEdits

	RelayModeAudioSpeech        // tts
	RelayModeAudioTranscription // whisper
	RelayModeAudioTranslation   // whisper

	RelayModeSunoFetch
	RelayModeSunoFetchByID
	RelayModeSunoSubmit

	RelayModeVideoFetchByID
	RelayModeVideoSubmit

	RelayModeRerank

	RelayModeResponses

	RelayModeRealtime

	RelayModeGemini

	RelayModeResponsesCompact

	RelayModeAlphaSearch
)

Variables

This section is empty.

Functions

func Path2RelayMode

func Path2RelayMode(path string) int

func Path2RelayModeMidjourney

func Path2RelayModeMidjourney(path string) int

func Path2RelaySuno

func Path2RelaySuno(method, path string) int

Types

This section is empty.

Jump to

Keyboard shortcuts

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