update llm router port value

This commit is contained in:
Adil Hafeez 2024-10-09 21:39:55 -07:00 committed by GitHub
parent c0f0c22fb4
commit d3ccddb72c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -109,12 +109,15 @@ Make outbound calls via Arch
import openai
# Set the OpenAI API base URL to the Arch gateway endpoint
openai.api_base = "http://127.0.0.1:51001/v1"
openai.api_base = "http://127.0.0.1:12000/"
# No need to set openai.api_key since it's configured in Arch's gateway
# Use the OpenAI client as usual
# we set api_key to '--' becasue openai client would fail to initiate request without it. Just pass any
# dummy value here since arch gateway will properly pass access key before making outbound call.
response = openai.Completion.create(
api_key="--",
model="text-davinci-003",
prompt="What is the capital of France?"
)