From d9818bab953acfbe0abc518320d5e13526e57ec8 Mon Sep 17 00:00:00 2001 From: Star Date: Fri, 25 Oct 2024 16:09:48 +0800 Subject: [PATCH] 1 --- apigo.yml | 31 +++++++++++++++++++++++++++++++ main.js | 8 ++++++++ 2 files changed, 39 insertions(+) create mode 100644 apigo.yml create mode 100644 main.js diff --git a/apigo.yml b/apigo.yml new file mode 100644 index 0000000..a7e6774 --- /dev/null +++ b/apigo.yml @@ -0,0 +1,31 @@ +name: +version: v0.0.1 +main: main.js +target: + darwin: amd64 arm64 + linux: amd64 arm64 + windows: amd64 +module: + apigo.cc/gojs/console: latest + apigo.cc/gojs/util: latest + apigo.cc/gojs/log: latest + apigo.cc/gojs/file: latest + apigo.cc/gojs/http: latest + apigo.cc/gojs/db: latest + apigo.cc/ai/llm: latest +modulealias: +extraimport: + apigo.cc/ai/openai: latest + apigo.cc/ai/zhipu: latest +cachefile: +sskey: +cgoenable: false +buildfrom: golang +buildenv: + linux: + darwin: + windows: +buildldflags: + linux: + darwin: + windows: diff --git a/main.js b/main.js new file mode 100644 index 0000000..e414346 --- /dev/null +++ b/main.js @@ -0,0 +1,8 @@ +import { zhipu } from 'ai/llm' +import console from 'console' + +// need llm.yml or env.yml to config llm api key, see https://apigo.cc/ai/llm +function main() { + let r = zhipu.fastAsk('hi', console.print) + console.info(r) +}