Skip to main content
Module

x/simsimi/mod.ts

SimSimi API for Deno
Latest
File
import axiod from "https://deno.land/x/axiod/mod.ts";
export default async function simsimi(key: string, message: string, language: string): Promise<any> { try { const res = await axiod({ method: "post", url: "https://wsapi.simsimi.com/190410/talk", data: { utext: message, lang: language, }, headers: { "Content-Type": "application/json", "x-api-key": key, }, });
return { statusCode: res.status, message: res.data.atext, }; } catch (error) { throw new Error(error); }}