This commit is contained in:
Star 2024-10-25 16:09:48 +08:00
commit d9818bab95
2 changed files with 39 additions and 0 deletions

31
apigo.yml Normal file
View File

@ -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:

8
main.js Normal file
View File

@ -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)
}