mirror of
https://github.com/open-webui/pipelines
synced 2025-05-10 23:50:45 +00:00
fix: anthropic
This commit is contained in:
parent
c2f5200906
commit
0f516bd95e
@ -63,6 +63,13 @@ class Pipeline:
|
|||||||
self, user_message: str, model_id: str, messages: List[dict], body: dict
|
self, user_message: str, model_id: str, messages: List[dict], body: dict
|
||||||
) -> Union[str, Generator, Iterator]:
|
) -> Union[str, Generator, Iterator]:
|
||||||
try:
|
try:
|
||||||
|
if "user" in body:
|
||||||
|
del body["user"]
|
||||||
|
if "chat_id" in body:
|
||||||
|
del body["chat_id"]
|
||||||
|
if "title" in body:
|
||||||
|
del body["title"]
|
||||||
|
|
||||||
if body.get("stream", False):
|
if body.get("stream", False):
|
||||||
return self.stream_response(model_id, messages, body)
|
return self.stream_response(model_id, messages, body)
|
||||||
else:
|
else:
|
||||||
|
Loading…
Reference in New Issue
Block a user