Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
chenpangpang
open-webui
Commits
ff474936
Commit
ff474936
authored
Jul 09, 2024
by
Michael Poluektov
Browse files
refac: remove model param
parent
d7dd901f
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
4 deletions
+2
-4
backend/main.py
backend/main.py
+2
-4
No files found.
backend/main.py
View file @
ff474936
...
@@ -289,7 +289,6 @@ async def get_function_call_response(
...
@@ -289,7 +289,6 @@ async def get_function_call_response(
template
,
template
,
task_model_id
,
task_model_id
,
user
,
user
,
model
,
__event_emitter__
=
None
,
__event_emitter__
=
None
,
__event_call__
=
None
,
__event_call__
=
None
,
):
):
...
@@ -525,7 +524,7 @@ async def chat_completion_functions_handler(
...
@@ -525,7 +524,7 @@ async def chat_completion_functions_handler(
async
def
chat_completion_tools_handler
(
async
def
chat_completion_tools_handler
(
body
,
model
,
user
,
__event_emitter__
,
__event_call__
body
,
user
,
__event_emitter__
,
__event_call__
):
):
skip_files
=
None
skip_files
=
None
...
@@ -547,7 +546,6 @@ async def chat_completion_tools_handler(
...
@@ -547,7 +546,6 @@ async def chat_completion_tools_handler(
template
=
app
.
state
.
config
.
TOOLS_FUNCTION_CALLING_PROMPT_TEMPLATE
,
template
=
app
.
state
.
config
.
TOOLS_FUNCTION_CALLING_PROMPT_TEMPLATE
,
task_model_id
=
task_model_id
,
task_model_id
=
task_model_id
,
user
=
user
,
user
=
user
,
model
=
model
,
__event_emitter__
=
__event_emitter__
,
__event_emitter__
=
__event_emitter__
,
__event_call__
=
__event_call__
,
__event_call__
=
__event_call__
,
)
)
...
@@ -674,7 +672,7 @@ class ChatCompletionMiddleware(BaseHTTPMiddleware):
...
@@ -674,7 +672,7 @@ class ChatCompletionMiddleware(BaseHTTPMiddleware):
try
:
try
:
body
,
flags
=
await
chat_completion_tools_handler
(
body
,
flags
=
await
chat_completion_tools_handler
(
body
,
model
,
user
,
__event_emitter__
,
__event_call__
body
,
user
,
__event_emitter__
,
__event_call__
)
)
contexts
.
extend
(
flags
.
get
(
"contexts"
,
[]))
contexts
.
extend
(
flags
.
get
(
"contexts"
,
[]))
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment