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