mirror of
https://github.com/langgenius/dify.git
synced 2024-11-16 03:32:23 +08:00
Merge remote-tracking branch 'origin'
This commit is contained in:
commit
6c010e90e5
|
@ -173,18 +173,21 @@ class ChatConversationApi(Resource):
|
|||
|
||||
if args["keyword"]:
|
||||
keyword_filter = "%{}%".format(args["keyword"])
|
||||
message_subquery = (
|
||||
db.session.query(Message.conversation_id)
|
||||
.filter(or_(Message.query.ilike(keyword_filter), Message.answer.ilike(keyword_filter)))
|
||||
.subquery()
|
||||
)
|
||||
query = query.join(subquery, subquery.c.conversation_id == Conversation.id).filter(
|
||||
or_(
|
||||
Conversation.id.in_(message_subquery),
|
||||
Conversation.name.ilike(keyword_filter),
|
||||
Conversation.introduction.ilike(keyword_filter),
|
||||
subquery.c.from_end_user_session_id.ilike(keyword_filter),
|
||||
),
|
||||
query = (
|
||||
query.join(
|
||||
Message,
|
||||
Message.conversation_id == Conversation.id,
|
||||
)
|
||||
.join(subquery, subquery.c.conversation_id == Conversation.id)
|
||||
.filter(
|
||||
or_(
|
||||
Message.query.ilike(keyword_filter),
|
||||
Message.answer.ilike(keyword_filter),
|
||||
Conversation.name.ilike(keyword_filter),
|
||||
Conversation.introduction.ilike(keyword_filter),
|
||||
subquery.c.from_end_user_session_id.ilike(keyword_filter),
|
||||
),
|
||||
)
|
||||
)
|
||||
|
||||
account = current_user
|
||||
|
|
|
@ -65,7 +65,7 @@ class Extensible:
|
|||
if os.path.exists(builtin_file_path):
|
||||
with open(builtin_file_path, encoding='utf-8') as f:
|
||||
position = int(f.read().strip())
|
||||
position_map[extension_name] = position
|
||||
position_map[extension_name] = position
|
||||
|
||||
if (extension_name + '.py') not in file_names:
|
||||
logging.warning(f"Missing {extension_name}.py file in {subdir_path}, Skip.")
|
||||
|
|
|
@ -204,6 +204,7 @@ class LangFuseDataTrace(BaseTraceInstance):
|
|||
node_generation_data = LangfuseGeneration(
|
||||
name="llm",
|
||||
trace_id=trace_id,
|
||||
model=process_data.get("model_name"),
|
||||
parent_observation_id=node_execution_id,
|
||||
start_time=created_at,
|
||||
end_time=finished_at,
|
||||
|
|
|
@ -139,8 +139,7 @@ class LangSmithDataTrace(BaseTraceInstance):
|
|||
json.loads(node_execution.execution_metadata) if node_execution.execution_metadata else {}
|
||||
)
|
||||
node_total_tokens = execution_metadata.get("total_tokens", 0)
|
||||
|
||||
metadata = json.loads(node_execution.execution_metadata) if node_execution.execution_metadata else {}
|
||||
metadata = execution_metadata.copy()
|
||||
metadata.update(
|
||||
{
|
||||
"workflow_run_id": trace_info.workflow_run_id,
|
||||
|
@ -156,6 +155,12 @@ class LangSmithDataTrace(BaseTraceInstance):
|
|||
process_data = json.loads(node_execution.process_data) if node_execution.process_data else {}
|
||||
if process_data and process_data.get("model_mode") == "chat":
|
||||
run_type = LangSmithRunType.llm
|
||||
metadata.update(
|
||||
{
|
||||
'ls_provider': process_data.get('model_provider', ''),
|
||||
'ls_model_name': process_data.get('model_name', ''),
|
||||
}
|
||||
)
|
||||
elif node_type == "knowledge-retrieval":
|
||||
run_type = LangSmithRunType.retriever
|
||||
else:
|
||||
|
|
|
@ -17,11 +17,8 @@ class StepfunTool(BuiltinTool):
|
|||
"""
|
||||
invoke tools
|
||||
"""
|
||||
base_url = self.runtime.credentials.get('stepfun_base_url', None)
|
||||
if not base_url:
|
||||
base_url = None
|
||||
else:
|
||||
base_url = str(URL(base_url) / 'v1')
|
||||
base_url = self.runtime.credentials.get('stepfun_base_url', 'https://api.stepfun.com')
|
||||
base_url = str(URL(base_url) / 'v1')
|
||||
|
||||
client = OpenAI(
|
||||
api_key=self.runtime.credentials['stepfun_api_key'],
|
||||
|
|
|
@ -109,7 +109,9 @@ class LLMNode(BaseNode):
|
|||
'prompts': PromptMessageUtil.prompt_messages_to_prompt_for_saving(
|
||||
model_mode=model_config.mode,
|
||||
prompt_messages=prompt_messages
|
||||
)
|
||||
),
|
||||
'model_provider': model_config.provider,
|
||||
'model_name': model_config.model,
|
||||
}
|
||||
|
||||
# handle invoke result
|
||||
|
|
|
@ -125,7 +125,7 @@ export default function AppSelector({ isMobile }: IAppSelecotr) {
|
|||
className={classNames(itemClassName, 'group justify-between')}
|
||||
href='https://github.com/langgenius/dify/discussions/categories/feedbacks'
|
||||
target='_blank' rel='noopener noreferrer'>
|
||||
<div>{t('common.userProfile.roadmapAndFeedback')}</div>
|
||||
<div>{t('common.userProfile.communityFeedback')}</div>
|
||||
<ArrowUpRight className='hidden w-[14px] h-[14px] text-gray-500 group-hover:flex' />
|
||||
</Link>
|
||||
</Menu.Item>
|
||||
|
@ -149,6 +149,15 @@ export default function AppSelector({ isMobile }: IAppSelecotr) {
|
|||
<ArrowUpRight className='hidden w-[14px] h-[14px] text-gray-500 group-hover:flex' />
|
||||
</Link>
|
||||
</Menu.Item>
|
||||
<Menu.Item>
|
||||
<Link
|
||||
className={classNames(itemClassName, 'group justify-between')}
|
||||
href='https://roadmap.dify.ai'
|
||||
target='_blank' rel='noopener noreferrer'>
|
||||
<div>{t('common.userProfile.roadmap')}</div>
|
||||
<ArrowUpRight className='hidden w-[14px] h-[14px] text-gray-500 group-hover:flex' />
|
||||
</Link>
|
||||
</Menu.Item>
|
||||
{
|
||||
document?.body?.getAttribute('data-public-site-about') !== 'hide' && (
|
||||
<Menu.Item>
|
||||
|
|
|
@ -128,7 +128,8 @@ const translation = {
|
|||
workspace: 'Arbeitsbereich',
|
||||
createWorkspace: 'Arbeitsbereich erstellen',
|
||||
helpCenter: 'Hilfe',
|
||||
roadmapAndFeedback: 'Feedback',
|
||||
communityFeedback: 'Rückmeldung',
|
||||
roadmap: 'Fahrplan',
|
||||
community: 'Gemeinschaft',
|
||||
about: 'Über',
|
||||
logout: 'Abmelden',
|
||||
|
|
|
@ -132,7 +132,8 @@ const translation = {
|
|||
workspace: 'Workspace',
|
||||
createWorkspace: 'Create Workspace',
|
||||
helpCenter: 'Help',
|
||||
roadmapAndFeedback: 'Feedback',
|
||||
communityFeedback: 'Feedback',
|
||||
roadmap: 'Roadmap',
|
||||
community: 'Community',
|
||||
about: 'About',
|
||||
logout: 'Log out',
|
||||
|
|
|
@ -132,7 +132,8 @@ const translation = {
|
|||
workspace: 'Espacio de trabajo',
|
||||
createWorkspace: 'Crear espacio de trabajo',
|
||||
helpCenter: 'Ayuda',
|
||||
roadmapAndFeedback: 'Comentarios',
|
||||
communityFeedback: 'Comentarios',
|
||||
roadmap: 'Hoja de ruta',
|
||||
community: 'Comunidad',
|
||||
about: 'Acerca de',
|
||||
logout: 'Cerrar sesión',
|
||||
|
|
|
@ -132,7 +132,8 @@ const translation = {
|
|||
workspace: 'فضای کاری',
|
||||
createWorkspace: 'ایجاد فضای کاری',
|
||||
helpCenter: 'راهنما',
|
||||
roadmapAndFeedback: 'بازخورد',
|
||||
communityFeedback: 'بازخورد',
|
||||
roadmap: 'نقشه راه',
|
||||
community: 'انجمن',
|
||||
about: 'درباره',
|
||||
logout: 'خروج',
|
||||
|
|
|
@ -128,7 +128,8 @@ const translation = {
|
|||
workspace: 'Espace de travail',
|
||||
createWorkspace: 'Créer un Espace de Travail',
|
||||
helpCenter: 'Aide',
|
||||
roadmapAndFeedback: 'Retour d\'information',
|
||||
communityFeedback: 'Retour d\'information',
|
||||
roadmap: 'Feuille de route',
|
||||
community: 'Communauté',
|
||||
about: 'À propos',
|
||||
logout: 'Se déconnecter',
|
||||
|
|
|
@ -137,7 +137,8 @@ const translation = {
|
|||
workspace: 'वर्कस्पेस',
|
||||
createWorkspace: 'वर्कस्पेस बनाएं',
|
||||
helpCenter: 'सहायता',
|
||||
roadmapAndFeedback: 'प्रतिक्रिया',
|
||||
communityFeedback: 'प्रतिक्रिया',
|
||||
roadmap: 'रोडमैप',
|
||||
community: 'समुदाय',
|
||||
about: 'के बारे में',
|
||||
logout: 'लॉग आउट',
|
||||
|
|
|
@ -137,7 +137,8 @@ const translation = {
|
|||
workspace: 'Workspace',
|
||||
createWorkspace: 'Crea Workspace',
|
||||
helpCenter: 'Aiuto',
|
||||
roadmapAndFeedback: 'Feedback',
|
||||
communityFeedback: 'Feedback',
|
||||
roadmap: 'Tabella di marcia',
|
||||
community: 'Comunità',
|
||||
about: 'Informazioni',
|
||||
logout: 'Esci',
|
||||
|
|
|
@ -132,7 +132,8 @@ const translation = {
|
|||
workspace: 'ワークスペース',
|
||||
createWorkspace: 'ワークスペースを作成',
|
||||
helpCenter: 'ヘルプ',
|
||||
roadmapAndFeedback: 'フィードバック',
|
||||
communityFeedback: 'フィードバック',
|
||||
roadmap: 'ロードマップ',
|
||||
community: 'コミュニティ',
|
||||
about: 'Difyについて',
|
||||
logout: 'ログアウト',
|
||||
|
|
|
@ -124,7 +124,8 @@ const translation = {
|
|||
workspace: '작업 공간',
|
||||
createWorkspace: '작업 공간 만들기',
|
||||
helpCenter: '도움말 센터',
|
||||
roadmapAndFeedback: '로드맵 및 피드백',
|
||||
communityFeedback: '로드맵 및 피드백',
|
||||
roadmap: '로드맵',
|
||||
community: '커뮤니티',
|
||||
about: 'Dify 소개',
|
||||
logout: '로그아웃',
|
||||
|
|
|
@ -133,7 +133,8 @@ const translation = {
|
|||
workspace: 'Przestrzeń robocza',
|
||||
createWorkspace: 'Utwórz przestrzeń roboczą',
|
||||
helpCenter: 'Pomoc',
|
||||
roadmapAndFeedback: 'Opinie',
|
||||
communityFeedback: 'Opinie',
|
||||
roadmap: 'Plan działania',
|
||||
community: 'Społeczność',
|
||||
about: 'O',
|
||||
logout: 'Wyloguj się',
|
||||
|
|
|
@ -128,7 +128,8 @@ const translation = {
|
|||
workspace: 'Espaço de trabalho',
|
||||
createWorkspace: 'Criar Espaço de Trabalho',
|
||||
helpCenter: 'Ajuda',
|
||||
roadmapAndFeedback: 'Feedback',
|
||||
communityFeedback: 'Feedback',
|
||||
roadmap: 'Roteiro',
|
||||
community: 'Comunidade',
|
||||
about: 'Sobre',
|
||||
logout: 'Sair',
|
||||
|
|
|
@ -127,7 +127,8 @@ const translation = {
|
|||
workspace: 'Spațiu de lucru',
|
||||
createWorkspace: 'Creează Spațiu de lucru',
|
||||
helpCenter: 'Ajutor',
|
||||
roadmapAndFeedback: 'Feedback',
|
||||
communityFeedback: 'Feedback',
|
||||
roadmap: 'Plan de acțiune',
|
||||
community: 'Comunitate',
|
||||
about: 'Despre',
|
||||
logout: 'Deconectare',
|
||||
|
|
|
@ -132,7 +132,8 @@ const translation = {
|
|||
workspace: 'Рабочее пространство',
|
||||
createWorkspace: 'Создать рабочее пространство',
|
||||
helpCenter: 'Помощь',
|
||||
roadmapAndFeedback: 'Обратная связь',
|
||||
communityFeedback: 'Обратная связь',
|
||||
roadmap: 'План развития',
|
||||
community: 'Сообщество',
|
||||
about: 'О нас',
|
||||
logout: 'Выйти',
|
||||
|
|
|
@ -132,7 +132,8 @@ const translation = {
|
|||
workspace: 'Çalışma Alanı',
|
||||
createWorkspace: 'Çalışma Alanı Oluştur',
|
||||
helpCenter: 'Yardım',
|
||||
roadmapAndFeedback: 'Geri Bildirim',
|
||||
communityFeedback: 'Geri Bildirim',
|
||||
roadmap: 'Yol haritası',
|
||||
community: 'Topluluk',
|
||||
about: 'Hakkında',
|
||||
logout: 'Çıkış Yap',
|
||||
|
|
|
@ -128,7 +128,8 @@ const translation = {
|
|||
workspace: 'Робочий простір',
|
||||
createWorkspace: 'Створити робочий простір',
|
||||
helpCenter: 'Довідковий центр',
|
||||
roadmapAndFeedback: 'відгуки',
|
||||
communityFeedback: 'відгуки',
|
||||
roadmap: 'Дорожня карта',
|
||||
community: 'Спільнота',
|
||||
about: 'Про нас',
|
||||
logout: 'Вийти',
|
||||
|
|
|
@ -128,7 +128,8 @@ const translation = {
|
|||
workspace: 'Không gian làm việc',
|
||||
createWorkspace: 'Tạo Không gian làm việc',
|
||||
helpCenter: 'Trung tâm trợ giúp',
|
||||
roadmapAndFeedback: 'Phản hồi',
|
||||
communityFeedback: 'Phản hồi',
|
||||
roadmap: 'Lộ trình',
|
||||
community: 'Cộng đồng',
|
||||
about: 'Về chúng tôi',
|
||||
logout: 'Đăng xuất',
|
||||
|
|
|
@ -132,7 +132,8 @@ const translation = {
|
|||
workspace: '工作空间',
|
||||
createWorkspace: '创建工作空间',
|
||||
helpCenter: '帮助文档',
|
||||
roadmapAndFeedback: '用户反馈',
|
||||
communityFeedback: '用户反馈',
|
||||
roadmap: '路线图',
|
||||
community: '社区',
|
||||
about: '关于',
|
||||
logout: '登出',
|
||||
|
|
|
@ -128,7 +128,8 @@ const translation = {
|
|||
workspace: '工作空間',
|
||||
createWorkspace: '建立工作空間',
|
||||
helpCenter: '幫助文件',
|
||||
roadmapAndFeedback: '使用者反饋',
|
||||
communityFeedback: '使用者反饋',
|
||||
roadmap: '路線圖',
|
||||
community: '社群',
|
||||
about: '關於',
|
||||
logout: '登出',
|
||||
|
|
Loading…
Reference in New Issue
Block a user