commit d9818bab953acfbe0abc518320d5e13526e57ec8 Author: Star Date: Fri Oct 25 16:09:48 2024 +0800 1 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) +}