GenAI.Message (GenAI Core v0.2.0)
GenAI.Message is now a unified message structure. It's contents may include tool calls, results, images, audio, text blurbs, etc.
Depending on compatibility with providers a universal GenAI.Message may need to be converted into a sequence of messages or altered in other ways. A message with tool calls for example would need to be converted into a tool call format for openai
Link to this section Summary
Functions
Callback implementation for GenAI.Graph.NodeBehaviour.description/1
.
Callback implementation for GenAI.Graph.NodeBehaviour.description/2
.
Callback implementation for GenAI.Graph.NodeBehaviour.handle/1
.
Callback implementation for GenAI.Graph.NodeBehaviour.handle/2
.
Callback implementation for GenAI.Graph.NodeBehaviour.id/1
.
Load image resource.
Callback implementation for GenAI.Graph.NodeBehaviour.name/1
.
Callback implementation for GenAI.Graph.NodeBehaviour.name/2
.
Callback implementation for GenAI.Graph.NodeBehaviour.new/1
.
Link to this section Types
@type t() :: %GenAI.Message{ content: term(), description: GenAI.Types.description(), finger_print: GenAI.Types.finger_print(), handle: GenAI.Types.node_handle(), id: GenAI.Types.node_id(), inbound_links: GenAI.Types.link_map(), meta: nil | map() | keyword(), name: GenAI.Types.name(), outbound_links: GenAI.Types.link_map(), role: term(), user: nil, vsn: float() }
Link to this section Functions
apply_node_directives(this, graph_link, graph_container, session, context, options)
assistant(message, options \\ nil)
description(graph)
Callback implementation for GenAI.Graph.NodeBehaviour.description/1
.
description(graph, default)
Callback implementation for GenAI.Graph.NodeBehaviour.description/2
.
handle(graph)
Callback implementation for GenAI.Graph.NodeBehaviour.handle/1
.
handle(graph, default)
Callback implementation for GenAI.Graph.NodeBehaviour.handle/2
.
id(graph)
Callback implementation for GenAI.Graph.NodeBehaviour.id/1
.
image(resource, options \\ nil)
Load image resource.
inspect_custom_details(subject, opts)
See GenAI.Graph.NodeProtocol.DefaultProvider.inspect_custom_details/2
.
inspect_full_detail(subject, opts)
See GenAI.Graph.NodeProtocol.DefaultProvider.inspect_full_detail/2
.
inspect_high_detail(subject, opts)
See GenAI.Graph.NodeProtocol.DefaultProvider.inspect_high_detail/2
.
inspect_low_detail(subject, opts)
See GenAI.Graph.NodeProtocol.DefaultProvider.inspect_low_detail/2
.
inspect_medium_detail(subject, opts)
See GenAI.Graph.NodeProtocol.DefaultProvider.inspect_medium_detail/2
.
message(role, message, options \\ nil)
name(graph)
Callback implementation for GenAI.Graph.NodeBehaviour.name/1
.
name(graph, default)
Callback implementation for GenAI.Graph.NodeBehaviour.name/2
.
new(options \\ nil)
Callback implementation for GenAI.Graph.NodeBehaviour.new/1
.