mirror of
https://github.com/open-webui/open-webui
synced 2024-11-22 08:07:55 +00:00
enh: __metadata__ param for tools & functions
Co-Authored-By: DmitriyAlergant-T1A <93501479+dmitriyalergant-t1a@users.noreply.github.com>
This commit is contained in:
parent
7da29b6798
commit
e3485d2d88
@ -406,6 +406,7 @@ async def generate_function_chat_completion(form_data, user, models: dict = {}):
|
||||
"name": user.name,
|
||||
"role": user.role,
|
||||
},
|
||||
"__metadata__": metadata,
|
||||
}
|
||||
extra_params["__tools__"] = get_tools(
|
||||
app,
|
||||
|
@ -604,6 +604,7 @@ class ChatCompletionMiddleware(BaseHTTPMiddleware):
|
||||
"name": user.name,
|
||||
"role": user.role,
|
||||
},
|
||||
"__metadata__": metadata,
|
||||
}
|
||||
|
||||
# Initialize data_items to store additional data to be sent to the client
|
||||
|
Loading…
Reference in New Issue
Block a user