ark

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Feb 2, 2026 License: MIT Imports: 8 Imported by: 0

Documentation

Overview

Package ark provides the Volcengine Ark (Doubao) adapter for flowengine.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Adapter

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

Adapter implements flowengine.Adapter, flowengine.SessionAdapter, and flowengine.ToolAdapter for Volcengine Ark (Doubao).

func New

func New(client *arkruntime.Client, opts ...Option) *Adapter

New creates a new Ark Adapter.

func (*Adapter) Call

func (a *Adapter) Call(ctx context.Context, system, user string) (string, error)

Call implements flowengine.Adapter.Call.

func (*Adapter) CallWithSession

func (a *Adapter) CallWithSession(ctx context.Context, system, user, previousResponseID string) (string, string, error)

CallWithSession implements flowengine.SessionAdapter.CallWithSession.

func (*Adapter) CallWithTools

func (a *Adapter) CallWithTools(ctx context.Context, system, user string, tools []flowengine.ToolDef) (*flowengine.ToolCall, error)

CallWithTools implements flowengine.ToolAdapter.CallWithTools.

func (*Adapter) CallWithToolsAndSession

func (a *Adapter) CallWithToolsAndSession(ctx context.Context, system, user, previousResponseID string, tools []flowengine.ToolDef) (*flowengine.ToolCall, string, error)

CallWithToolsAndSession implements flowengine.ToolAdapter.CallWithToolsAndSession.

func (*Adapter) CreateCachePrefix

func (a *Adapter) CreateCachePrefix(ctx context.Context, system string, tools []flowengine.ToolDef) (string, error)

CreateCachePrefix creates a cached prefix with tools. Returns the response ID to use as previousResponseID.

func (*Adapter) DeleteSession

func (a *Adapter) DeleteSession(ctx context.Context, responseID string) error

DeleteSession implements flowengine.SessionAdapter.DeleteSession.

func (*Adapter) Stream

func (a *Adapter) Stream(ctx context.Context, system, user string) (<-chan string, error)

Stream implements flowengine.Adapter.Stream.

type Option

type Option func(*Adapter)

Option configures Adapter.

func WithModel

func WithModel(model string) Option

WithModel sets the model endpoint.

func WithThinking

func WithThinking() Option

WithThinking enables thinking/reasoning mode.

Jump to

Keyboard shortcuts

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