mapping

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: May 29, 2026 License: AGPL-3.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ChatRequestToAPI

func ChatRequestToAPI(in *llmproxy.ChatRequest) (*llmapi.ChatRequest, error)

ChatRequestToAPI converts an ChatRequest into the api shape. Used by the engine-side backend.Client to forward chat calls to fh-backend.

func ChatRequestToDomain

func ChatRequestToDomain(in *llmapi.ChatRequest) (*llmproxy.ChatRequest, error)

ChatRequestToDomain converts HTTP API request to domain request

func ChatResponseToAPI

func ChatResponseToAPI(in *llmproxy.ChatResponse) *llmapi.ChatResponse

ChatResponseToAPI converts domain response to HTTP API response

func ChatResponseToDomain

func ChatResponseToDomain(in *llmapi.ChatResponse) *llmproxy.ChatResponse

ChatResponseToDomain converts a api ChatResponse back to llmproxy form.

func DeploymentMappingToDomain

func DeploymentMappingToDomain(in *engineapi.DeploymentMapping) engine.DeploymentMapping

DeploymentMappingToDomain maps the wire DeploymentMapping (workflow resource id -> binding) onto the engine domain type at the HTTP boundary.

func ExternalResourcesToDomain

func ExternalResourcesToDomain(in *engineapi.ExternalResources) *engine.ExternalResources

ExternalResourcesToDomain maps the wire ExternalResources (a keyed union of deploy-time configs) onto the engine domain type at the HTTP boundary. Only the MQTT arms are consumed today; provider arms (custom models) are skipped until the engine builds providers from them.

func FileUploadRequestToDomain

func FileUploadRequestToDomain(reader *multipart.Reader) (*llmproxy.FileUploadRequest, error)

FileUploadRequestToDomain maps multipart.Reader to FileUploadRequest The caller is responsible for closing the File field.

func FileUploadResponseToAPI

func FileUploadResponseToAPI(in *llmproxy.FileUploadResponse) *llmapi.FileUpload

FileUploadResponseToAPI converts domain file response to HTTP API file response

func InputToDomain

func InputToDomain(in llmapi.Input) (llmproxy.Input, error)

InputToDomain converts api Input to domain Input.

func JSONTypeFor

func JSONTypeFor(dt workflow.DataType) string

JSONTypeFor maps a workflow data type to its JSON Schema type name. Shared by nodes that build runtime schemas (Agent response format, FunctionCall tool parameters).

func OptionsToDomain

func OptionsToDomain(in *llmapi.Options) *llmproxy.Options

OptionsToDomain converts API options to core options.

func ProvidersToAPI

func ProvidersToAPI(in []llmproxy.ProviderInfo) []llmapi.ProviderInfo

ProvidersToAPI converts provider info to its API representation.

func ProvidersToDomain

func ProvidersToDomain(in []llmapi.ProviderInfo) []llmproxy.ProviderInfo

ProvidersToDomain converts a list of api ProviderInfo back to llmproxy form.

func Slice

func Slice[A any, B any](input []A, mappingFunc func(*A) B) []B

Slice maps a slice of type A to a slice of type B, passing pointers to mappingFunc

func SliceErr

func SliceErr[A any, B any](input []A, mappingFunc func(*A) (B, error)) ([]B, error)

SliceErr maps a slice of type A to a slice of type B, allowing for error handling, passing pointers to mappingFunc

func StatusToAPI

func StatusToAPI(running bool) engineapi.State

StatusToAPI maps the engine domain Status onto the wire State enum.

func TickerInterval

func TickerInterval(value int, unit workflow.TickerNodeArgumentsIntervalUnit) time.Duration

TickerInterval converts a wire ticker (value + unit) into a runtime duration.

Types

This section is empty.

Jump to

Keyboard shortcuts

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