AI.Util (fnord v0.8.24)
View SourceSummary
Functions
Creates an assistant message object, representing the assistant's response.
This is the tool call message, which must come immediately before the
tool_msg/3
message with the same tool_call_id
(id
).
Builds a "transcript" of the research process by converting the messages into text. This is most commonly used to generate a transcript of the research performed in a conversation for various agents and tool calls.
Creates a system message object, used to define the assistant's behavior for the conversation.
This is the tool outputs message, which must come immediately after the
assistant_tool_msg/3
message with the same tool_call_id
(id
).
Creates a user message object, representing the user's input prompt.
Extracts the user's most recent query from the conversation messages.
Types
@type msg() :: content_msg() | tool_request_msg() | tool_response_msg()
@type tool_request_msg() :: %{ role: binary(), content: nil, tool_calls: [tool_call_parsed()] }
Functions
@spec assistant_msg(binary()) :: content_msg()
Creates an assistant message object, representing the assistant's response.
@spec assistant_tool_msg(binary(), binary(), binary()) :: tool_request_msg()
This is the tool call message, which must come immediately before the
tool_msg/3
message with the same tool_call_id
(id
).
Builds a "transcript" of the research process by converting the messages into text. This is most commonly used to generate a transcript of the research performed in a conversation for various agents and tool calls.
@spec system_msg(binary()) :: content_msg()
Creates a system message object, used to define the assistant's behavior for the conversation.
@spec tool_msg(binary(), binary(), any()) :: tool_response_msg()
This is the tool outputs message, which must come immediately after the
assistant_tool_msg/3
message with the same tool_call_id
(id
).
@spec user_msg(binary()) :: content_msg()
Creates a user message object, representing the user's input prompt.
Extracts the user's most recent query from the conversation messages.