// AUTO-GENERATED — do not edit by hand
// Upstream: https://github.com/n8n-io/n8n/blob/master/packages/@n8n/nodes-langchain/nodes/llms/LMLemonade/LmLemonade.node.ts
// To implement: copy to ../impl/lmlemonade.rs, fill in execute(), add to ../impl/mod.rs
// r8r: rust port of n8n.io
// License: Unlicense

use async_trait::async_trait;
use crate::core::error::NodeError;
use crate::core::types::*;
use crate::engine::{ExecuteCtx, Node, NodeFactory};
use std::sync::Arc;

pub struct LmlemonadeNode;

static META: NodeMetadata = NodeMetadata {
    name: "lmlemonade",
    display_name: "Lemonade Model",
    version: &[1],
    group: &["transform"],
    description: "Language Model Lemonade",
    inputs: 1,
    outputs: 1,
    properties: &[],
    credentials: &[],
};

#[async_trait]
impl Node for LmlemonadeNode {
    fn metadata(&self) -> &'static NodeMetadata { &META }

    async fn execute(&self, _ctx: &mut ExecuteCtx<'_>) -> Result<NodeOutput, NodeError> {
    static ROUTING: crate::engine::routing::RoutingDescriptor =
        crate::engine::routing::RoutingDescriptor {
            base_url: "={{ $credentials.baseUrl.replace(new RegExp(",
            credential: None,
            auth_headers: &[],
            auth_query: &[],
            dispatch_param: "operation",
            operations: &[],
            sends: &[
                crate::engine::routing::SendDescriptor {
                    param_name: "model", send_type: "body", dest_key: "model",
                    operations: &[], resources: &[],
                }
            ],
        };
    crate::engine::routing::execute_routing(&ROUTING, _ctx).await
    }
}

inventory::submit! { NodeFactory::new("lmlemonade", || Arc::new(LmlemonadeNode)) }
