This commit is contained in:
2025-11-22 11:58:46 +02:00
parent a080fa8330
commit 3d8effeac7
10 changed files with 111 additions and 103 deletions

17
examples/ai/aiclient.vsh Executable file
View File

@@ -0,0 +1,17 @@
#!/usr/bin/env -S v -n -w -gc none -cc tcc -d use_openssl -enable-globals run
import incubaid.herolib.ai.client
mut cl := client.new()!
// response := cl.llms.llm_local.chat_completion(
// message: 'Explain quantum computing in simple terms'
// temperature: 0.5
// max_completion_tokens: 1024
// )!
response := cl.llms.llm_embed_local.embed(input: [
'The food was delicious and the waiter..',
])!
println(response)

View File

@@ -1,7 +1,5 @@
#!/usr/bin/env -S v -n -w -gc none -cc tcc -d use_openssl -enable-globals run
module main
import incubaid.herolib.clients.openai
import os
import incubaid.herolib.core.playcmds
@@ -10,8 +8,8 @@ import incubaid.herolib.core.playcmds
playcmds.run(
heroscript: '
!!openai.configure name:"groq"
url:"https://api.groq.com/openai/v1"
!!openai.configure name:"groq"
url:"https://api.groq.com/openai/v1"
model_default:"openai/gpt-oss-120b"
'
reset: true