Co-authored-by: crazywoola <100913391+crazywoola@users.noreply.github.com>tags/0.7.3
| "from_end_user_id": fields.String, | "from_end_user_id": fields.String, | ||||
| "from_end_user_session_id": fields.String(), | "from_end_user_session_id": fields.String(), | ||||
| "from_account_id": fields.String, | "from_account_id": fields.String, | ||||
| "from_account_name": fields.String, | |||||
| "read_at": TimestampField, | "read_at": TimestampField, | ||||
| "created_at": TimestampField, | "created_at": TimestampField, | ||||
| "annotation": fields.Nested(annotation_fields, allow_null=True), | "annotation": fields.Nested(annotation_fields, allow_null=True), | ||||
| "from_end_user_id": fields.String, | "from_end_user_id": fields.String, | ||||
| "from_end_user_session_id": fields.String, | "from_end_user_session_id": fields.String, | ||||
| "from_account_id": fields.String, | "from_account_id": fields.String, | ||||
| "from_account_name": fields.String, | |||||
| "name": fields.String, | "name": fields.String, | ||||
| "summary": fields.String(attribute="summary_or_query"), | "summary": fields.String(attribute="summary_or_query"), | ||||
| "read_at": TimestampField, | "read_at": TimestampField, |
| return tenant | return tenant | ||||
| class Conversation(db.Model): | class Conversation(db.Model): | ||||
| __tablename__ = 'conversations' | __tablename__ = 'conversations' | ||||
| __table_args__ = ( | __table_args__ = ( | ||||
| return None | return None | ||||
| @property | |||||
| def from_account_name(self): | |||||
| if self.from_account_id: | |||||
| account = db.session.query(Account).filter(Account.id == self.from_account_id).first() | |||||
| if account: | |||||
| return account.name | |||||
| return None | |||||
| @property | @property | ||||
| def in_debug_mode(self): | def in_debug_mode(self): | ||||
| return self.override_model_configs is not None | return self.override_model_configs is not None |
| </thead> | </thead> | ||||
| <tbody className="text-gray-500"> | <tbody className="text-gray-500"> | ||||
| {logs.data.map((log: any) => { | {logs.data.map((log: any) => { | ||||
| const endUser = log.from_end_user_session_id | |||||
| const endUser = log.from_end_user_session_id || log.from_account_name | |||||
| const leftValue = get(log, isChatMode ? 'name' : 'message.inputs.query') || (!isChatMode ? (get(log, 'message.query') || get(log, 'message.inputs.default_input')) : '') || '' | const leftValue = get(log, isChatMode ? 'name' : 'message.inputs.query') || (!isChatMode ? (get(log, 'message.query') || get(log, 'message.inputs.default_input')) : '') || '' | ||||
| const rightValue = get(log, isChatMode ? 'message_count' : 'message.answer') | const rightValue = get(log, isChatMode ? 'message_count' : 'message.answer') | ||||
| return <tr | return <tr |
| </thead> | </thead> | ||||
| <tbody className="text-gray-700 text-[13px]"> | <tbody className="text-gray-700 text-[13px]"> | ||||
| {logs.data.map((log: WorkflowAppLogDetail) => { | {logs.data.map((log: WorkflowAppLogDetail) => { | ||||
| const endUser = log.created_by_end_user ? log.created_by_end_user.session_id : defaultValue | |||||
| const endUser = log.created_by_end_user ? log.created_by_end_user.session_id : log.created_by_account ? log.created_by_account.name : defaultValue | |||||
| return <tr | return <tr | ||||
| key={log.id} | key={log.id} | ||||
| className={`border-b border-gray-200 h-8 hover:bg-gray-50 cursor-pointer ${currentLog?.id !== log.id ? '' : 'bg-gray-50'}`} | className={`border-b border-gray-200 h-8 hover:bg-gray-50 cursor-pointer ${currentLog?.id !== log.id ? '' : 'bg-gray-50'}`} |
| header: { | header: { | ||||
| updatedTime: 'Aktualisierungszeit', | updatedTime: 'Aktualisierungszeit', | ||||
| time: 'Erstellungszeit', | time: 'Erstellungszeit', | ||||
| endUser: 'Endbenutzer', | |||||
| endUser: 'Endbenutzer oder Konto', | |||||
| input: 'Eingabe', | input: 'Eingabe', | ||||
| output: 'Ausgabe', | output: 'Ausgabe', | ||||
| summary: 'Titel', | summary: 'Titel', |
| header: { | header: { | ||||
| updatedTime: 'Updated time', | updatedTime: 'Updated time', | ||||
| time: 'Created time', | time: 'Created time', | ||||
| endUser: 'End User', | |||||
| endUser: 'End User or Account', | |||||
| input: 'Input', | input: 'Input', | ||||
| output: 'Output', | output: 'Output', | ||||
| summary: 'Title', | summary: 'Title', | ||||
| status: 'STATUS', | status: 'STATUS', | ||||
| runtime: 'RUN TIME', | runtime: 'RUN TIME', | ||||
| tokens: 'TOKENS', | tokens: 'TOKENS', | ||||
| user: 'END-USER', | |||||
| user: 'End User or Account', | |||||
| version: 'VERSION', | version: 'VERSION', | ||||
| }, | }, | ||||
| pagination: { | pagination: { |
| header: { | header: { | ||||
| updatedTime: 'Hora actualizada', | updatedTime: 'Hora actualizada', | ||||
| time: 'Hora creada', | time: 'Hora creada', | ||||
| endUser: 'Usuario Final', | |||||
| endUser: 'Usuario Final o Cuenta', | |||||
| input: 'Entrada', | input: 'Entrada', | ||||
| output: 'Salida', | output: 'Salida', | ||||
| summary: 'Título', | summary: 'Título', | ||||
| status: 'ESTADO', | status: 'ESTADO', | ||||
| runtime: 'TIEMPO DE EJECUCIÓN', | runtime: 'TIEMPO DE EJECUCIÓN', | ||||
| tokens: 'TOKENS', | tokens: 'TOKENS', | ||||
| user: 'USUARIO FINAL', | |||||
| user: 'USUARIO FINAL O CUENTA', | |||||
| version: 'VERSIÓN', | version: 'VERSIÓN', | ||||
| }, | }, | ||||
| pagination: { | pagination: { |
| header: { | header: { | ||||
| updatedTime: 'زمان بهروزرسانی', | updatedTime: 'زمان بهروزرسانی', | ||||
| time: 'زمان ایجاد', | time: 'زمان ایجاد', | ||||
| endUser: 'کاربر نهایی', | |||||
| endUser: 'کاربر نهایی یا حساب', | |||||
| input: 'ورودی', | input: 'ورودی', | ||||
| output: 'خروجی', | output: 'خروجی', | ||||
| summary: 'عنوان', | summary: 'عنوان', | ||||
| status: 'وضعیت', | status: 'وضعیت', | ||||
| runtime: 'زمان اجرا', | runtime: 'زمان اجرا', | ||||
| tokens: 'توکنها', | tokens: 'توکنها', | ||||
| user: 'کاربر نهایی', | |||||
| user: 'کاربر نهایی یا حساب', | |||||
| version: 'نسخه', | version: 'نسخه', | ||||
| }, | }, | ||||
| pagination: { | pagination: { |
| header: { | header: { | ||||
| updatedTime: 'Heure de mise à jour', | updatedTime: 'Heure de mise à jour', | ||||
| time: 'Heure de création', | time: 'Heure de création', | ||||
| endUser: 'Utilisateur final', | |||||
| endUser: 'Utilisateur final ou compte', | |||||
| input: 'Entrée', | input: 'Entrée', | ||||
| output: 'Sortie', | output: 'Sortie', | ||||
| summary: 'Titre', | summary: 'Titre', | ||||
| status: 'STATUT', | status: 'STATUT', | ||||
| runtime: 'TEMPS D\'EXÉCUTION', | runtime: 'TEMPS D\'EXÉCUTION', | ||||
| tokens: 'JETONS', | tokens: 'JETONS', | ||||
| user: 'UTILISATEUR FINAL', | |||||
| user: 'UTILISATEUR FINAL OU COMPTE', | |||||
| version: 'VERSION', | version: 'VERSION', | ||||
| }, | }, | ||||
| pagination: { | pagination: { |
| header: { | header: { | ||||
| updatedTime: 'अपडेट का समय', | updatedTime: 'अपडेट का समय', | ||||
| time: 'बनाने का समय', | time: 'बनाने का समय', | ||||
| endUser: 'अंतिम उपयोगकर्ता', | |||||
| endUser: 'अंतिम उपयोगकर्ता या खाता', | |||||
| input: 'इनपुट', | input: 'इनपुट', | ||||
| output: 'आउटपुट', | output: 'आउटपुट', | ||||
| summary: 'शीर्षक', | summary: 'शीर्षक', | ||||
| status: 'स्थिति', | status: 'स्थिति', | ||||
| runtime: 'रन टाइम', | runtime: 'रन टाइम', | ||||
| tokens: 'टोकन', | tokens: 'टोकन', | ||||
| user: 'अंतिम उपयोगकर्ता', | |||||
| user: 'अंतिम उपयोगकर्ता या खाता', | |||||
| version: 'संस्करण', | version: 'संस्करण', | ||||
| }, | }, | ||||
| pagination: { | pagination: { |
| header: { | header: { | ||||
| updatedTime: 'Ora di aggiornamento', | updatedTime: 'Ora di aggiornamento', | ||||
| time: 'Ora di creazione', | time: 'Ora di creazione', | ||||
| endUser: 'Utente Finale', | |||||
| endUser: 'Utente Finale o Account', | |||||
| input: 'Input', | input: 'Input', | ||||
| output: 'Output', | output: 'Output', | ||||
| summary: 'Titolo', | summary: 'Titolo', | ||||
| status: 'STATO', | status: 'STATO', | ||||
| runtime: 'TEMPO DI ESECUZIONE', | runtime: 'TEMPO DI ESECUZIONE', | ||||
| tokens: 'TOKEN', | tokens: 'TOKEN', | ||||
| user: 'UTENTE FINALE', | |||||
| user: 'UTENTE FINALE O ACCOUNT', | |||||
| version: 'VERSIONE', | version: 'VERSIONE', | ||||
| }, | }, | ||||
| pagination: { | pagination: { |
| header: { | header: { | ||||
| updatedTime: '更新時間', | updatedTime: '更新時間', | ||||
| time: '作成時間', | time: '作成時間', | ||||
| endUser: 'エンドユーザー', | |||||
| endUser: 'エンドユーザーまたはアカウント', | |||||
| input: '入力', | input: '入力', | ||||
| output: '出力', | output: '出力', | ||||
| summary: 'タイトル', | summary: 'タイトル', | ||||
| status: 'ステータス', | status: 'ステータス', | ||||
| runtime: 'ランタイム', | runtime: 'ランタイム', | ||||
| tokens: 'トークン', | tokens: 'トークン', | ||||
| user: 'エンドユーザー', | |||||
| user: 'エンドユーザーまたはアカウント', | |||||
| version: 'バージョン', | version: 'バージョン', | ||||
| }, | }, | ||||
| pagination: { | pagination: { |
| header: { | header: { | ||||
| updatedTime: '업데이트 시간', | updatedTime: '업데이트 시간', | ||||
| time: '생성 시간', | time: '생성 시간', | ||||
| endUser: '엔드 유저', | |||||
| endUser: '엔드 유저 또는 계정', | |||||
| input: '입력', | input: '입력', | ||||
| output: '출력', | output: '출력', | ||||
| summary: '요약', | summary: '요약', | ||||
| status: '상태', | status: '상태', | ||||
| runtime: '실행 시간', | runtime: '실행 시간', | ||||
| tokens: '토큰', | tokens: '토큰', | ||||
| user: '엔드 유저', | |||||
| user: '엔드 유저 또는 계정', | |||||
| version: '버전', | version: '버전', | ||||
| }, | }, | ||||
| pagination: { | pagination: { |
| header: { | header: { | ||||
| updatedTime: 'Czas aktualizacji', | updatedTime: 'Czas aktualizacji', | ||||
| time: 'Czas utworzenia', | time: 'Czas utworzenia', | ||||
| endUser: 'Użytkownik końcowy', | |||||
| endUser: 'Użytkownik końcowy lub konto', | |||||
| input: 'Wejście', | input: 'Wejście', | ||||
| output: 'Wyjście', | output: 'Wyjście', | ||||
| summary: 'Tytuł', | summary: 'Tytuł', | ||||
| status: 'STATUS', | status: 'STATUS', | ||||
| runtime: 'CZAS DZIAŁANIA', | runtime: 'CZAS DZIAŁANIA', | ||||
| tokens: 'TOKENY', | tokens: 'TOKENY', | ||||
| user: 'UŻYTKOWNIK KOŃCOWY', | |||||
| user: 'UŻYTKOWNIK KOŃCOWY LUB KONTO', | |||||
| version: 'WERSJA', | version: 'WERSJA', | ||||
| }, | }, | ||||
| pagination: { | pagination: { |
| header: { | header: { | ||||
| updatedTime: 'Hora de atualização', | updatedTime: 'Hora de atualização', | ||||
| time: 'Hora de criação', | time: 'Hora de criação', | ||||
| endUser: 'Usuário Final', | |||||
| endUser: 'Usuário final ou conta', | |||||
| input: 'Entrada', | input: 'Entrada', | ||||
| output: 'Saída', | output: 'Saída', | ||||
| summary: 'Título', | summary: 'Título', | ||||
| status: 'STATUS', | status: 'STATUS', | ||||
| runtime: 'TEMPO DE EXECUÇÃO', | runtime: 'TEMPO DE EXECUÇÃO', | ||||
| tokens: 'TOKENS', | tokens: 'TOKENS', | ||||
| user: 'USUÁRIO FINAL', | |||||
| user: 'USUÁRIO FINAL OU CONTA', | |||||
| version: 'VERSÃO', | version: 'VERSÃO', | ||||
| }, | }, | ||||
| pagination: { | pagination: { |
| header: { | header: { | ||||
| updatedTime: 'Timp actualizare', | updatedTime: 'Timp actualizare', | ||||
| time: 'Timp creare', | time: 'Timp creare', | ||||
| endUser: 'Utilizator final', | |||||
| endUser: 'Utilizator final sau cont', | |||||
| input: 'Intrare', | input: 'Intrare', | ||||
| output: 'Ieșire', | output: 'Ieșire', | ||||
| summary: 'Titlu', | summary: 'Titlu', | ||||
| status: 'STARE', | status: 'STARE', | ||||
| runtime: 'TIMP DE RULARE', | runtime: 'TIMP DE RULARE', | ||||
| tokens: 'JETOANE', | tokens: 'JETOANE', | ||||
| user: 'UTILIZATOR FINAL', | |||||
| user: 'UTILIZATOR FINAL SAU CONT', | |||||
| version: 'VERSIUNE', | version: 'VERSIUNE', | ||||
| }, | }, | ||||
| pagination: { | pagination: { |
| header: { | header: { | ||||
| updatedTime: 'Güncellenme zamanı', | updatedTime: 'Güncellenme zamanı', | ||||
| time: 'Oluşturulma zamanı', | time: 'Oluşturulma zamanı', | ||||
| endUser: 'Son Kullanıcı', | |||||
| endUser: 'Son Kullanıcı veya Hesap', | |||||
| input: 'Girdi', | input: 'Girdi', | ||||
| output: 'Çıktı', | output: 'Çıktı', | ||||
| summary: 'Başlık', | summary: 'Başlık', | ||||
| status: 'DURUM', | status: 'DURUM', | ||||
| runtime: 'ÇALIŞMA SÜRESİ', | runtime: 'ÇALIŞMA SÜRESİ', | ||||
| tokens: 'TOKENLAR', | tokens: 'TOKENLAR', | ||||
| user: 'SON KULLANICI', | |||||
| user: 'SON KULLANICI VEYA HESAP', | |||||
| version: 'VERSİYON', | version: 'VERSİYON', | ||||
| }, | }, | ||||
| pagination: { | pagination: { |
| header: { | header: { | ||||
| updatedTime: 'Час оновлення', | updatedTime: 'Час оновлення', | ||||
| time: 'Час створення', | time: 'Час створення', | ||||
| endUser: 'Кінцевий Користувач', | |||||
| endUser: 'Кінцевий Користувач або Обліковий Запис', | |||||
| input: 'Введення', | input: 'Введення', | ||||
| output: 'Виведення', | output: 'Виведення', | ||||
| summary: 'Заголовок', | summary: 'Заголовок', | ||||
| status: 'СТАТУС', | status: 'СТАТУС', | ||||
| runtime: 'ЧАС ВИКОНАННЯ', | runtime: 'ЧАС ВИКОНАННЯ', | ||||
| tokens: 'ТОКЕНИ', | tokens: 'ТОКЕНИ', | ||||
| user: 'КІНЦЕВИЙ КОРИСТУВАЧ', | |||||
| user: 'КІНЦЕВИЙ КОРИСТУВАЧ АБО ОБЛІКОВИЙ ЗАПИС', | |||||
| version: 'ВЕРСІЯ', | version: 'ВЕРСІЯ', | ||||
| }, | }, | ||||
| pagination: { | pagination: { |
| header: { | header: { | ||||
| updatedTime: 'Thời gian cập nhật', | updatedTime: 'Thời gian cập nhật', | ||||
| time: 'Thời gian tạo', | time: 'Thời gian tạo', | ||||
| endUser: 'Người dùng cuối', | |||||
| endUser: 'Người dùng cuối hoặc tài khoản', | |||||
| input: 'Đầu vào', | input: 'Đầu vào', | ||||
| output: 'Đầu ra', | output: 'Đầu ra', | ||||
| summary: 'Tóm tắt', | summary: 'Tóm tắt', | ||||
| status: 'TRẠNG THÁI', | status: 'TRẠNG THÁI', | ||||
| runtime: 'THỜI GIAN CHẠY', | runtime: 'THỜI GIAN CHẠY', | ||||
| tokens: 'TOKEN', | tokens: 'TOKEN', | ||||
| user: 'NGƯỜI DÙNG CUỐI', | |||||
| user: 'NGƯỜI DÙNG CUỐI HOẶC TÀI KHOẢN', | |||||
| version: 'PHIÊN BẢN', | version: 'PHIÊN BẢN', | ||||
| }, | }, | ||||
| pagination: { | pagination: { |
| header: { | header: { | ||||
| updatedTime: '更新时间', | updatedTime: '更新时间', | ||||
| time: '创建时间', | time: '创建时间', | ||||
| endUser: '用户', | |||||
| endUser: '用户或账户', | |||||
| input: '输入', | input: '输入', | ||||
| output: '输出', | output: '输出', | ||||
| summary: '标题', | summary: '标题', | ||||
| status: '状态', | status: '状态', | ||||
| runtime: '运行时间', | runtime: '运行时间', | ||||
| tokens: 'TOKENS', | tokens: 'TOKENS', | ||||
| user: '用户', | |||||
| user: '用户或账户', | |||||
| version: '版本', | version: '版本', | ||||
| }, | }, | ||||
| pagination: { | pagination: { |
| header: { | header: { | ||||
| updatedTime: '更新時間', | updatedTime: '更新時間', | ||||
| time: '創建時間', | time: '創建時間', | ||||
| endUser: '使用者', | |||||
| endUser: '使用者或賬戶', | |||||
| input: '輸入', | input: '輸入', | ||||
| output: '輸出', | output: '輸出', | ||||
| summary: '標題', | summary: '標題', | ||||
| status: '狀態', | status: '狀態', | ||||
| runtime: '執行時間', | runtime: '執行時間', | ||||
| tokens: 'TOKENS', | tokens: 'TOKENS', | ||||
| user: '使用者', | |||||
| user: '使用者或賬戶', | |||||
| version: '版本', | version: '版本', | ||||
| }, | }, | ||||
| pagination: { | pagination: { |