From cc1ea6e3c8948627a42d199a0baaaff5a9cd5d45 Mon Sep 17 00:00:00 2001 From: ishaan-jaff Date: Mon, 23 Oct 2023 08:45:42 -0700 Subject: [PATCH] (docs) proxy server --- docs/my-website/docs/simple_proxy.md | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/docs/my-website/docs/simple_proxy.md b/docs/my-website/docs/simple_proxy.md index 8839e738a18..7fac284213d 100644 --- a/docs/my-website/docs/simple_proxy.md +++ b/docs/my-website/docs/simple_proxy.md @@ -25,12 +25,14 @@ $ uvicorn main:app --host 0.0.0.0 --port 8000 ## Replace openai base ```python import openai -openai.api_base = "http://0.0.0.0:8000" - +openai.api_base = "http://0.0.0.0:8000" # proxy url +openai.api_key = "does-not-matter" # call cohere -openai.api_key = "my-cohere-key" # this gets passed as a header - -response = openai.ChatCompletion.create(model="command-nightly", messages=[{"role":"user", "content":"Hey!"}]) +response = openai.ChatCompletion.create( + model="command-nightly", + messages=[{"role":"user", "content":"Hey!"}], + api_key="your-cohere-api-key", # enter your key here +) # call bedrock response = openai.ChatCompletion.create(