mirror of
https://github.com/open-webui/pipelines
synced 2025-06-23 02:05:38 +00:00
fix: litellm
This commit is contained in:
parent
17bc338c4a
commit
ecd7f8e5ad
@ -109,7 +109,7 @@ class Pipeline:
|
|||||||
headers["Authorization"] = f"Bearer {self.valves.LITELLM_API_KEY}"
|
headers["Authorization"] = f"Bearer {self.valves.LITELLM_API_KEY}"
|
||||||
|
|
||||||
try:
|
try:
|
||||||
payload = {**body, "model": model_id, "user_id": body["user"]["id"]}
|
payload = {**body, "model": model_id, "user": body["user"]["id"]}
|
||||||
payload.pop("chat_id", None)
|
payload.pop("chat_id", None)
|
||||||
payload.pop("user", None)
|
payload.pop("user", None)
|
||||||
payload.pop("title", None)
|
payload.pop("title", None)
|
||||||
|
@ -197,7 +197,7 @@ class Pipeline:
|
|||||||
try:
|
try:
|
||||||
r = requests.post(
|
r = requests.post(
|
||||||
url=f"http://{self.valves.LITELLM_PROXY_HOST}:{self.valves.LITELLM_PROXY_PORT}/v1/chat/completions",
|
url=f"http://{self.valves.LITELLM_PROXY_HOST}:{self.valves.LITELLM_PROXY_PORT}/v1/chat/completions",
|
||||||
json={**body, "model": model_id, "user_id": body["user"]["id"]},
|
json={**body, "model": model_id, "user": body["user"]["id"]},
|
||||||
stream=True,
|
stream=True,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user