executor

package
v1.0.34 Latest Latest
Warning

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

Go to latest
Published: Dec 25, 2025 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Options

type Options struct {
	Stream          bool
	Alt             string
	Headers         http.Header
	Query           url.Values
	OriginalRequest []byte
	SourceFormat    sdktranslator.Format
	Metadata        map[string]any
}

Options controls execution behavior for both streaming and non-streaming calls.

type Request

type Request struct {
	Model    string
	Payload  []byte
	Format   sdktranslator.Format
	Metadata map[string]any
}

Request encapsulates the translated payload that will be sent to a provider executor.

type Response

type Response struct {
	Payload  []byte
	Metadata map[string]any
}

Response wraps either a full provider response or metadata for streaming flows.

type StatusError

type StatusError interface {
	error
	StatusCode() int
}

StatusError represents an error that carries an HTTP-like status code. Provider executors should implement this when possible to enable better auth state updates on failures (e.g., 401/402/429).

type StreamChunk

type StreamChunk struct {
	Payload []byte
	Err     error
}

StreamChunk represents a single streaming payload unit emitted by provider executors.

Jump to

Keyboard shortcuts

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