volcengine

package
v1.5.5 Latest Latest
Warning

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

Go to latest
Published: Apr 28, 2026 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Overview

Package providers implements various LLM providers and their utility functions. This file contains the Volcengine provider implementation.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type VolcengineProvider

type VolcengineProvider struct {
	// contains filtered or unexported fields
}

VolcengineProvider implements the Provider interface for Volcengine's API.

func NewModelArkProvider

func NewModelArkProvider(config *schemas.ProviderConfig, logger schemas.Logger) (*VolcengineProvider, error)

NewModelArkProvider creates a new ModelArk provider instance. ModelArk uses the BytePlus-hosted international ARK endpoint but otherwise shares Volcengine behavior.

func NewVolcengineProvider

func NewVolcengineProvider(config *schemas.ProviderConfig, logger schemas.Logger) (*VolcengineProvider, error)

NewVolcengineProvider creates a new Volcengine provider instance. It initializes the HTTP client with the provided configuration and sets up response pools. The client is configured with timeouts, concurrency limits, and optional proxy settings.

func (*VolcengineProvider) BatchCancel

BatchCancel is not supported by Volcengine provider.

func (*VolcengineProvider) BatchCreate

BatchCreate is not supported by Volcengine provider.

func (*VolcengineProvider) BatchDelete

BatchDelete is not supported by Volcengine provider.

func (*VolcengineProvider) BatchList

BatchList is not supported by Volcengine provider.

func (*VolcengineProvider) BatchResults

BatchResults is not supported by Volcengine provider.

func (*VolcengineProvider) BatchRetrieve

BatchRetrieve is not supported by Volcengine provider.

func (*VolcengineProvider) ChatCompletion

ChatCompletion performs a chat completion request to the Volcengine API.

func (*VolcengineProvider) ChatCompletionStream

func (provider *VolcengineProvider) ChatCompletionStream(ctx *schemas.BifrostContext, postHookRunner schemas.PostHookRunner, postHookSpanFinalizer func(context.Context), key schemas.Key, request *schemas.BifrostChatRequest) (chan *schemas.BifrostStreamChunk, *schemas.BifrostError)

ChatCompletionStream performs a streaming chat completion request to the Volcengine API. It supports real-time streaming of responses using Server-Sent Events (SSE). Uses Volcengine's OpenAI-compatible streaming format. Returns a channel containing BifrostStreamChunk objects representing the stream or an error if the request fails.

func (*VolcengineProvider) ContainerCreate

ContainerCreate is not supported by the Volcengine provider.

func (*VolcengineProvider) ContainerDelete

ContainerDelete is not supported by the Volcengine provider.

func (*VolcengineProvider) ContainerFileContent

ContainerFileContent is not supported by the Volcengine provider.

func (*VolcengineProvider) ContainerFileCreate

ContainerFileCreate is not supported by the Volcengine provider.

func (*VolcengineProvider) ContainerFileDelete

ContainerFileDelete is not supported by the Volcengine provider.

func (*VolcengineProvider) ContainerFileList

ContainerFileList is not supported by the Volcengine provider.

func (*VolcengineProvider) ContainerFileRetrieve

ContainerFileRetrieve is not supported by the Volcengine provider.

func (*VolcengineProvider) ContainerList

ContainerList is not supported by the Volcengine provider.

func (*VolcengineProvider) ContainerRetrieve

ContainerRetrieve is not supported by the Volcengine provider.

func (*VolcengineProvider) CountTokens

CountTokens is not supported by the Volcengine provider.

func (*VolcengineProvider) Embedding

func (*VolcengineProvider) FileContent

func (*VolcengineProvider) FileDelete

func (*VolcengineProvider) FileList

func (*VolcengineProvider) FileRetrieve

func (*VolcengineProvider) GetProviderKey

func (provider *VolcengineProvider) GetProviderKey() schemas.ModelProvider

GetProviderKey returns the provider identifier for Volcengine.

func (*VolcengineProvider) ImageEdit

ImageEdit is not supported by the Volcengine provider.

func (*VolcengineProvider) ImageEditStream

func (provider *VolcengineProvider) ImageEditStream(ctx *schemas.BifrostContext, postHookRunner schemas.PostHookRunner, postHookSpanFinalizer func(context.Context), key schemas.Key, request *schemas.BifrostImageEditRequest) (chan *schemas.BifrostStreamChunk, *schemas.BifrostError)

ImageEditStream is not supported by the Volcengine provider.

func (*VolcengineProvider) ImageGenerationStream

func (provider *VolcengineProvider) ImageGenerationStream(ctx *schemas.BifrostContext, postHookRunner schemas.PostHookRunner, postHookSpanFinalizer func(context.Context), key schemas.Key, request *schemas.BifrostImageGenerationRequest) (chan *schemas.BifrostStreamChunk, *schemas.BifrostError)

ImageGenerationStream is not supported by the Volcengine provider.

func (*VolcengineProvider) ImageVariation

ImageVariation is not supported by the Volcengine provider.

func (*VolcengineProvider) ListModels

ListModels performs a list models request to Volcengine's API.

func (*VolcengineProvider) OCR added in v1.4.20

OCR is not supported by the Volcengine provider.

func (*VolcengineProvider) Passthrough

Passthrough is not supported by the Volcengine provider.

func (*VolcengineProvider) PassthroughStream

PassthroughStream is not supported by the Volcengine provider.

func (*VolcengineProvider) Rerank

Rerank is not supported by the Volcengine provider.

func (*VolcengineProvider) Responses

Responses performs a responses request to the Volcengine API.

func (*VolcengineProvider) ResponsesStream

func (provider *VolcengineProvider) ResponsesStream(ctx *schemas.BifrostContext, postHookRunner schemas.PostHookRunner, postHookSpanFinalizer func(context.Context), key schemas.Key, request *schemas.BifrostResponsesRequest) (chan *schemas.BifrostStreamChunk, *schemas.BifrostError)

ResponsesStream performs a streaming responses request to the Volcengine API.

func (*VolcengineProvider) Speech

Speech is not supported by the Volcengine provider.

func (*VolcengineProvider) SpeechStream

func (provider *VolcengineProvider) SpeechStream(ctx *schemas.BifrostContext, postHookRunner schemas.PostHookRunner, postHookSpanFinalizer func(context.Context), key schemas.Key, request *schemas.BifrostSpeechRequest) (chan *schemas.BifrostStreamChunk, *schemas.BifrostError)

SpeechStream is not supported by the Volcengine provider.

func (*VolcengineProvider) TextCompletion

TextCompletion performs a text completion request to the Volcengine API.

func (*VolcengineProvider) TextCompletionStream

func (provider *VolcengineProvider) TextCompletionStream(ctx *schemas.BifrostContext, postHookRunner schemas.PostHookRunner, postHookSpanFinalizer func(context.Context), key schemas.Key, request *schemas.BifrostTextCompletionRequest) (chan *schemas.BifrostStreamChunk, *schemas.BifrostError)

TextCompletionStream performs a streaming text completion request to Volcengine's API. It formats the request, sends it to Volcengine, and processes the response. Returns a channel of BifrostStreamChunk objects or an error if the request fails.

func (*VolcengineProvider) Transcription

Transcription is not supported by the Volcengine provider.

func (*VolcengineProvider) TranscriptionStream

func (provider *VolcengineProvider) TranscriptionStream(ctx *schemas.BifrostContext, postHookRunner schemas.PostHookRunner, postHookSpanFinalizer func(context.Context), key schemas.Key, request *schemas.BifrostTranscriptionRequest) (chan *schemas.BifrostStreamChunk, *schemas.BifrostError)

TranscriptionStream is not supported by the Volcengine provider.

func (*VolcengineProvider) VideoList

func (*VolcengineProvider) VideoRemix

VideoRemix is not supported by Volcengine provider.

Jump to

Keyboard shortcuts

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