Skip to content

Commit

Permalink
✨ feat: support display thinking for DeepSeek R1 (#5558)
Browse files Browse the repository at this point in the history
* feat: support thinking

* update

* fix

* feat: support thinking

* fix lint

* improve style

* improve style

* update ability

* fix tests

* improve code

* update i18n

* Update google.ts

* improve thinking
  • Loading branch information
arvinxx authored Jan 24, 2025
1 parent 7008022 commit f98bb5a
Show file tree
Hide file tree
Showing 88 changed files with 4,964 additions and 209 deletions.
4 changes: 4 additions & 0 deletions locales/ar/chat.json
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,10 @@
}
}
},
"reasoning": {
"thinking": "في عمق التفكير",
"thought": "تم التفكير بعمق (استغرق {{duration}} ثانية)"
},
"regenerate": "إعادة الإنشاء",
"roleAndArchive": "الدور والأرشيف",
"searchAgentPlaceholder": "مساعد البحث...",
Expand Down
1 change: 1 addition & 0 deletions locales/ar/components.json
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@
"custom": "نموذج مخصص، الإعداد الافتراضي يدعم الاستدعاء الوظيفي والتعرف البصري، يرجى التحقق من قدرة النموذج على القيام بذلك بناءً على الحالة الفعلية",
"file": "يدعم هذا النموذج قراءة وتعرف الملفات المرفوعة",
"functionCall": "يدعم هذا النموذج استدعاء الوظائف",
"reasoning": "يدعم هذا النموذج التفكير العميق",
"tokens": "يدعم هذا النموذج حتى {{tokens}} رمزًا في جلسة واحدة",
"vision": "يدعم هذا النموذج التعرف البصري"
},
Expand Down
6 changes: 6 additions & 0 deletions locales/ar/models.json
Original file line number Diff line number Diff line change
Expand Up @@ -1328,6 +1328,9 @@
"step-1.5v-mini": {
"description": "يمتلك هذا النموذج قدرة قوية على فهم الفيديو."
},
"step-1o-vision-32k": {
"description": "يمتلك هذا النموذج قدرة قوية على فهم الصور. مقارنةً بسلسلة نماذج step-1v، فإنه يتمتع بأداء بصري أقوى."
},
"step-1v-32k": {
"description": "يدعم المدخلات البصرية، يعزز تجربة التفاعل متعدد الوسائط."
},
Expand All @@ -1337,6 +1340,9 @@
"step-2-16k": {
"description": "يدعم تفاعلات سياق كبيرة، مناسب لمشاهد الحوار المعقدة."
},
"step-2-mini": {
"description": "نموذج كبير سريع يعتمد على بنية الانتباه الجديدة MFA، يحقق نتائج مشابهة لـ step1 بتكلفة منخفضة جداً، مع الحفاظ على قدرة أعلى على المعالجة وزمن استجابة أسرع. يمكنه التعامل مع المهام العامة، ويتميز بقدرات قوية في البرمجة."
},
"taichu2_mm": {
"description": "يجمع بين فهم الصور، ونقل المعرفة، والاستدلال المنطقي، ويظهر أداءً بارزًا في مجال الأسئلة والأجوبة النصية والصورية."
},
Expand Down
4 changes: 4 additions & 0 deletions locales/bg-BG/chat.json
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,10 @@
}
}
},
"reasoning": {
"thinking": "В дълбочинно размисъл",
"thought": "Дълбоко помислих (отне ми {{duration}} секунди)"
},
"regenerate": "Прегенерирай",
"roleAndArchive": "Роля и архив",
"searchAgentPlaceholder": "Търсач на помощ...",
Expand Down
1 change: 1 addition & 0 deletions locales/bg-BG/components.json
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@
"custom": "Потребителски модел, по подразбиране поддържа функционалност за функционални обаждания и визуално разпознаване, моля, потвърдете наличието на тези възможности спрямо реалните условия",
"file": "Този модел поддържа качване на файлове и разпознаване",
"functionCall": "Този модел поддържа функционални обаждания (Function Call)",
"reasoning": "Този модел поддържа дълбочинно мислене",
"tokens": "Този модел поддържа до {{tokens}} токена за една сесия",
"vision": "Този модел поддържа визуално разпознаване"
},
Expand Down
6 changes: 6 additions & 0 deletions locales/bg-BG/models.json
Original file line number Diff line number Diff line change
Expand Up @@ -1328,6 +1328,9 @@
"step-1.5v-mini": {
"description": "Този модел разполага с мощни способности за разбиране на видео."
},
"step-1o-vision-32k": {
"description": "Този модел разполага с мощни способности за разбиране на изображения. В сравнение с моделите от серията step-1v, предлага по-силна визуална производителност."
},
"step-1v-32k": {
"description": "Поддържа визуални входове, подобряваща мултимодалното взаимодействие."
},
Expand All @@ -1337,6 +1340,9 @@
"step-2-16k": {
"description": "Поддържа взаимодействия с голям мащаб на контекста, подходящи за сложни диалогови сценарии."
},
"step-2-mini": {
"description": "Модел с бърза производителност, базиран на новото поколение собствена архитектура Attention MFA, който постига резултати, подобни на step1 с много ниски разходи, като същевременно поддържа по-висока производителност и по-бързо време за отговор. Може да обработва общи задачи и притежава специализирани умения в кодирането."
},
"taichu2_mm": {
"description": "Сливайки способности за разбиране на изображения, прехвърляне на знания и логическо обяснение, моделът показва отлични резултати в областта на въпросите и отговорите на текст и изображения."
},
Expand Down
4 changes: 4 additions & 0 deletions locales/de-DE/chat.json
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,10 @@
}
}
},
"reasoning": {
"thinking": "Tiefes Nachdenken",
"thought": "Tiefgründig nachgedacht (Dauer: {{duration}} Sekunden)"
},
"regenerate": "Neu generieren",
"roleAndArchive": "Rolle und Archiv",
"searchAgentPlaceholder": "Suchassistent...",
Expand Down
1 change: 1 addition & 0 deletions locales/de-DE/components.json
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@
"custom": "Benutzerdefiniertes Modell, standardmäßig unterstützt es sowohl Funktionsaufrufe als auch visuelle Erkennung. Bitte überprüfen Sie die Verfügbarkeit dieser Fähigkeiten basierend auf den tatsächlichen Gegebenheiten.",
"file": "Dieses Modell unterstützt das Hochladen von Dateien und deren Erkennung.",
"functionCall": "Dieses Modell unterstützt Funktionsaufrufe.",
"reasoning": "Dieses Modell unterstützt tiefes Denken",
"tokens": "Dieses Modell unterstützt maximal {{tokens}} Tokens pro Sitzung.",
"vision": "Dieses Modell unterstützt die visuelle Erkennung."
},
Expand Down
6 changes: 6 additions & 0 deletions locales/de-DE/models.json
Original file line number Diff line number Diff line change
Expand Up @@ -1328,6 +1328,9 @@
"step-1.5v-mini": {
"description": "Dieses Modell verfügt über starke Fähigkeiten zur Videoanalyse."
},
"step-1o-vision-32k": {
"description": "Dieses Modell verfügt über starke Fähigkeiten zur Bildverständnis. Im Vergleich zu den Modellen der Schritt-1v-Serie bietet es eine verbesserte visuelle Leistung."
},
"step-1v-32k": {
"description": "Unterstützt visuelle Eingaben und verbessert die multimodale Interaktionserfahrung."
},
Expand All @@ -1337,6 +1340,9 @@
"step-2-16k": {
"description": "Unterstützt groß angelegte Kontextinteraktionen und eignet sich für komplexe Dialogszenarien."
},
"step-2-mini": {
"description": "Ein ultraschnelles Großmodell, das auf der neuen, selbstentwickelten Attention-Architektur MFA basiert. Es erreicht mit extrem niedrigen Kosten ähnliche Ergebnisse wie Schritt 1 und bietet gleichzeitig eine höhere Durchsatzrate und schnellere Reaktionszeiten. Es kann allgemeine Aufgaben bearbeiten und hat besondere Fähigkeiten im Bereich der Codierung."
},
"taichu2_mm": {
"description": "Integriert Fähigkeiten zur Bildverstehung, Wissensübertragung und logischen Attribution und zeigt herausragende Leistungen im Bereich der Bild-Text-Fragen."
},
Expand Down
4 changes: 4 additions & 0 deletions locales/en-US/chat.json
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,10 @@
}
}
},
"reasoning": {
"thinking": "Deep in thought",
"thought": "Deeply thought (took {{duration}} seconds)"
},
"regenerate": "Regenerate",
"roleAndArchive": "Role and Archive",
"searchAgentPlaceholder": "Search assistants...",
Expand Down
1 change: 1 addition & 0 deletions locales/en-US/components.json
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@
"custom": "Custom model, by default, supports both function call and visual recognition. Please verify the availability of the above capabilities based on actual situations.",
"file": "This model supports file upload for reading and recognition.",
"functionCall": "This model supports function call.",
"reasoning": "This model supports deep thinking",
"tokens": "This model supports up to {{tokens}} tokens in a single session.",
"vision": "This model supports visual recognition."
},
Expand Down
6 changes: 6 additions & 0 deletions locales/en-US/models.json
Original file line number Diff line number Diff line change
Expand Up @@ -1328,6 +1328,9 @@
"step-1.5v-mini": {
"description": "This model has powerful video understanding capabilities."
},
"step-1o-vision-32k": {
"description": "This model possesses powerful image understanding capabilities. Compared to the step-1v series models, it offers enhanced visual performance."
},
"step-1v-32k": {
"description": "Supports visual input, enhancing multimodal interaction experiences."
},
Expand All @@ -1337,6 +1340,9 @@
"step-2-16k": {
"description": "Supports large-scale context interactions, suitable for complex dialogue scenarios."
},
"step-2-mini": {
"description": "A high-speed large model based on the next-generation self-developed Attention architecture MFA, achieving results similar to step-1 at a very low cost, while maintaining higher throughput and faster response times. It is capable of handling general tasks and has specialized skills in coding."
},
"taichu2_mm": {
"description": "Integrating capabilities in image understanding, knowledge transfer, and logical attribution, it excels in the field of image-text question answering."
},
Expand Down
4 changes: 4 additions & 0 deletions locales/es-ES/chat.json
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,10 @@
}
}
},
"reasoning": {
"thinking": "Pensando profundamente",
"thought": "He reflexionado profundamente (durante {{duration}} segundos)"
},
"regenerate": "Regenerar",
"roleAndArchive": "Rol y archivo",
"searchAgentPlaceholder": "Asistente de búsqueda...",
Expand Down
1 change: 1 addition & 0 deletions locales/es-ES/components.json
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@
"custom": "Modelo personalizado: admite llamadas de función y reconocimiento visual. Verifique la disponibilidad de estas capacidades según sea necesario.",
"file": "Este modelo admite la carga y reconocimiento de archivos.",
"functionCall": "Este modelo admite llamadas de función.",
"reasoning": "Este modelo admite un pensamiento profundo",
"tokens": "Este modelo admite un máximo de {{tokens}} tokens por sesión.",
"vision": "Este modelo admite el reconocimiento visual."
},
Expand Down
6 changes: 6 additions & 0 deletions locales/es-ES/models.json
Original file line number Diff line number Diff line change
Expand Up @@ -1328,6 +1328,9 @@
"step-1.5v-mini": {
"description": "Este modelo tiene una potente capacidad de comprensión de video."
},
"step-1o-vision-32k": {
"description": "Este modelo posee una poderosa capacidad de comprensión de imágenes. En comparación con la serie de modelos step-1v, ofrece un rendimiento visual superior."
},
"step-1v-32k": {
"description": "Soporta entradas visuales, mejorando la experiencia de interacción multimodal."
},
Expand All @@ -1337,6 +1340,9 @@
"step-2-16k": {
"description": "Soporta interacciones de contexto a gran escala, adecuado para escenarios de diálogo complejos."
},
"step-2-mini": {
"description": "Un modelo de gran velocidad basado en la nueva arquitectura de atención autogestionada MFA, que logra efectos similares a los de step1 a un costo muy bajo, manteniendo al mismo tiempo un mayor rendimiento y tiempos de respuesta más rápidos. Capaz de manejar tareas generales, con habilidades destacadas en programación."
},
"taichu2_mm": {
"description": "Integra capacidades de comprensión de imágenes, transferencia de conocimiento, atribución lógica, destacándose en el campo de preguntas y respuestas basadas en texto e imagen."
},
Expand Down
4 changes: 4 additions & 0 deletions locales/fa-IR/chat.json
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,10 @@
}
}
},
"reasoning": {
"thinking": "در حال تفکر عمیق",
"thought": "به طور عمیق فکر شده است (زمان صرف شده: {{duration}} ثانیه)"
},
"regenerate": "بازتولید",
"roleAndArchive": "نقش‌ها و بایگانی",
"searchAgentPlaceholder": "جستجوی دستیار...",
Expand Down
1 change: 1 addition & 0 deletions locales/fa-IR/components.json
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@
"custom": "مدل سفارشی، تنظیمات پیش‌فرض از فراخوانی توابع و تشخیص بصری پشتیبانی می‌کند، لطفاً قابلیت‌های فوق را بر اساس شرایط واقعی بررسی کنید",
"file": "این مدل از بارگذاری و شناسایی فایل‌ها پشتیبانی می‌کند",
"functionCall": "این مدل از فراخوانی توابع (Function Call) پشتیبانی می‌کند",
"reasoning": "این مدل از تفکر عمیق پشتیبانی می‌کند",
"tokens": "این مدل در هر جلسه حداکثر از {{tokens}} توکن پشتیبانی می‌کند",
"vision": "این مدل از تشخیص بصری پشتیبانی می‌کند"
},
Expand Down
6 changes: 6 additions & 0 deletions locales/fa-IR/models.json
Original file line number Diff line number Diff line change
Expand Up @@ -1328,6 +1328,9 @@
"step-1.5v-mini": {
"description": "این مدل دارای توانایی‌های قوی در درک ویدیو است."
},
"step-1o-vision-32k": {
"description": "این مدل دارای توانایی‌های قوی در درک تصویر است. در مقایسه با مدل‌های سری step-1v، عملکرد بصری بهتری دارد."
},
"step-1v-32k": {
"description": "پشتیبانی از ورودی بصری، تقویت تجربه تعامل چندحالته."
},
Expand All @@ -1337,6 +1340,9 @@
"step-2-16k": {
"description": "پشتیبانی از تعاملات متنی گسترده، مناسب برای سناریوهای مکالمه پیچیده."
},
"step-2-mini": {
"description": "مدل بزرگ فوق‌العاده سریع مبتنی بر معماری توجه MFA که به‌طور خودجوش توسعه یافته است، با هزینه بسیار کم به نتایجی مشابه با مرحله ۱ دست می‌یابد و در عین حال توانایی پردازش بالاتر و زمان پاسخ سریع‌تری را حفظ می‌کند. این مدل قادر به انجام وظایف عمومی است و در توانایی‌های کدنویسی تخصص دارد."
},
"taichu2_mm": {
"description": "ترکیبی از درک تصویر، انتقال دانش، استدلال منطقی و غیره، در زمینه پرسش و پاسخ تصویری و متنی عملکرد برجسته‌ای دارد."
},
Expand Down
4 changes: 4 additions & 0 deletions locales/fr-FR/chat.json
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,10 @@
}
}
},
"reasoning": {
"thinking": "En pleine réflexion profonde",
"thought": "J'ai réfléchi en profondeur (durée : {{duration}} secondes)"
},
"regenerate": "Regénérer",
"roleAndArchive": "Rôle et archivage",
"searchAgentPlaceholder": "Assistant de recherche...",
Expand Down
1 change: 1 addition & 0 deletions locales/fr-FR/components.json
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@
"custom": "Modèle personnalisé par défaut prenant en charge à la fois les appels de fonction et la reconnaissance visuelle. Veuillez vérifier la disponibilité de ces capacités en fonction de vos besoins réels.",
"file": "Ce modèle prend en charge la lecture et la reconnaissance de fichiers téléchargés.",
"functionCall": "Ce modèle prend en charge les appels de fonction.",
"reasoning": "Ce modèle prend en charge une réflexion approfondie",
"tokens": "Ce modèle prend en charge jusqu'à {{tokens}} jetons par session.",
"vision": "Ce modèle prend en charge la reconnaissance visuelle."
},
Expand Down
6 changes: 6 additions & 0 deletions locales/fr-FR/models.json
Original file line number Diff line number Diff line change
Expand Up @@ -1328,6 +1328,9 @@
"step-1.5v-mini": {
"description": "Ce modèle possède de puissantes capacités de compréhension vidéo."
},
"step-1o-vision-32k": {
"description": "Ce modèle possède de puissantes capacités de compréhension d'image. Par rapport à la série de modèles step-1v, il offre des performances visuelles supérieures."
},
"step-1v-32k": {
"description": "Prend en charge les entrées visuelles, améliorant l'expérience d'interaction multimodale."
},
Expand All @@ -1337,6 +1340,9 @@
"step-2-16k": {
"description": "Prend en charge des interactions contextuelles à grande échelle, adapté aux scénarios de dialogue complexes."
},
"step-2-mini": {
"description": "Un modèle de grande taille ultra-rapide basé sur la nouvelle architecture d'attention auto-développée MFA, atteignant des résultats similaires à ceux de step1 à un coût très bas, tout en maintenant un débit plus élevé et un temps de réponse plus rapide. Capable de traiter des tâches générales, avec des compétences particulières en matière de codage."
},
"taichu2_mm": {
"description": "Intègre des capacités de compréhension d'images, de transfert de connaissances et d'attribution logique, se distinguant dans le domaine des questions-réponses textuelles et visuelles."
},
Expand Down
4 changes: 4 additions & 0 deletions locales/it-IT/chat.json
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,10 @@
}
}
},
"reasoning": {
"thinking": "In profonda riflessione",
"thought": "Pensato in profondità (tempo impiegato {{duration}} secondi)"
},
"regenerate": "Rigenera",
"roleAndArchive": "Ruolo e archivio",
"searchAgentPlaceholder": "Assistente di ricerca...",
Expand Down
1 change: 1 addition & 0 deletions locales/it-IT/components.json
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@
"custom": "Modello personalizzato: di default supporta sia la chiamata di funzioni che il riconoscimento visivo. Verifica l'effettiva disponibilità di tali funzionalità.",
"file": "Questo modello supporta il caricamento e il riconoscimento di file.",
"functionCall": "Questo modello supporta la chiamata di funzioni.",
"reasoning": "Questo modello supporta un pensiero profondo",
"tokens": "Questo modello supporta un massimo di {{tokens}} token per sessione.",
"vision": "Questo modello supporta il riconoscimento visivo."
},
Expand Down
6 changes: 6 additions & 0 deletions locales/it-IT/models.json
Original file line number Diff line number Diff line change
Expand Up @@ -1328,6 +1328,9 @@
"step-1.5v-mini": {
"description": "Questo modello possiede potenti capacità di comprensione video."
},
"step-1o-vision-32k": {
"description": "Questo modello possiede una potente capacità di comprensione delle immagini. Rispetto ai modelli della serie step-1v, offre prestazioni visive superiori."
},
"step-1v-32k": {
"description": "Supporta input visivi, migliorando l'esperienza di interazione multimodale."
},
Expand All @@ -1337,6 +1340,9 @@
"step-2-16k": {
"description": "Supporta interazioni di contesto su larga scala, adatto per scenari di dialogo complessi."
},
"step-2-mini": {
"description": "Un modello di grandi dimensioni ad alta velocità basato sulla nuova architettura di attenzione auto-sviluppata MFA, in grado di raggiungere risultati simili a quelli di step1 a un costo molto basso, mantenendo al contempo una maggiore capacità di elaborazione e tempi di risposta più rapidi. È in grado di gestire compiti generali, con competenze particolari nella programmazione."
},
"taichu2_mm": {
"description": "Integra capacità di comprensione delle immagini, trasferimento di conoscenze, attribuzione logica, ecc., e si distingue nel campo delle domande e risposte basate su testo e immagini."
},
Expand Down
4 changes: 4 additions & 0 deletions locales/ja-JP/chat.json
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,10 @@
}
}
},
"reasoning": {
"thinking": "深く考えています",
"thought": "深く考えました(所要時間 {{duration}} 秒)"
},
"regenerate": "再生成",
"roleAndArchive": "役割とアーカイブ",
"searchAgentPlaceholder": "検索アシスタント...",
Expand Down
Loading

0 comments on commit f98bb5a

Please sign in to comment.