From 0d9ddfd32f17e1e814b9058c4a8012420906ea79 Mon Sep 17 00:00:00 2001 From: Ishaan Jaff Date: Mon, 23 Oct 2023 12:31:47 -0700 Subject: [PATCH] Update README.md --- openai-proxy/README.md | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/openai-proxy/README.md b/openai-proxy/README.md index b243ada0a..027eb2bad 100644 --- a/openai-proxy/README.md +++ b/openai-proxy/README.md @@ -28,7 +28,19 @@ $ uvicorn main:app --host 0.0.0.0 --port 8000 - `/chat/completions` - chat completions endpoint to call 100+ LLMs - `/models` - available models on server -## replace openai base +## Making Requests to Proxy +### Curl +```shell +curl http://0.0.0.0:8000/v1/chat/completions \ + -H "Content-Type: application/json" \ + -d '{ + "model": "gpt-3.5-turbo", + "messages": [{"role": "user", "content": "Say this is a test!"}], + "temperature": 0.7 + }' +``` + +### replace openai base ```python import openai openai.api_base = "http://0.0.0.0:8000"