mirror of
https://github.com/BerriAI/litellm.git
synced 2026-10-07 02:59:05 +00:00
Merge eba599420f into 321be01877
This commit is contained in:
commit
1f73362007
2 changed files with 5 additions and 5 deletions
|
|
@ -1 +1,2 @@
|
|||
litellm==1.83.14
|
||||
openai>=1.0.0
|
||||
|
|
|
|||
|
|
@ -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=[
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue