Jido.Chat.IngressResult (Jido Chat v1.0.0)

Copy Markdown View Source

Transport-agnostic typed inbound routing result.

Supports both request-based inputs (for example webhook HTTP requests) and event-based inputs (for example polling or gateway listeners).

Summary

Functions

Builds ingress result from serialized data.

Creates a typed ingress result.

Returns the Zoi schema for IngressResult.

Serializes ingress result into a plain map with type marker.

Types

mode()

@type mode() :: :request | :event

t()

@type t() :: %Jido.Chat.IngressResult{
  adapter_name: nil | nil | atom(),
  chat: any(),
  event: nil | nil | any(),
  metadata: map(),
  mode: :request | :event,
  request: nil | nil | any(),
  response: nil | nil | any()
}

Functions

from_map(map)

@spec from_map(map()) :: t()

Builds ingress result from serialized data.

new(attrs)

@spec new(map()) :: t()

Creates a typed ingress result.

schema()

Returns the Zoi schema for IngressResult.

to_map(result)

@spec to_map(t()) :: map()

Serializes ingress result into a plain map with type marker.