Skip to content

Commit 79ddf16

Browse files
committed
client-openai-responses.py
1 parent 551ddb9 commit 79ddf16

1 file changed

Lines changed: 13 additions & 0 deletions

File tree

llm/client-openai-responses.py

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
#!/usr/bin/python3
2+
3+
import os
4+
from openai import OpenAI
5+
6+
c = OpenAI(base_url="http://localhost:8321/v1/", api_key="none")
7+
8+
resp = c.responses.create(
9+
model=os.getenv("INFERENCE_MODEL", "ollama/llama3.2:3b"),
10+
input="Hi",
11+
)
12+
13+
print(resp.output[-1].content[-1].text)

0 commit comments

Comments
 (0)