Skip to content

Commit f68f6c6

Browse files
committed
OPENAI_BASE_URL
1 parent 651f795 commit f68f6c6

2 files changed

Lines changed: 8 additions & 2 deletions

File tree

llm/client-openai-vector_stores-completions.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,16 @@
77
llama stack run starter
88
"""
99

10+
# Prerequisite:
11+
# export OPENAI_BASE_URL=$LLAMA_STACK_CLIENT_BASE_URL/v1
12+
1013
import io
1114
import os
1215

1316
import requests
1417
from openai import OpenAI
1518

16-
c = OpenAI(base_url="http://localhost:8321/v1/", api_key="none")
19+
c = OpenAI()
1720

1821
vs = c.vector_stores.create()
1922
buf = io.BytesIO(str("abc is green").encode('utf-8'))

llm/client-openai-vector_stores-responses.py

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

3+
# Prerequisite:
4+
# export OPENAI_BASE_URL=$LLAMA_STACK_CLIENT_BASE_URL/v1
5+
36
# ./llama-stack/docs/docs/getting_started/demo_script.py
47

58
import io, os, requests
69
from openai import OpenAI
710

8-
c = OpenAI(base_url="http://localhost:8321/v1/", api_key="none")
11+
c = OpenAI()
912

1013
vs = c.vector_stores.create()
1114
buf = io.BytesIO(str("abc is green").encode('utf-8'))

0 commit comments

Comments
 (0)