Documentation
¶
Index ¶
- func ChatRequestToAPI(in *llmproxy.ChatRequest) (*llmapi.ChatRequest, error)
- func ChatRequestToDomain(in *llmapi.ChatRequest) (*llmproxy.ChatRequest, error)
- func ChatResponseToAPI(in *llmproxy.ChatResponse) *llmapi.ChatResponse
- func ChatResponseToDomain(in *llmapi.ChatResponse) *llmproxy.ChatResponse
- func DeploymentMappingToDomain(in *engineapi.DeploymentMapping) engine.DeploymentMapping
- func ExternalResourcesToDomain(in *engineapi.ExternalResources) *engine.ExternalResources
- func FileUploadRequestToDomain(reader *multipart.Reader) (*llmproxy.FileUploadRequest, error)
- func FileUploadResponseToAPI(in *llmproxy.FileUploadResponse) *llmapi.FileUpload
- func InputToDomain(in llmapi.Input) (llmproxy.Input, error)
- func JSONTypeFor(dt workflow.DataType) string
- func OptionsToDomain(in *llmapi.Options) *llmproxy.Options
- func ProvidersToAPI(in []llmproxy.ProviderInfo) []llmapi.ProviderInfo
- func ProvidersToDomain(in []llmapi.ProviderInfo) []llmproxy.ProviderInfo
- func Slice[A any, B any](input []A, mappingFunc func(*A) B) []B
- func SliceErr[A any, B any](input []A, mappingFunc func(*A) (B, error)) ([]B, error)
- func StatusToAPI(running bool) engineapi.State
- func TickerInterval(value int, unit workflow.TickerNodeArgumentsIntervalUnit) time.Duration
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, routing each arm by its discriminator: MQTT connections into MQTTs, custom LLM provider configs into Providers. Unknown arms are skipped.
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 ¶
InputToDomain converts api Input to domain Input.
func JSONTypeFor ¶
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 ¶
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 SliceErr ¶
SliceErr maps a slice of type A to a slice of type B, allowing for error handling, passing pointers to mappingFunc
func StatusToAPI ¶
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.