Skip to content

Commit 30ee3e6

Browse files
committed
LlamaStackClient()
1 parent f68f6c6 commit 30ee3e6

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

llm/llama-stack-client-completions-min.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,15 @@
11
#!/usr/bin/python3
22

3+
# Prerequisites:
4+
# export LLAMA_STACK_CLIENT_BASE_URL=http://localhost:8321
35
# export INFERENCE_MODEL=ollama/llama3.2:3b
46
# ollama run $INFERENCE_MODEL
57
# llama stack run starter
68

79
import os
810
from llama_stack_client import LlamaStackClient
911

10-
c = LlamaStackClient(base_url="http://localhost:8321")
12+
c = LlamaStackClient()
1113

1214
r = c.chat.completions.create(
1315
model=os.getenv("INFERENCE_MODEL", "ollama/llama3.2:3b"),

0 commit comments

Comments
 (0)