This commit is contained in:
Morad Moqbel 2026-09-30 23:52:12 -04:00 • committed by GitHub
commit 1f73362007
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 5 additions and 5 deletions

View file

@ -1 +1,2 @@
litellm==1.83.14
openai>=1.0.0

View file

@ -2,13 +2,12 @@ import openai
api_base = "http://0.0.0.0:8000"
openai.api_base = api_base
openai.api_key = "temp-key"
print(openai.api_base)
client = openai.OpenAI(base_url=api_base, api_key="temp-key")
print(client.base_url)
print("LiteLLM: response from proxy with streaming")
response = openai.ChatCompletion.create(
response = client.chat.completions.create(
model="ollama/llama2",
messages=[
{
@ -22,7 +21,7 @@ response = openai.ChatCompletion.create(
for chunk in response:
print(f"LiteLLM: streaming response from proxy {chunk}")
response = openai.ChatCompletion.create(
response = client.chat.completions.create(
model="ollama/llama2",
messages=[
{