Skip to main content

hanzo_client/models/
engine_advertisement.rs

1/*
2 * Hanzo Cloud API
3 *
4 * The Hanzo Cloud API as a customer calls it: every operation under /v1/ except the operator's admin product, relay routes, legacy spellings and capabilities still reached by flag. Tagged by product: the first path segment after /v1/.
5 *
6 * The version of the OpenAPI document: v1
7 * 
8 * Generated by: https://openapi-generator.tech
9 */
10
11use crate::models;
12use serde::{Deserialize, Serialize};
13
14#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
15pub struct EngineAdvertisement {
16    /// APIs are the wire formats the engine serves on that one port: \"openai\", \"anthropic\", or both.
17    #[serde(rename = "apis", skip_serializing_if = "Option::is_none")]
18    pub apis: Option<Vec<String>>,
19    /// Models are the model ids the node's own GET /v1/models answered with — what this GPU can actually be asked for.
20    #[serde(rename = "models", skip_serializing_if = "Option::is_none")]
21    pub models: Option<Vec<String>>,
22    /// Status is \"ready\" when the node's engine answered, \"unreachable\" when it did not. Advertised is not the same as serving, and this is the difference.
23    #[serde(rename = "status", skip_serializing_if = "Option::is_none")]
24    pub status: Option<String>,
25    /// URL is the base address the node advertised its engine on — where a model call to this GPU is sent. The node chose it, so reaching it is a question about the node's network, not about this surface.
26    #[serde(rename = "url", skip_serializing_if = "Option::is_none")]
27    pub url: Option<String>,
28}
29
30impl EngineAdvertisement {
31    pub fn new() -> EngineAdvertisement {
32        EngineAdvertisement {
33            apis: None,
34            models: None,
35            status: None,
36            url: None,
37        }
38    }
39}
40