myst-client 0.1.3

A client library for the Myst network
Documentation
use async_openai::types::CreateChatCompletionRequest;
use serde::{Deserialize, Serialize};
use typed_builder::TypedBuilder;

use crate::transport::NodeId;

#[derive(TypedBuilder, Deserialize, Serialize, Debug)]
pub struct TextTask {
    /// ID of which node this task should be executed on.
    #[builder(default)]
    pub node_id: Option<NodeId>,

    pub request: CreateChatCompletionRequest,
}

#[derive(TypedBuilder, Serialize, Deserialize)]
pub struct TextTaskResult {
    /// ID of which node this task was executed on
    #[builder(default)]
    pub node_id: Option<NodeId>,
}