Skip to main content

Crate yallm_ir

Crate yallm_ir 

Source
Expand description

yallm-ir: Intermediate Representation for unified LLM API conversion

This crate provides the Intermediate Representation (IR) for converting between different LLM API formats (OpenAI, Anthropic, Ollama).

Structs§

ChatRequest
Unified chat completion request
ChatResponse
Unified chat completion response
Choice
A single completion choice
ChoiceDelta
A single choice delta in streaming response
ImageContent
Image content block
Message
Unified message representation
StreamChunk
Unified streaming response chunk
TextContent
Text content block
TextDelta
Text content delta in streaming response
ToolCallContent
Tool call in assistant message
ToolCallDelta
Tool call delta in streaming response
ToolResultContent
Tool result in tool message
Usage
Token usage information

Enums§

Content
Content block types
DeltaContent
Delta content types
ImageSourceType
Image source type
Role
Message role in conversation
Source
Source API type