@lobehub/chat 1.70.11 → 1.71.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (74) hide show
  1. package/.github/workflows/sync-database-schema.yml +25 -0
  2. package/CHANGELOG.md +58 -0
  3. package/changelog/v1.json +21 -0
  4. package/docs/developer/database-schema.dbml +569 -0
  5. package/locales/ar/components.json +1 -0
  6. package/locales/ar/models.json +6 -0
  7. package/locales/bg-BG/components.json +1 -0
  8. package/locales/bg-BG/models.json +6 -0
  9. package/locales/de-DE/components.json +1 -0
  10. package/locales/de-DE/models.json +6 -0
  11. package/locales/en-US/components.json +1 -0
  12. package/locales/en-US/models.json +6 -0
  13. package/locales/es-ES/components.json +1 -0
  14. package/locales/es-ES/models.json +6 -0
  15. package/locales/fa-IR/components.json +1 -0
  16. package/locales/fa-IR/models.json +6 -0
  17. package/locales/fr-FR/components.json +1 -0
  18. package/locales/fr-FR/models.json +6 -0
  19. package/locales/it-IT/components.json +1 -0
  20. package/locales/it-IT/models.json +6 -0
  21. package/locales/ja-JP/components.json +1 -0
  22. package/locales/ja-JP/models.json +6 -0
  23. package/locales/ko-KR/components.json +1 -0
  24. package/locales/ko-KR/models.json +6 -0
  25. package/locales/nl-NL/components.json +1 -0
  26. package/locales/nl-NL/models.json +6 -0
  27. package/locales/pl-PL/components.json +1 -0
  28. package/locales/pl-PL/models.json +6 -0
  29. package/locales/pt-BR/components.json +1 -0
  30. package/locales/pt-BR/models.json +6 -0
  31. package/locales/ru-RU/components.json +1 -0
  32. package/locales/ru-RU/models.json +6 -0
  33. package/locales/tr-TR/components.json +1 -0
  34. package/locales/tr-TR/models.json +6 -0
  35. package/locales/vi-VN/components.json +1 -0
  36. package/locales/vi-VN/models.json +6 -0
  37. package/locales/zh-CN/components.json +1 -0
  38. package/locales/zh-CN/models.json +6 -0
  39. package/locales/zh-TW/components.json +1 -0
  40. package/locales/zh-TW/models.json +6 -0
  41. package/package.json +6 -2
  42. package/scripts/dbmlWorkflow/index.ts +11 -0
  43. package/src/components/ModelSelect/index.tsx +16 -0
  44. package/src/config/aiModels/google.ts +36 -0
  45. package/src/config/aiModels/vertexai.ts +24 -6
  46. package/src/config/modelProviders/vertexai.ts +1 -1
  47. package/src/database/client/migrations.json +4 -4
  48. package/src/database/server/models/message.ts +20 -9
  49. package/src/database/server/models/user.test.ts +58 -0
  50. package/src/features/AlertBanner/CloudBanner.tsx +1 -1
  51. package/src/features/Conversation/Messages/Assistant/index.tsx +4 -1
  52. package/src/features/Conversation/Messages/User/index.tsx +4 -4
  53. package/src/libs/agent-runtime/google/index.ts +23 -5
  54. package/src/libs/agent-runtime/utils/streams/google-ai.test.ts +189 -0
  55. package/src/libs/agent-runtime/utils/streams/google-ai.ts +70 -23
  56. package/src/libs/agent-runtime/utils/streams/index.ts +1 -0
  57. package/src/libs/agent-runtime/utils/streams/protocol.ts +2 -0
  58. package/src/locales/default/components.ts +1 -0
  59. package/src/services/chat.ts +33 -15
  60. package/src/services/file/client.ts +3 -1
  61. package/src/services/message/server.ts +2 -2
  62. package/src/services/message/type.ts +2 -2
  63. package/src/services/upload.ts +82 -1
  64. package/src/store/chat/slices/aiChat/actions/generateAIChat.ts +44 -4
  65. package/src/store/chat/slices/message/action.ts +3 -0
  66. package/src/store/file/slices/upload/action.ts +36 -13
  67. package/src/store/file/store.ts +2 -0
  68. package/src/types/aiModel.ts +4 -1
  69. package/src/types/files/upload.ts +7 -0
  70. package/src/types/message/base.ts +22 -1
  71. package/src/types/message/chat.ts +1 -6
  72. package/src/types/message/image.ts +11 -0
  73. package/src/types/message/index.ts +1 -0
  74. package/src/utils/fetch/fetchSSE.ts +24 -1
@@ -833,6 +833,12 @@
833
833
  "gemini-2.0-flash-001": {
834
834
  "description": "Gemini 2.0 Flash предлага следващо поколение функции и подобрения, включително изключителна скорост, нативна употреба на инструменти, многомодално генериране и контекстен прозорец от 1M токена."
835
835
  },
836
+ "gemini-2.0-flash-exp": {
837
+ "description": "Gemini 2.0 Flash моделна вариация, оптимизирана за икономичност и ниска латентност."
838
+ },
839
+ "gemini-2.0-flash-exp-image-generation": {
840
+ "description": "Gemini 2.0 Flash експериментален модел, който поддържа генериране на изображения"
841
+ },
836
842
  "gemini-2.0-flash-lite": {
837
843
  "description": "Gemini 2.0 Flash е вариант на модела, оптимизиран за икономичност и ниска латентност."
838
844
  },
@@ -76,6 +76,7 @@
76
76
  "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.",
77
77
  "file": "Dieses Modell unterstützt das Hochladen von Dateien und deren Erkennung.",
78
78
  "functionCall": "Dieses Modell unterstützt Funktionsaufrufe.",
79
+ "imageOutput": "Dieses Modell unterstützt die Generierung von Bildern",
79
80
  "reasoning": "Dieses Modell unterstützt tiefes Denken",
80
81
  "search": "Dieses Modell unterstützt die Online-Suche",
81
82
  "tokens": "Dieses Modell unterstützt maximal {{tokens}} Tokens pro Sitzung.",
@@ -833,6 +833,12 @@
833
833
  "gemini-2.0-flash-001": {
834
834
  "description": "Gemini 2.0 Flash bietet nächste Generation Funktionen und Verbesserungen, einschließlich außergewöhnlicher Geschwindigkeit, nativer Werkzeugnutzung, multimodaler Generierung und einem Kontextfenster von 1M Tokens."
835
835
  },
836
+ "gemini-2.0-flash-exp": {
837
+ "description": "Gemini 2.0 Flash-Modellvariante, die auf Kosteneffizienz und niedrige Latenz optimiert ist."
838
+ },
839
+ "gemini-2.0-flash-exp-image-generation": {
840
+ "description": "Gemini 2.0 Flash Experimentmodell, das die Bildgenerierung unterstützt"
841
+ },
836
842
  "gemini-2.0-flash-lite": {
837
843
  "description": "Gemini 2.0 Flash ist eine Modellvariante, die auf Kosteneffizienz und niedrige Latenz optimiert ist."
838
844
  },
@@ -76,6 +76,7 @@
76
76
  "custom": "Custom model, by default, supports both function call and visual recognition. Please verify the availability of the above capabilities based on actual situations.",
77
77
  "file": "This model supports file upload for reading and recognition.",
78
78
  "functionCall": "This model supports function call.",
79
+ "imageOutput": "This model supports image generation",
79
80
  "reasoning": "This model supports deep thinking",
80
81
  "search": "This model supports online search",
81
82
  "tokens": "This model supports up to {{tokens}} tokens in a single session.",
@@ -833,6 +833,12 @@
833
833
  "gemini-2.0-flash-001": {
834
834
  "description": "Gemini 2.0 Flash offers next-generation features and improvements, including exceptional speed, native tool usage, multimodal generation, and a 1M token context window."
835
835
  },
836
+ "gemini-2.0-flash-exp": {
837
+ "description": "Gemini 2.0 Flash model variant optimized for cost-effectiveness and low latency."
838
+ },
839
+ "gemini-2.0-flash-exp-image-generation": {
840
+ "description": "Gemini 2.0 Flash experimental model, supports image generation"
841
+ },
836
842
  "gemini-2.0-flash-lite": {
837
843
  "description": "Gemini 2.0 Flash is a variant of the model optimized for cost-effectiveness and low latency."
838
844
  },
@@ -76,6 +76,7 @@
76
76
  "custom": "Modelo personalizado: admite llamadas de función y reconocimiento visual. Verifique la disponibilidad de estas capacidades según sea necesario.",
77
77
  "file": "Este modelo admite la carga y reconocimiento de archivos.",
78
78
  "functionCall": "Este modelo admite llamadas de función.",
79
+ "imageOutput": "Este modelo admite la generación de imágenes",
79
80
  "reasoning": "Este modelo admite un pensamiento profundo",
80
81
  "search": "Este modelo admite búsqueda en línea",
81
82
  "tokens": "Este modelo admite un máximo de {{tokens}} tokens por sesión.",
@@ -833,6 +833,12 @@
833
833
  "gemini-2.0-flash-001": {
834
834
  "description": "Gemini 2.0 Flash ofrece funciones y mejoras de próxima generación, incluyendo velocidad excepcional, uso de herramientas nativas, generación multimodal y una ventana de contexto de 1M tokens."
835
835
  },
836
+ "gemini-2.0-flash-exp": {
837
+ "description": "Variante del modelo Gemini 2.0 Flash, optimizada para objetivos como la rentabilidad y la baja latencia."
838
+ },
839
+ "gemini-2.0-flash-exp-image-generation": {
840
+ "description": "Modelo experimental Gemini 2.0 Flash, que admite la generación de imágenes"
841
+ },
836
842
  "gemini-2.0-flash-lite": {
837
843
  "description": "Variante del modelo Gemini 2.0 Flash, optimizada para objetivos como la rentabilidad y la baja latencia."
838
844
  },
@@ -76,6 +76,7 @@
76
76
  "custom": "مدل سفارشی، تنظیمات پیش‌فرض از فراخوانی توابع و تشخیص بصری پشتیبانی می‌کند، لطفاً قابلیت‌های فوق را بر اساس شرایط واقعی بررسی کنید",
77
77
  "file": "این مدل از بارگذاری و شناسایی فایل‌ها پشتیبانی می‌کند",
78
78
  "functionCall": "این مدل از فراخوانی توابع (Function Call) پشتیبانی می‌کند",
79
+ "imageOutput": "این مدل از تولید تصویر پشتیبانی می‌کند",
79
80
  "reasoning": "این مدل از تفکر عمیق پشتیبانی می‌کند",
80
81
  "search": "این مدل از جستجوی آنلاین پشتیبانی می‌کند",
81
82
  "tokens": "این مدل در هر جلسه حداکثر از {{tokens}} توکن پشتیبانی می‌کند",
@@ -833,6 +833,12 @@
833
833
  "gemini-2.0-flash-001": {
834
834
  "description": "Gemini 2.0 Flash ویژگی‌ها و بهبودهای نسل بعدی را ارائه می‌دهد، از جمله سرعت عالی، استفاده از ابزارهای بومی، تولید چندرسانه‌ای و پنجره متن 1M توکن."
835
835
  },
836
+ "gemini-2.0-flash-exp": {
837
+ "description": "مدل متغیر Gemini 2.0 Flash که برای بهینه‌سازی هزینه و تأخیر کم طراحی شده است."
838
+ },
839
+ "gemini-2.0-flash-exp-image-generation": {
840
+ "description": "مدل آزمایشی Gemini 2.0 Flash، از تولید تصویر پشتیبانی می‌کند"
841
+ },
836
842
  "gemini-2.0-flash-lite": {
837
843
  "description": "مدل متغیر Gemini 2.0 Flash برای بهینه‌سازی هزینه و تأخیر کم طراحی شده است."
838
844
  },
@@ -76,6 +76,7 @@
76
76
  "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.",
77
77
  "file": "Ce modèle prend en charge la lecture et la reconnaissance de fichiers téléchargés.",
78
78
  "functionCall": "Ce modèle prend en charge les appels de fonction.",
79
+ "imageOutput": "Ce modèle prend en charge la génération d'images",
79
80
  "reasoning": "Ce modèle prend en charge une réflexion approfondie",
80
81
  "search": "Ce modèle prend en charge la recherche en ligne",
81
82
  "tokens": "Ce modèle prend en charge jusqu'à {{tokens}} jetons par session.",
@@ -833,6 +833,12 @@
833
833
  "gemini-2.0-flash-001": {
834
834
  "description": "Gemini 2.0 Flash propose des fonctionnalités et des améliorations de nouvelle génération, y compris une vitesse exceptionnelle, l'utilisation d'outils natifs, la génération multimodale et une fenêtre de contexte de 1M tokens."
835
835
  },
836
+ "gemini-2.0-flash-exp": {
837
+ "description": "Modèle variant Gemini 2.0 Flash, optimisé pour des objectifs tels que le rapport coût-efficacité et la faible latence."
838
+ },
839
+ "gemini-2.0-flash-exp-image-generation": {
840
+ "description": "Modèle expérimental Gemini 2.0 Flash, prenant en charge la génération d'images"
841
+ },
836
842
  "gemini-2.0-flash-lite": {
837
843
  "description": "Une variante du modèle Gemini 2.0 Flash, optimisée pour des objectifs tels que le rapport coût-efficacité et la faible latence."
838
844
  },
@@ -76,6 +76,7 @@
76
76
  "custom": "Modello personalizzato: di default supporta sia la chiamata di funzioni che il riconoscimento visivo. Verifica l'effettiva disponibilità di tali funzionalità.",
77
77
  "file": "Questo modello supporta il caricamento e il riconoscimento di file.",
78
78
  "functionCall": "Questo modello supporta la chiamata di funzioni.",
79
+ "imageOutput": "Questo modello supporta la generazione di immagini",
79
80
  "reasoning": "Questo modello supporta un pensiero profondo",
80
81
  "search": "Questo modello supporta la ricerca online",
81
82
  "tokens": "Questo modello supporta un massimo di {{tokens}} token per sessione.",
@@ -833,6 +833,12 @@
833
833
  "gemini-2.0-flash-001": {
834
834
  "description": "Gemini 2.0 Flash offre funzionalità e miglioramenti di nuova generazione, tra cui velocità eccezionale, utilizzo di strumenti nativi, generazione multimodale e una finestra di contesto di 1M token."
835
835
  },
836
+ "gemini-2.0-flash-exp": {
837
+ "description": "Gemini 2.0 Flash è una variante del modello ottimizzata per obiettivi come il rapporto costo-efficacia e la bassa latenza."
838
+ },
839
+ "gemini-2.0-flash-exp-image-generation": {
840
+ "description": "Modello sperimentale Gemini 2.0 Flash, supporta la generazione di immagini"
841
+ },
836
842
  "gemini-2.0-flash-lite": {
837
843
  "description": "Gemini 2.0 Flash è una variante del modello Flash, ottimizzata per obiettivi come il rapporto costo-efficacia e la bassa latenza."
838
844
  },
@@ -76,6 +76,7 @@
76
76
  "custom": "カスタムモデル、デフォルトでは関数呼び出しとビジョン認識の両方をサポートしています。上記機能の有効性を確認してください。",
77
77
  "file": "このモデルはファイルのアップロードと認識をサポートしています。",
78
78
  "functionCall": "このモデルは関数呼び出し(Function Call)をサポートしています。",
79
+ "imageOutput": "このモデルは画像生成をサポートしています",
79
80
  "reasoning": "このモデルは深い思考をサポートしています",
80
81
  "search": "このモデルはオンライン検索をサポートしています",
81
82
  "tokens": "このモデルは1つのセッションあたり最大{{tokens}}トークンをサポートしています。",
@@ -833,6 +833,12 @@
833
833
  "gemini-2.0-flash-001": {
834
834
  "description": "Gemini 2.0 Flashは、卓越した速度、ネイティブツールの使用、マルチモーダル生成、1Mトークンのコンテキストウィンドウを含む次世代の機能と改善を提供します。"
835
835
  },
836
+ "gemini-2.0-flash-exp": {
837
+ "description": "Gemini 2.0 Flash モデルのバリアントで、コスト効率と低遅延などの目標に最適化されています。"
838
+ },
839
+ "gemini-2.0-flash-exp-image-generation": {
840
+ "description": "Gemini 2.0 Flash 実験モデル、画像生成をサポート"
841
+ },
836
842
  "gemini-2.0-flash-lite": {
837
843
  "description": "Gemini 2.0 Flashモデルのバリアントで、コスト効率と低遅延などの目標に最適化されています。"
838
844
  },
@@ -76,6 +76,7 @@
76
76
  "custom": "사용자 정의 모델, 기본적으로 함수 호출 및 시각 인식을 모두 지원하며, 실제 기능을 확인하세요",
77
77
  "file": "이 모델은 파일 업로드 및 인식을 지원합니다",
78
78
  "functionCall": "이 모델은 함수 호출을 지원합니다",
79
+ "imageOutput": "이 모델은 이미지를 생성하는 기능을 지원합니다.",
79
80
  "reasoning": "이 모델은 깊이 있는 사고를 지원합니다.",
80
81
  "search": "이 모델은 온라인 검색을 지원합니다.",
81
82
  "tokens": "이 모델은 단일 세션당 최대 {{tokens}} 토큰을 지원합니다",
@@ -833,6 +833,12 @@
833
833
  "gemini-2.0-flash-001": {
834
834
  "description": "Gemini 2.0 Flash는 뛰어난 속도, 원주율 도구 사용, 다중 모달 생성 및 1M 토큰 문맥 창을 포함한 차세대 기능과 개선 사항을 제공합니다."
835
835
  },
836
+ "gemini-2.0-flash-exp": {
837
+ "description": "Gemini 2.0 Flash 모델 변형으로, 비용 효율성과 저지연 등의 목표를 위해 최적화되었습니다."
838
+ },
839
+ "gemini-2.0-flash-exp-image-generation": {
840
+ "description": "Gemini 2.0 Flash 실험 모델, 이미지 생성을 지원합니다."
841
+ },
836
842
  "gemini-2.0-flash-lite": {
837
843
  "description": "Gemini 2.0 플래시 모델 변형으로, 비용 효율성과 낮은 지연 시간 등의 목표를 위해 최적화되었습니다."
838
844
  },
@@ -76,6 +76,7 @@
76
76
  "custom": "Custom model, by default, supports both function call and visual recognition. Please verify the availability of the above capabilities based on actual needs.",
77
77
  "file": "This model supports file upload for reading and recognition.",
78
78
  "functionCall": "This model supports function call.",
79
+ "imageOutput": "Dit model ondersteunt het genereren van afbeeldingen",
79
80
  "reasoning": "Dit model ondersteunt diepgaand denken",
80
81
  "search": "Dit model ondersteunt online zoeken",
81
82
  "tokens": "This model supports up to {{tokens}} tokens in a single session.",
@@ -833,6 +833,12 @@
833
833
  "gemini-2.0-flash-001": {
834
834
  "description": "Gemini 2.0 Flash biedt next-gen functies en verbeteringen, waaronder uitstekende snelheid, native toolgebruik, multimodale generatie en een contextvenster van 1M tokens."
835
835
  },
836
+ "gemini-2.0-flash-exp": {
837
+ "description": "Gemini 2.0 Flash modelvariant, geoptimaliseerd voor kosteneffectiviteit en lage latentie."
838
+ },
839
+ "gemini-2.0-flash-exp-image-generation": {
840
+ "description": "Gemini 2.0 Flash experimenteel model, ondersteunt afbeeldingsgeneratie"
841
+ },
836
842
  "gemini-2.0-flash-lite": {
837
843
  "description": "Gemini 2.0 Flash is een modelvariant die is geoptimaliseerd voor kosteneffectiviteit en lage latentie."
838
844
  },
@@ -76,6 +76,7 @@
76
76
  "custom": "Niestandardowy model, domyślnie obsługujący zarówno wywołania funkcji, jak i rozpoznawanie wizualne. Proszę zweryfikować możliwość użycia tych funkcji w praktyce.",
77
77
  "file": "Ten model obsługuje wczytywanie plików i rozpoznawanie",
78
78
  "functionCall": "Ten model obsługuje wywołania funkcji (Function Call).",
79
+ "imageOutput": "Ten model wspiera generowanie obrazów",
79
80
  "reasoning": "Ten model wspiera głębokie myślenie",
80
81
  "search": "Ten model wspiera wyszukiwanie w sieci",
81
82
  "tokens": "Ten model obsługuje maksymalnie {{tokens}} tokenów w pojedynczej sesji.",
@@ -833,6 +833,12 @@
833
833
  "gemini-2.0-flash-001": {
834
834
  "description": "Gemini 2.0 Flash oferuje funkcje i ulepszenia nowej generacji, w tym doskonałą prędkość, natywne korzystanie z narzędzi, generowanie multimodalne oraz okno kontekstowe o długości 1M tokenów."
835
835
  },
836
+ "gemini-2.0-flash-exp": {
837
+ "description": "Gemini 2.0 Flash to wariant modelu, zoptymalizowany pod kątem efektywności kosztowej i niskiego opóźnienia."
838
+ },
839
+ "gemini-2.0-flash-exp-image-generation": {
840
+ "description": "Model eksperymentalny Gemini 2.0 Flash, wspierający generowanie obrazów"
841
+ },
836
842
  "gemini-2.0-flash-lite": {
837
843
  "description": "Gemini 2.0 Flash to wariant modelu, zoptymalizowany pod kątem efektywności kosztowej i niskiego opóźnienia."
838
844
  },
@@ -76,6 +76,7 @@
76
76
  "custom": "Modelo personalizado, por padrão, suporta chamadas de função e reconhecimento visual. Por favor, verifique a disponibilidade dessas capacidades de acordo com a situação real.",
77
77
  "file": "Este modelo suporta leitura e reconhecimento de arquivos enviados.",
78
78
  "functionCall": "Este modelo suporta chamadas de função.",
79
+ "imageOutput": "Este modelo suporta a geração de imagens",
79
80
  "reasoning": "Este modelo suporta pensamento profundo",
80
81
  "search": "Este modelo suporta pesquisa online",
81
82
  "tokens": "Este modelo suporta no máximo {{tokens}} tokens por sessão.",
@@ -833,6 +833,12 @@
833
833
  "gemini-2.0-flash-001": {
834
834
  "description": "Gemini 2.0 Flash oferece funcionalidades e melhorias de próxima geração, incluindo velocidade excepcional, uso nativo de ferramentas, geração multimodal e uma janela de contexto de 1M tokens."
835
835
  },
836
+ "gemini-2.0-flash-exp": {
837
+ "description": "Variante do modelo Gemini 2.0 Flash, otimizada para custo-benefício e baixa latência."
838
+ },
839
+ "gemini-2.0-flash-exp-image-generation": {
840
+ "description": "Modelo experimental Gemini 2.0 Flash, suporta geração de imagens"
841
+ },
836
842
  "gemini-2.0-flash-lite": {
837
843
  "description": "Variante do modelo Gemini 2.0 Flash, otimizada para custo-benefício e baixa latência."
838
844
  },
@@ -76,6 +76,7 @@
76
76
  "custom": "Пользовательская модель по умолчанию поддерживает как вызов функций, так и распознавание изображений. Пожалуйста, проверьте доступность указанных возможностей в вашем случае",
77
77
  "file": "Эта модель поддерживает загрузку и распознавание файлов",
78
78
  "functionCall": "Эта модель поддерживает вызов функций",
79
+ "imageOutput": "Эта модель поддерживает генерацию изображений",
79
80
  "reasoning": "Эта модель поддерживает глубокое мышление",
80
81
  "search": "Эта модель поддерживает поиск в интернете",
81
82
  "tokens": "Эта модель поддерживает до {{tokens}} токенов в одной сессии",
@@ -833,6 +833,12 @@
833
833
  "gemini-2.0-flash-001": {
834
834
  "description": "Gemini 2.0 Flash предлагает функции следующего поколения и улучшения, включая выдающуюся скорость, использование встроенных инструментов, многомодальную генерацию и контекстное окно на 1M токенов."
835
835
  },
836
+ "gemini-2.0-flash-exp": {
837
+ "description": "Модельный вариант Gemini 2.0 Flash, оптимизированный для достижения таких целей, как экономическая эффективность и низкая задержка."
838
+ },
839
+ "gemini-2.0-flash-exp-image-generation": {
840
+ "description": "Экспериментальная модель Gemini 2.0 Flash, поддерживающая генерацию изображений"
841
+ },
836
842
  "gemini-2.0-flash-lite": {
837
843
  "description": "Модельный вариант Gemini 2.0 Flash, оптимизированный для достижения таких целей, как экономическая эффективность и низкая задержка."
838
844
  },
@@ -76,6 +76,7 @@
76
76
  "custom": "Özel model, varsayılan olarak hem fonksiyon çağrısını hem de görüntü tanımayı destekler, yukarıdaki yeteneklerin kullanılabilirliğini doğrulamak için lütfen gerçek durumu kontrol edin",
77
77
  "file": "Bu model dosya yükleme ve tanımayı destekler",
78
78
  "functionCall": "Bu model fonksiyon çağrısını destekler",
79
+ "imageOutput": "Bu model resim oluşturmayı destekler",
79
80
  "reasoning": "Bu model derin düşünmeyi destekler",
80
81
  "search": "Bu model çevrimiçi aramayı destekler",
81
82
  "tokens": "Bu model tek bir oturumda en fazla {{tokens}} Token destekler",
@@ -833,6 +833,12 @@
833
833
  "gemini-2.0-flash-001": {
834
834
  "description": "Gemini 2.0 Flash, mükemmel hız, yerel araç kullanımı, çok modlu üretim ve 1M token bağlam penceresi dahil olmak üzere bir sonraki nesil özellikler ve iyileştirmeler sunar."
835
835
  },
836
+ "gemini-2.0-flash-exp": {
837
+ "description": "Gemini 2.0 Flash modeli varyantı, maliyet etkinliği ve düşük gecikme gibi hedefler için optimize edilmiştir."
838
+ },
839
+ "gemini-2.0-flash-exp-image-generation": {
840
+ "description": "Gemini 2.0 Flash deneysel modeli, görüntü oluşturmayı destekler"
841
+ },
836
842
  "gemini-2.0-flash-lite": {
837
843
  "description": "Gemini 2.0 Flash model varyantı, maliyet etkinliği ve düşük gecikme gibi hedefler için optimize edilmiştir."
838
844
  },
@@ -76,6 +76,7 @@
76
76
  "custom": "Mô hình tùy chỉnh, mặc định hỗ trợ cả cuộc gọi hàm và nhận diện hình ảnh, vui lòng xác minh khả năng sử dụng của chúng theo tình hình cụ thể",
77
77
  "file": "Mô hình này hỗ trợ tải lên và nhận diện tệp",
78
78
  "functionCall": "Mô hình này hỗ trợ cuộc gọi hàm (Function Call)",
79
+ "imageOutput": "Mô hình này hỗ trợ tạo ra hình ảnh",
79
80
  "reasoning": "Mô hình này hỗ trợ tư duy sâu sắc",
80
81
  "search": "Mô hình này hỗ trợ tìm kiếm trực tuyến",
81
82
  "tokens": "Mỗi phiên của mô hình này hỗ trợ tối đa {{tokens}} Tokens",
@@ -833,6 +833,12 @@
833
833
  "gemini-2.0-flash-001": {
834
834
  "description": "Gemini 2.0 Flash cung cấp các tính năng và cải tiến thế hệ tiếp theo, bao gồm tốc độ vượt trội, sử dụng công cụ bản địa, tạo đa phương tiện và cửa sổ ngữ cảnh 1M token."
835
835
  },
836
+ "gemini-2.0-flash-exp": {
837
+ "description": "Biến thể mô hình Gemini 2.0 Flash, được tối ưu hóa cho hiệu quả chi phí và độ trễ thấp."
838
+ },
839
+ "gemini-2.0-flash-exp-image-generation": {
840
+ "description": "Mô hình thử nghiệm Gemini 2.0 Flash, hỗ trợ tạo hình ảnh"
841
+ },
836
842
  "gemini-2.0-flash-lite": {
837
843
  "description": "Biến thể mô hình Gemini 2.0 Flash được tối ưu hóa cho hiệu quả chi phí và độ trễ thấp."
838
844
  },
@@ -76,6 +76,7 @@
76
76
  "custom": "自定义模型,默认设定同时支持函数调用与视觉识别,请根据实际情况验证上述能力的可用性",
77
77
  "file": "该模型支持上传文件读取与识别",
78
78
  "functionCall": "该模型支持函数调用(Function Call)",
79
+ "imageOutput": "该模型支持生成图片",
79
80
  "reasoning": "该模型支持深度思考",
80
81
  "search": "该模型支持联网搜索",
81
82
  "tokens": "该模型单个会话最多支持 {{tokens}} Tokens",
@@ -833,6 +833,12 @@
833
833
  "gemini-2.0-flash-001": {
834
834
  "description": "Gemini 2.0 Flash 提供下一代功能和改进,包括卓越的速度、原生工具使用、多模态生成和1M令牌上下文窗口。"
835
835
  },
836
+ "gemini-2.0-flash-exp": {
837
+ "description": "Gemini 2.0 Flash 模型变体,针对成本效益和低延迟等目标进行了优化。"
838
+ },
839
+ "gemini-2.0-flash-exp-image-generation": {
840
+ "description": "Gemini 2.0 Flash 实验模型,支持图像生成"
841
+ },
836
842
  "gemini-2.0-flash-lite": {
837
843
  "description": "Gemini 2.0 Flash 模型变体,针对成本效益和低延迟等目标进行了优化。"
838
844
  },
@@ -76,6 +76,7 @@
76
76
  "custom": "自訂模型,預設支援函式呼叫與視覺辨識,請根據實際情況驗證上述能力的可用性",
77
77
  "file": "該模型支援上傳檔案讀取與辨識",
78
78
  "functionCall": "該模型支援函式呼叫(Function Call)",
79
+ "imageOutput": "該模型支援生成圖片",
79
80
  "reasoning": "該模型支持深度思考",
80
81
  "search": "該模型支援聯網搜尋",
81
82
  "tokens": "該模型單一會話最多支援 {{tokens}} Tokens",
@@ -833,6 +833,12 @@
833
833
  "gemini-2.0-flash-001": {
834
834
  "description": "Gemini 2.0 Flash 提供下一代功能和改進,包括卓越的速度、原生工具使用、多模態生成和1M令牌上下文窗口。"
835
835
  },
836
+ "gemini-2.0-flash-exp": {
837
+ "description": "Gemini 2.0 Flash 模型變體,針對成本效益和低延遲等目標進行了優化。"
838
+ },
839
+ "gemini-2.0-flash-exp-image-generation": {
840
+ "description": "Gemini 2.0 Flash 實驗模型,支持圖像生成"
841
+ },
836
842
  "gemini-2.0-flash-lite": {
837
843
  "description": "Gemini 2.0 Flash 模型變體,針對成本效益和低延遲等目標進行了優化。"
838
844
  },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lobehub/chat",
3
- "version": "1.70.11",
3
+ "version": "1.71.1",
4
4
  "description": "Lobe Chat - an open-source, high-performance chatbot framework that supports speech synthesis, multimodal, and extensible Function Call plugin system. Supports one-click free deployment of your private ChatGPT/LLM web application.",
5
5
  "keywords": [
6
6
  "framework",
@@ -35,12 +35,13 @@
35
35
  "build-sitemap": "tsx ./scripts/buildSitemapIndex/index.ts",
36
36
  "build:analyze": "ANALYZE=true next build",
37
37
  "build:docker": "DOCKER=true next build && npm run build-sitemap",
38
- "db:generate": "drizzle-kit generate && npm run db:generate-client",
38
+ "db:generate": "drizzle-kit generate && npm run db:generate-client && npm run workflow:dbml",
39
39
  "db:generate-client": "tsx ./scripts/migrateClientDB/compile-migrations.ts",
40
40
  "db:migrate": "MIGRATION_DB=1 tsx ./scripts/migrateServerDB/index.ts",
41
41
  "db:push": "drizzle-kit push",
42
42
  "db:push-test": "NODE_ENV=test drizzle-kit push",
43
43
  "db:studio": "drizzle-kit studio",
44
+ "db:visualize": "dbdocs build docs/developer/database-schema.dbml --project lobe-chat",
44
45
  "db:z-pull": "drizzle-kit introspect",
45
46
  "dev": "next dev --turbopack -p 3010",
46
47
  "docs:i18n": "lobe-i18n md && npm run lint:md && npm run lint:mdx",
@@ -72,6 +73,7 @@
72
73
  "workflow:cdn": "tsx ./scripts/cdnWorkflow/index.ts",
73
74
  "workflow:changelog": "tsx ./scripts/changelogWorkflow/index.ts",
74
75
  "workflow:countCharters": "tsx scripts/countEnWord.ts",
76
+ "workflow:dbml": "tsx ./scripts/dbmlWorkflow/index.ts",
75
77
  "workflow:docs": "tsx ./scripts/docsWorkflow/index.ts",
76
78
  "workflow:i18n": "tsx ./scripts/i18nWorkflow/index.ts",
77
79
  "workflow:mdx": "tsx ./scripts/mdxWorkflow/index.ts",
@@ -289,8 +291,10 @@
289
291
  "commitlint": "^19.6.1",
290
292
  "consola": "^3.3.3",
291
293
  "crypto-js": "^4.2.0",
294
+ "dbdocs": "^0.14.3",
292
295
  "dotenv": "^16.4.7",
293
296
  "dpdm-fast": "^1.0.7",
297
+ "drizzle-dbml-generator": "^0.10.0",
294
298
  "drizzle-kit": "^0.30.1",
295
299
  "eslint": "^8.57.1",
296
300
  "eslint-plugin-mdx": "^3.1.5",
@@ -0,0 +1,11 @@
1
+ import { pgGenerate } from 'drizzle-dbml-generator';
2
+ import { join } from 'node:path';
3
+
4
+ import * as schema from '../../src/database/schemas';
5
+
6
+ const out = join(__dirname,'../../docs/developer/database-schema.dbml');
7
+ const relational = true;
8
+
9
+ pgGenerate({ out, relational, schema });
10
+
11
+ console.log('🏁 dbml generated successful!');
@@ -7,6 +7,7 @@ import {
7
7
  AtomIcon,
8
8
  LucideEye,
9
9
  LucideGlobe,
10
+ LucideImage,
10
11
  LucidePaperclip,
11
12
  ToyBrick,
12
13
  } from 'lucide-react';
@@ -56,6 +57,10 @@ const useStyles = createStyles(({ css, token, isDarkMode }) => ({
56
57
  color: ${token.green};
57
58
  background: ${token.green1};
58
59
  `,
60
+ tagGreenDeep: css`
61
+ color: ${token.green9};
62
+ background: ${token.green3};
63
+ `,
59
64
  tagPurple: css`
60
65
  color: ${token.purple};
61
66
  background: ${token.purple1};
@@ -98,6 +103,17 @@ export const ModelInfoTags = memo<ModelInfoTagsProps>(
98
103
  </div>
99
104
  </Tooltip>
100
105
  )}
106
+ {model.imageOutput && (
107
+ <Tooltip
108
+ placement={placement}
109
+ styles={{ root: { pointerEvents: 'none' } }}
110
+ title={t('ModelSelect.featureTag.imageOutput')}
111
+ >
112
+ <div className={cx(styles.tag, styles.tagGreen)} style={{ cursor: 'pointer' }} title="">
113
+ <Icon icon={LucideImage} />
114
+ </div>
115
+ </Tooltip>
116
+ )}
101
117
  {model.vision && (
102
118
  <Tooltip
103
119
  placement={placement}
@@ -92,6 +92,42 @@ const googleChatModels: AIChatModelCard[] = [
92
92
  releasedAt: '2025-02-05',
93
93
  type: 'chat',
94
94
  },
95
+ {
96
+ abilities: {
97
+ imageOutput: true,
98
+ vision: true,
99
+ },
100
+ contextWindowTokens: 32_768,
101
+ description: 'Gemini 2.0 Flash 模型变体,针对成本效益和低延迟等目标进行了优化。',
102
+ displayName: 'Gemini 2.0 Flash Exp',
103
+ enabled: true,
104
+ id: 'gemini-2.0-flash-exp',
105
+ maxOutput: 8192,
106
+ pricing: {
107
+ input: 0,
108
+ output: 0,
109
+ },
110
+ releasedAt: '2025-02-05',
111
+ type: 'chat',
112
+ },
113
+ {
114
+ abilities: {
115
+ imageOutput: true,
116
+ vision: true,
117
+ },
118
+ contextWindowTokens: 32_768,
119
+ description: 'Gemini 2.0 Flash 实验模型,支持图像生成',
120
+ displayName: 'Gemini 2.0 Flash (Image Generation) Experimental',
121
+ enabled: true,
122
+ id: 'gemini-2.0-flash-exp-image-generation',
123
+ maxOutput: 8192,
124
+ pricing: {
125
+ input: 0,
126
+ output: 0,
127
+ },
128
+ releasedAt: '2025-03-14',
129
+ type: 'chat',
130
+ },
95
131
  {
96
132
  abilities: {
97
133
  vision: true,
@@ -35,9 +35,27 @@ const vertexaiChatModels: AIChatModelCard[] = [
35
35
  id: 'gemini-2.0-flash',
36
36
  maxOutput: 8192,
37
37
  pricing: {
38
- cachedInput: 0.025,
39
- input: 0.1,
40
- output: 0.4,
38
+ cachedInput: 0.0375,
39
+ input: 0.15,
40
+ output: 0.6,
41
+ },
42
+ releasedAt: '2025-02-05',
43
+ type: 'chat',
44
+ },
45
+ {
46
+ abilities: {
47
+ functionCall: true,
48
+ vision: true,
49
+ },
50
+ contextWindowTokens: 1_048_576 + 8192,
51
+ description: 'Gemini 2.0 Flash 模型变体,针对成本效益和低延迟等目标进行了优化。',
52
+ displayName: 'Gemini 2.0 Flash-Lite',
53
+ id: 'gemini-2.0-flash-lite',
54
+ maxOutput: 8192,
55
+ pricing: {
56
+ cachedInput: 0.018_75,
57
+ input: 0.075,
58
+ output: 0.3,
41
59
  },
42
60
  releasedAt: '2025-02-05',
43
61
  type: 'chat',
@@ -54,9 +72,9 @@ const vertexaiChatModels: AIChatModelCard[] = [
54
72
  id: 'gemini-2.0-flash-001',
55
73
  maxOutput: 8192,
56
74
  pricing: {
57
- cachedInput: 0.025,
58
- input: 0.1,
59
- output: 0.4,
75
+ cachedInput: 0.0375,
76
+ input: 0.15,
77
+ output: 0.6,
60
78
  },
61
79
  releasedAt: '2025-02-05',
62
80
  type: 'chat',
@@ -11,8 +11,8 @@ const VertexAI: ModelProviderCard = {
11
11
  name: 'VertexAI',
12
12
  settings: {
13
13
  disableBrowserRequest: true,
14
+ showModelFetcher: false,
14
15
  smoothing: {
15
- speed: 2,
16
16
  text: true,
17
17
  },
18
18
  },
@@ -316,12 +316,12 @@
316
316
  },
317
317
  {
318
318
  "sql": [
319
- "CREATE INDEX \"messages_topic_id_idx\" ON \"messages\" USING btree (\"topic_id\");",
320
- "\nCREATE INDEX \"messages_parent_id_idx\" ON \"messages\" USING btree (\"parent_id\");",
321
- "\nCREATE INDEX \"messages_quota_id_idx\" ON \"messages\" USING btree (\"quota_id\");"
319
+ "CREATE INDEX IF NOT EXISTS \"messages_topic_id_idx\" ON \"messages\" USING btree (\"topic_id\");",
320
+ "\nCREATE INDEX IF NOT EXISTS \"messages_parent_id_idx\" ON \"messages\" USING btree (\"parent_id\");",
321
+ "\nCREATE INDEX IF NOT EXISTS \"messages_quota_id_idx\" ON \"messages\" USING btree (\"quota_id\");\n"
322
322
  ],
323
323
  "bps": true,
324
324
  "folderMillis": 1741844738677,
325
- "hash": "f2fc4639bb0b00ca4ed0861d8d3eeaef55810e0e0910f8f3f4277b0912bbe588"
325
+ "hash": "2a7a98be2e49361391444d6fabf3fb5db0bcb6a65e5540e9c3d426ceeb1f7f3a"
326
326
  }
327
327
  ]