use crate::{codec::Dict, value::Value};
pub const STATUS_HELLO: &str = "HELLO";
pub const STATUS_READY: &str = "READY";
wire_struct! {
#[derive(Debug, Clone, PartialEq, Eq)]
pub struct ReadyMessage: map + Default {
pub status: Option<String> = None,
pub local: Option<bool> = None,
pub headless: Option<bool> = None,
pub parallel_config_hash: Option<String> = None,
}
}
wire_struct! {
#[derive(Debug, Clone, PartialEq, Eq)]
pub struct HandshakeAddresses: map + Default {
pub inputs: Vec<String> = Vec::new(),
pub outputs: Vec<String> = Vec::new(),
pub coordinator_input: Option<String> = None,
pub coordinator_output: Option<String> = None,
pub frontend_stats_publish_address: Option<String> = None,
}
}
wire_struct! {
#[derive(Debug, Clone, PartialEq)]
pub struct HandshakeInitMessage: map {
pub addresses: HandshakeAddresses,
pub parallel_config: Dict<Value, Value> = Dict::default(),
}
}
wire_struct! {
#[derive(Debug, Clone, PartialEq)]
pub struct EngineCoreReadyResponse: map + Default {
pub max_model_len: i64 = 0,
pub num_gpu_blocks: i64 = 0,
pub prefix_granularity: i64 = 0,
pub dp_stats_address: Option<String> = None,
pub dtype: String = "bfloat16".to_owned(),
pub multimodal_encoder_dtype: Option<String> = None,
pub vllm_version: String = String::new(),
pub world_size: i64 = 1,
pub data_parallel_size: i64 = 1,
pub tensor_parallel_size: i64 = 1,
pub pipeline_parallel_size: i64 = 1,
pub decode_context_parallel_size: i64 = 1,
pub data_parallel_rank: i64 = 0,
pub max_num_seqs: i64 = 0,
pub max_num_batched_tokens: i64 = 0,
pub instance_id: String = String::new(),
pub kv_cache_size_tokens: Option<i64> = None,
pub kv_cache_max_concurrency: Option<f64> = None,
pub kv_events_config: Option<Dict<Value, Value>> = None,
}
}