Skip to content

Commit 2994995

Browse files
author
Carsten Behring
committed
football prompt
1 parent 3a1d839 commit 2994995

File tree

1 file changed

+17
-6
lines changed

1 file changed

+17
-6
lines changed

projects/ai/onnxgenai/src/generate.clj

Lines changed: 17 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,22 @@
22
(:import [ai.onnxruntime.genai SimpleGenAI]))
33

44
;; model is loaded by devcontaier setup
5-
(def gen-ai (SimpleGenAI. "/tmp/models/microsoft/Phi-3-mini-4k-instruct-onnx/cuda/cuda-fp16/"))
6-
(def gen-params (.createGeneratorParams gen-ai))
7-
(.generate gen-ai
8-
gen-params
9-
"What is onnxruntime-genai ?"
10-
^java.util.function.Consumer (fn [s] (print s)))
5+
;;onnx-community/gpt-oss-20b-ONNX
6+
(with-open [gen-ai
7+
(SimpleGenAI. "/tmp/models/microsoft/Phi-3-mini-4k-instruct-onnx/cuda/cuda-fp16/")
8+
;(SimpleGenAI. "/tmp/models/onnx-community/gpt-oss-20b-ONNX")
9+
10+
gen-params (.createGeneratorParams gen-ai)]
11+
(.generate gen-ai
12+
gen-params
13+
"Invent a hyphothetical season of Italian Serie A matches.
14+
Return in JSON format all matches of Serie A, with realistic outcomes.
15+
Each match should be in JSON, containing:
16+
1. both teams
17+
2. match result
18+
3. goals
19+
4. scorer and minutes of goals
20+
"
21+
^java.util.function.Consumer (fn [s] (print s))))
1122

1223

0 commit comments

Comments
 (0)