Skip to content

Commit

Permalink
(docs) test proxy
Browse files Browse the repository at this point in the history
  • Loading branch information
ishaan-jaff committed Nov 17, 2023
1 parent 54b6a76 commit c162f8b
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions litellm/proxy/test_openai_request.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
import openai
client = openai.OpenAI(
api_key="anything",
base_url="http://0.0.0.0:8000"
)

# request sent to model set on litellm proxy, `litellm --model`
response = client.chat.completions.create(model="gpt-3.5-turbo", messages = [
{
"role": "user",
"content": "this is a test request, write a short poem"
}
])

print(response)

0 comments on commit c162f8b

Please sign in to comment.