Skip to content

Commit

Permalink
Using a base url to connect to the proxy (#417)
Browse files Browse the repository at this point in the history
  • Loading branch information
Jucaski authored Sep 19, 2024
1 parent 237c687 commit 9a53e4a
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion apps/openai/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,13 @@
import hal9 as h9

messages = h9.load("messages", [])
client = OpenAI(
base_url="https://api.devel.hal9.com/proxy/server=https://api.openai.com/v1/",
api_key = "hal9"
)

completion = OpenAI().chat.completions.create(

completion = client.chat.completions.create(
model = "o1-preview",
messages = [
{"role": "user", "content": input()},
Expand Down

0 comments on commit 9a53e4a

Please sign in to comment.