ExLLM.Types (ex_llm v0.1.0)
View SourceShared type definitions used across ExLLM modules.
This module contains struct definitions and types that are used by multiple modules, helping to avoid circular dependencies.
Summary
Types
@type adapter_options() :: keyword()
@type cost_result() :: %{ provider: String.t(), model: String.t(), input_tokens: non_neg_integer(), output_tokens: non_neg_integer(), total_tokens: non_neg_integer(), input_cost: float(), output_cost: float(), total_cost: float(), currency: String.t(), pricing: %{input: float(), output: float()} }
@type message() :: %{ :role => String.t(), :content => String.t(), optional(:timestamp) => DateTime.t(), optional(atom()) => any() }
@type stream() :: Enumerable.t()
@type token_usage() :: %{ input_tokens: non_neg_integer(), output_tokens: non_neg_integer() }