Skip to main content

Module convert

Module convert 

Source
Expand description

Pure functions for converting between tirea and genai types.

Functionsยง

apply_prompt_cache_hints
Apply prompt cache hints to a chat request.
assistant_message
Create an assistant message (convenience function).
assistant_tool_calls
Create an assistant message with tool calls (convenience function).
build_request
Build a genai ChatRequest from messages and tools.
to_chat_message
Convert a Message to a genai ChatMessage.
to_genai_tool
Convert a ToolDescriptor to a genai Tool.
tool_response
Create a tool response message from ToolResult.
user_message
Create a user message (convenience function).