...
This commit is contained in:
17
examples/ai/aiclient_embed.vsh
Executable file
17
examples/ai/aiclient_embed.vsh
Executable 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.chat_completion(
|
||||
message: 'Explain quantum computing in simple terms'
|
||||
)!
|
||||
|
||||
println(response)
|
||||
@@ -1,7 +1,9 @@
|
||||
|
||||
## to get started
|
||||
|
||||
make sure you have hero_secrets loaded
|
||||
This script is run from your own computer or a VM on which you develop.
|
||||
|
||||
Make sure you have hero_secrets loaded
|
||||
|
||||
```bash
|
||||
hero git pull https://git.threefold.info/despiegk/hero_secrets
|
||||
@@ -22,7 +24,12 @@ keys available:
|
||||
- kristof (ED25519 256)
|
||||
- maxime (ED25519 256)
|
||||
|
||||
## hetzner info
|
||||
you can select another key in the script
|
||||
|
||||
> still to do, support our example key which is installed using mysecrets.sh
|
||||
|
||||
|
||||
## hetzner troubleshoot info
|
||||
|
||||
get the login passwd from:
|
||||
|
||||
|
||||
Reference in New Issue
Block a user