File tree Expand file tree Collapse file tree 1 file changed +17
-6
lines changed
projects/ai/onnxgenai/src Expand file tree Collapse file tree 1 file changed +17
-6
lines changed Original file line number Diff line number Diff line change 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
You can’t perform that action at this time.
0 commit comments