UNPKG

@lobehub/chat

Version:

Lobe Chat - an open-source, high-performance chatbot framework that supports speech synthesis, multimodal, and extensible Function Call plugin system. Supports one-click free deployment of your private ChatGPT/LLM web application.

17 lines (12 loc) 303 B
import { parse } from 'partial-json'; import { stringify } from 'yaml'; export const useYamlArguments = (args?: string) => { if (!args) return ''; try { const obj = parse(args); if (Object.keys(obj).length === 0) return ''; return stringify(obj); } catch { return args; } };