mirror of
https://github.com/open-webui/open-webui
synced 2024-11-06 16:59:42 +00:00
fix: emoji generation
This commit is contained in:
parent
24e7ae8767
commit
424062d75f
@ -122,6 +122,7 @@ from open_webui.utils.task import (
|
|||||||
moa_response_generation_template,
|
moa_response_generation_template,
|
||||||
tags_generation_template,
|
tags_generation_template,
|
||||||
search_query_generation_template,
|
search_query_generation_template,
|
||||||
|
emoji_generation_template,
|
||||||
title_generation_template,
|
title_generation_template,
|
||||||
tools_function_calling_generation_template,
|
tools_function_calling_generation_template,
|
||||||
)
|
)
|
||||||
@ -1718,7 +1719,7 @@ Your task is to reflect the speaker's likely facial expression through a fitting
|
|||||||
|
|
||||||
Message: """{{prompt}}"""
|
Message: """{{prompt}}"""
|
||||||
'''
|
'''
|
||||||
content = title_generation_template(
|
content = emoji_generation_template(
|
||||||
template,
|
template,
|
||||||
form_data["prompt"],
|
form_data["prompt"],
|
||||||
{
|
{
|
||||||
|
@ -147,6 +147,22 @@ def tags_generation_template(
|
|||||||
return template
|
return template
|
||||||
|
|
||||||
|
|
||||||
|
def emoji_generation_template(
|
||||||
|
template: str, prompt: str, user: Optional[dict] = None
|
||||||
|
) -> str:
|
||||||
|
template = replace_prompt_variable(template, prompt)
|
||||||
|
template = prompt_template(
|
||||||
|
template,
|
||||||
|
**(
|
||||||
|
{"user_name": user.get("name"), "user_location": user.get("location")}
|
||||||
|
if user
|
||||||
|
else {}
|
||||||
|
),
|
||||||
|
)
|
||||||
|
|
||||||
|
return template
|
||||||
|
|
||||||
|
|
||||||
def search_query_generation_template(
|
def search_query_generation_template(
|
||||||
template: str, messages: list[dict], user: Optional[dict] = None
|
template: str, messages: list[dict], user: Optional[dict] = None
|
||||||
) -> str:
|
) -> str:
|
||||||
|
Loading…
Reference in New Issue
Block a user