mirror of
https://github.com/lobehub/lobe-chat.git
synced 2026-06-13 19:20:04 +00:00
✨ feat: support web page crawl in the search (#6582)
* test pnpm workspace * test bun workspace * add crawler mode * improve pure fetch result * update * improve result * improve code * update * fix * 完成 urlRules 规则集合设计 * 增加爬虫展示 ui * 增加爬虫展示 Portal * update * update * improve * update i18n * support view multi pages * improve implement * improve code * refactor the web-browsing system prompt * improve code * fix open
This commit is contained in:
@@ -467,9 +467,6 @@
|
||||
"anthropic.claude-3-5-sonnet-20241022-v2:0": {
|
||||
"description": "لقد رفع كلود 3.5 سونيت معايير الصناعة، حيث تفوق أداؤه على نماذج المنافسين ونموذج كلود 3 أوبس، وأظهر أداءً ممتازًا في تقييمات واسعة، مع الحفاظ على سرعة وتكلفة نماذجنا المتوسطة."
|
||||
},
|
||||
"anthropic.claude-3-7-sonnet-20250219-v1:0": {
|
||||
"description": "Claude 3.7 Sonnet هو أحدث نموذج من Anthropic، يتميز بأداء ممتاز في تقييمات واسعة، ويتفوق على نماذج المنافسين ونموذج Claude 3.5 Sonnet، مع الحفاظ على سرعة وتكلفة نماذجنا المتوسطة."
|
||||
},
|
||||
"anthropic.claude-3-haiku-20240307-v1:0": {
|
||||
"description": "Claude 3 Haiku هو أسرع وأصغر نموذج من Anthropic، يوفر سرعة استجابة شبه فورية. يمكنه بسرعة الإجابة على الاستفسارات والطلبات البسيطة. سيتمكن العملاء من بناء تجربة ذكاء اصطناعي سلسة تحاكي التفاعل البشري. يمكن لـ Claude 3 Haiku معالجة الصور وإرجاع إخراج نصي، مع نافذة سياقية تبلغ 200K."
|
||||
},
|
||||
@@ -800,6 +797,9 @@
|
||||
"gemini-2.0-flash-001": {
|
||||
"description": "Gemini 2.0 Flash يقدم ميزات وتحسينات من الجيل التالي، بما في ذلك سرعة فائقة، واستخدام أدوات أصلية، وتوليد متعدد الوسائط، ونافذة سياق تصل إلى 1M توكن."
|
||||
},
|
||||
"gemini-2.0-flash-lite-001": {
|
||||
"description": "نموذج جمنّي 2.0 فلاش هو نسخة معدلة، تم تحسينها لتحقيق الكفاءة من حيث التكلفة والحد من التأخير."
|
||||
},
|
||||
"gemini-2.0-flash-lite-preview-02-05": {
|
||||
"description": "نموذج Gemini 2.0 Flash، تم تحسينه لأهداف التكلفة المنخفضة والكمون المنخفض."
|
||||
},
|
||||
@@ -1484,6 +1484,9 @@
|
||||
"qwen-max-latest": {
|
||||
"description": "نموذج لغة ضخم من Qwen بمستوى تريليونات، يدعم إدخال لغات مختلفة مثل الصينية والإنجليزية، وهو النموذج API وراء إصدار Qwen 2.5."
|
||||
},
|
||||
"qwen-omni-turbo-latest": {
|
||||
"description": "تدعم نماذج كيوين-أومني إدخال بيانات متعددة الأنماط، بما في ذلك الفيديو والصوت والصور والنصوص، وتخرج الصوت والنص."
|
||||
},
|
||||
"qwen-plus": {
|
||||
"description": "نموذج لغة ضخم من توغي، نسخة معززة، يدعم إدخال لغات مختلفة مثل الصينية والإنجليزية."
|
||||
},
|
||||
@@ -1676,6 +1679,9 @@
|
||||
"us.anthropic.claude-3-5-sonnet-20241022-v2:0": {
|
||||
"description": "Claude 3.5 Sonnet يرفع المعايير الصناعية، حيث يتفوق على نماذج المنافسين وClaude 3 Opus، ويظهر أداءً ممتازًا في تقييمات واسعة، مع سرعة وتكلفة تتناسب مع نماذجنا المتوسطة."
|
||||
},
|
||||
"us.anthropic.claude-3-7-sonnet-20250219-v1:0": {
|
||||
"description": "كلود 3.7 سونيت هو أسرع نموذج من الجيل التالي من أنثروبيك. مقارنةً بكلود 3 هايكو، تم تحسين كلود 3.7 سونيت في جميع المهارات، وتجاوز العديد من اختبارات الذكاء لأكبر نموذج من الجيل السابق، كلود 3 أوبس."
|
||||
},
|
||||
"whisper-1": {
|
||||
"description": "نموذج التعرف على الصوت العام، يدعم التعرف على الصوت متعدد اللغات، والترجمة الصوتية، والتعرف على اللغات."
|
||||
},
|
||||
|
||||
@@ -140,6 +140,18 @@
|
||||
"close": "حذف",
|
||||
"confirm": "تم تكوينه وإعادة المحاولة"
|
||||
},
|
||||
"crawPages": {
|
||||
"crawling": "جاري التعرف على الروابط",
|
||||
"detail": {
|
||||
"preview": "معاينة",
|
||||
"raw": "النص الأصلي",
|
||||
"tooLong": "محتوى النص طويل جداً، سيتم الاحتفاظ بـ 10000 حرف فقط من سياق المحادثة، ولن يتم احتساب الأجزاء الزائدة في سياق المحادثة"
|
||||
},
|
||||
"meta": {
|
||||
"crawler": "وضع الزحف",
|
||||
"words": "عدد الأحرف"
|
||||
}
|
||||
},
|
||||
"searchxng": {
|
||||
"baseURL": "الرجاء الإدخال",
|
||||
"description": "الرجاء إدخال عنوان URL لـ SearchXNG لبدء البحث عبر الإنترنت",
|
||||
|
||||
@@ -467,9 +467,6 @@
|
||||
"anthropic.claude-3-5-sonnet-20241022-v2:0": {
|
||||
"description": "Claude 3.5 Sonnet повишава индустриалните стандарти, с производителност, надминаваща конкурентните модели и Claude 3 Opus, показвайки отлични резултати в широки оценки, като същевременно предлага скорост и разходи, характерни за нашите модели от среден клас."
|
||||
},
|
||||
"anthropic.claude-3-7-sonnet-20250219-v1:0": {
|
||||
"description": "Claude 3.7 Sonnet повишава индустриалните стандарти, с производителност, надвишаваща конкурентните модели и Claude 3 Opus, с отлични резултати в широки оценки, като същевременно предлага скорост и разходи, характерни за нашите модели от среден клас."
|
||||
},
|
||||
"anthropic.claude-3-haiku-20240307-v1:0": {
|
||||
"description": "Claude 3 Haiku е най-бързият и компактен модел на Anthropic, предлагащ почти мигновена скорост на отговор. Той може бързо да отговаря на прости запитвания и заявки. Клиентите ще могат да изградят безпроблемно AI изживяване, имитиращо човешко взаимодействие. Claude 3 Haiku може да обработва изображения и да връща текстови изходи, с контекстуален прозорец от 200K."
|
||||
},
|
||||
@@ -800,6 +797,9 @@
|
||||
"gemini-2.0-flash-001": {
|
||||
"description": "Gemini 2.0 Flash предлага следващо поколение функции и подобрения, включително изключителна скорост, нативна употреба на инструменти, многомодално генериране и контекстен прозорец от 1M токена."
|
||||
},
|
||||
"gemini-2.0-flash-lite-001": {
|
||||
"description": "Gemini 2.0 Flash е вариант на модела, оптимизиран за икономичност и ниска латентност."
|
||||
},
|
||||
"gemini-2.0-flash-lite-preview-02-05": {
|
||||
"description": "Модел на Gemini 2.0 Flash, оптимизиран за икономичност и ниска латентност."
|
||||
},
|
||||
@@ -1484,6 +1484,9 @@
|
||||
"qwen-max-latest": {
|
||||
"description": "Qwen Max е езиков модел с мащаб от стотици милиарди параметри, който поддържа вход на различни езици, включително китайски и английски. В момента е основният API модел зад версията на продукта Qwen 2.5."
|
||||
},
|
||||
"qwen-omni-turbo-latest": {
|
||||
"description": "Моделите от серията Qwen-Omni поддържат входни данни от множество модалности, включително видео, аудио, изображения и текст, и генерират аудио и текст."
|
||||
},
|
||||
"qwen-plus": {
|
||||
"description": "通义千问(Qwen) е подобрена версия на мащабен езиков модел, който поддържа вход на различни езици, включително китайски и английски."
|
||||
},
|
||||
@@ -1676,6 +1679,9 @@
|
||||
"us.anthropic.claude-3-5-sonnet-20241022-v2:0": {
|
||||
"description": "Claude 3.5 Sonnet повишава индустриалните стандарти, с производителност, надминаваща конкурентните модели и Claude 3 Opus, показвайки отлични резултати в широк спектър от оценки, като същевременно предлага скорост и разходи, сравними с нашите модели от средно ниво."
|
||||
},
|
||||
"us.anthropic.claude-3-7-sonnet-20250219-v1:0": {
|
||||
"description": "Claude 3.7 сонет е най-бързият модел от следващото поколение на Anthropic. В сравнение с Claude 3 Haiku, Claude 3.7 Сонет е подобрен във всички умения и надминава най-големия модел от предишното поколение Claude 3 Opus в много интелектуални тестове."
|
||||
},
|
||||
"whisper-1": {
|
||||
"description": "Универсален модел за разпознаване на реч, поддържащ многоезично разпознаване на реч, превод на реч и разпознаване на езици."
|
||||
},
|
||||
|
||||
@@ -140,6 +140,18 @@
|
||||
"close": "Изтриване",
|
||||
"confirm": "Конфигурацията е завършена и опитайте отново"
|
||||
},
|
||||
"crawPages": {
|
||||
"crawling": "Разпознаване на връзки",
|
||||
"detail": {
|
||||
"preview": "Преглед",
|
||||
"raw": "Оригинален текст",
|
||||
"tooLong": "Съдържанието на текста е твърде дълго, контекстът на разговора запазва само първите 10000 символа, а останалата част не се включва в контекста на разговора"
|
||||
},
|
||||
"meta": {
|
||||
"crawler": "Режим на улавяне",
|
||||
"words": "Брой символи"
|
||||
}
|
||||
},
|
||||
"searchxng": {
|
||||
"baseURL": "Моля, въведете",
|
||||
"description": "Моля, въведете URL адреса на SearchXNG, за да започнете търсене в мрежата",
|
||||
|
||||
@@ -467,9 +467,6 @@
|
||||
"anthropic.claude-3-5-sonnet-20241022-v2:0": {
|
||||
"description": "Claude 3.5 Sonnet setzt neue Maßstäbe in der Branche, übertrifft die Modelle der Konkurrenz und Claude 3 Opus, und zeigt in umfassenden Bewertungen hervorragende Leistungen, während es die Geschwindigkeit und Kosten unserer mittelgroßen Modelle beibehält."
|
||||
},
|
||||
"anthropic.claude-3-7-sonnet-20250219-v1:0": {
|
||||
"description": "Claude 3.7 Sonnet hebt den Branchenstandard an, übertrifft die Modelle der Konkurrenz und Claude 3 Opus, und zeigt in umfassenden Bewertungen hervorragende Leistungen, während es die Geschwindigkeit und Kosten unserer mittelgroßen Modelle beibehält."
|
||||
},
|
||||
"anthropic.claude-3-haiku-20240307-v1:0": {
|
||||
"description": "Claude 3 Haiku ist das schnellste und kompakteste Modell von Anthropic und bietet nahezu sofortige Reaktionsgeschwindigkeiten. Es kann schnell einfache Anfragen und Anforderungen beantworten. Kunden werden in der Lage sein, nahtlose AI-Erlebnisse zu schaffen, die menschliche Interaktionen nachahmen. Claude 3 Haiku kann Bilder verarbeiten und Textausgaben zurückgeben, mit einem Kontextfenster von 200K."
|
||||
},
|
||||
@@ -800,6 +797,9 @@
|
||||
"gemini-2.0-flash-001": {
|
||||
"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."
|
||||
},
|
||||
"gemini-2.0-flash-lite-001": {
|
||||
"description": "Gemini 2.0 Flash ist eine Modellvariante, die auf Kosteneffizienz und niedrige Latenz optimiert ist."
|
||||
},
|
||||
"gemini-2.0-flash-lite-preview-02-05": {
|
||||
"description": "Ein Gemini 2.0 Flash Modell, das auf Kosteneffizienz und niedrige Latenz optimiert wurde."
|
||||
},
|
||||
@@ -1484,6 +1484,9 @@
|
||||
"qwen-max-latest": {
|
||||
"description": "Der Tongyi Qianwen ist ein Sprachmodell mit einem Umfang von mehreren Billionen, das Eingaben in verschiedenen Sprachen wie Chinesisch und Englisch unterstützt und die API-Modelle hinter der aktuellen Version 2.5 von Tongyi Qianwen darstellt."
|
||||
},
|
||||
"qwen-omni-turbo-latest": {
|
||||
"description": "Die Qwen-Omni-Serie unterstützt die Eingabe von Daten in verschiedenen Modalitäten, einschließlich Video, Audio, Bilder und Text, und gibt Audio und Text aus."
|
||||
},
|
||||
"qwen-plus": {
|
||||
"description": "Qwen Plus ist die verbesserte Version des großangelegten Sprachmodells, das Eingaben in verschiedenen Sprachen wie Chinesisch und Englisch unterstützt."
|
||||
},
|
||||
@@ -1676,6 +1679,9 @@
|
||||
"us.anthropic.claude-3-5-sonnet-20241022-v2:0": {
|
||||
"description": "Claude 3.5 Sonnet hebt den Branchenstandard an, übertrifft die Konkurrenzmodelle und Claude 3 Opus und zeigt in umfangreichen Bewertungen hervorragende Leistungen, während es die Geschwindigkeit und Kosten unserer mittelgroßen Modelle beibehält."
|
||||
},
|
||||
"us.anthropic.claude-3-7-sonnet-20250219-v1:0": {
|
||||
"description": "Claude 3.7 Sonett ist das schnellste nächste Modell von Anthropic. Im Vergleich zu Claude 3 Haiku hat Claude 3.7 Sonett in allen Fähigkeiten Verbesserungen erfahren und übertrifft in vielen intellektuellen Benchmark-Tests das größte Modell der vorherigen Generation, Claude 3 Opus."
|
||||
},
|
||||
"whisper-1": {
|
||||
"description": "Allgemeines Spracherkennungsmodell, unterstützt mehrsprachige Spracherkennung, Sprachübersetzung und Spracherkennung."
|
||||
},
|
||||
|
||||
@@ -140,6 +140,18 @@
|
||||
"close": "Löschen",
|
||||
"confirm": "Konfiguration abgeschlossen und erneut versucht"
|
||||
},
|
||||
"crawPages": {
|
||||
"crawling": "Linkerkennung läuft",
|
||||
"detail": {
|
||||
"preview": "Vorschau",
|
||||
"raw": "Ursprünglicher Text",
|
||||
"tooLong": "Der Textinhalt ist zu lang, der Gesprächskontext behält nur die ersten 10000 Zeichen, der übersteigende Teil wird nicht in den Gesprächskontext einbezogen"
|
||||
},
|
||||
"meta": {
|
||||
"crawler": "Crawler-Modus",
|
||||
"words": "Zeichenanzahl"
|
||||
}
|
||||
},
|
||||
"searchxng": {
|
||||
"baseURL": "Bitte eingeben",
|
||||
"description": "Geben Sie die URL von SearchXNG ein, um mit der Online-Suche zu beginnen",
|
||||
|
||||
@@ -467,9 +467,6 @@
|
||||
"anthropic.claude-3-5-sonnet-20241022-v2:0": {
|
||||
"description": "Claude 3.5 Sonnet raises the industry standard, outperforming competing models and Claude 3 Opus, excelling in extensive evaluations while maintaining the speed and cost of our mid-tier models."
|
||||
},
|
||||
"anthropic.claude-3-7-sonnet-20250219-v1:0": {
|
||||
"description": "Claude 3.7 Sonnet is Anthropic's latest model, offering a balance of speed and performance. It excels in a wide range of tasks, including programming, data science, visual processing, and agent tasks."
|
||||
},
|
||||
"anthropic.claude-3-haiku-20240307-v1:0": {
|
||||
"description": "Claude 3 Haiku is Anthropic's fastest and most compact model, providing near-instantaneous response times. It can quickly answer simple queries and requests. Customers will be able to build seamless AI experiences that mimic human interaction. Claude 3 Haiku can process images and return text output, with a context window of 200K."
|
||||
},
|
||||
@@ -800,6 +797,9 @@
|
||||
"gemini-2.0-flash-001": {
|
||||
"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."
|
||||
},
|
||||
"gemini-2.0-flash-lite-001": {
|
||||
"description": "Gemini 2.0 Flash is a variant of the model optimized for cost-effectiveness and low latency."
|
||||
},
|
||||
"gemini-2.0-flash-lite-preview-02-05": {
|
||||
"description": "A Gemini 2.0 Flash model optimized for cost-effectiveness and low latency."
|
||||
},
|
||||
@@ -1484,6 +1484,9 @@
|
||||
"qwen-max-latest": {
|
||||
"description": "Tongyi Qianwen Max is a large-scale language model with hundreds of billions of parameters, supporting input in various languages, including Chinese and English. It is the API model behind the current Tongyi Qianwen 2.5 product version."
|
||||
},
|
||||
"qwen-omni-turbo-latest": {
|
||||
"description": "The Qwen-Omni series of models supports input of various modalities, including video, audio, images, and text, and outputs both audio and text."
|
||||
},
|
||||
"qwen-plus": {
|
||||
"description": "Qwen Plus is an enhanced large-scale language model supporting input in various languages including Chinese and English."
|
||||
},
|
||||
@@ -1676,6 +1679,9 @@
|
||||
"us.anthropic.claude-3-5-sonnet-20241022-v2:0": {
|
||||
"description": "Claude 3.5 Sonnet raises the industry standard, outperforming competitor models and Claude 3 Opus, excelling in a wide range of evaluations while maintaining the speed and cost of our mid-tier models."
|
||||
},
|
||||
"us.anthropic.claude-3-7-sonnet-20250219-v1:0": {
|
||||
"description": "Claude 3.7 Sonnet is Anthropic's fastest next-generation model. Compared to Claude 3 Haiku, Claude 3.7 Sonnet shows improvements across various skills and surpasses the previous generation's largest model, Claude 3 Opus, in many intelligence benchmark tests."
|
||||
},
|
||||
"whisper-1": {
|
||||
"description": "A universal speech recognition model that supports multilingual speech recognition, speech translation, and language identification."
|
||||
},
|
||||
|
||||
@@ -140,6 +140,18 @@
|
||||
"close": "Delete",
|
||||
"confirm": "Configuration completed, please retry"
|
||||
},
|
||||
"crawPages": {
|
||||
"crawling": "Identifying links",
|
||||
"detail": {
|
||||
"preview": "Preview",
|
||||
"raw": "Raw text",
|
||||
"tooLong": "Text content is too long; only the first 10000 characters of the conversation context will be retained, and any excess will not be included in the conversation context."
|
||||
},
|
||||
"meta": {
|
||||
"crawler": "Crawling Mode",
|
||||
"words": "Character count"
|
||||
}
|
||||
},
|
||||
"searchxng": {
|
||||
"baseURL": "Please enter",
|
||||
"description": "Enter the URL for SearchXNG to start online searching",
|
||||
|
||||
@@ -467,9 +467,6 @@
|
||||
"anthropic.claude-3-5-sonnet-20241022-v2:0": {
|
||||
"description": "Claude 3.5 Sonnet ha elevado los estándares de la industria, superando el rendimiento de modelos competidores y de Claude 3 Opus, destacándose en evaluaciones amplias, mientras mantiene la velocidad y el costo de nuestros modelos de nivel medio."
|
||||
},
|
||||
"anthropic.claude-3-7-sonnet-20250219-v1:0": {
|
||||
"description": "Claude 3.7 Sonnet es el modelo de IA más potente de Anthropic, con un rendimiento de vanguardia en tareas altamente complejas. Puede manejar indicaciones abiertas y escenarios no vistos, con una fluidez y comprensión humana excepcionales. Claude 3.7 Sonnet muestra la vanguardia de las posibilidades de la IA generativa. Claude 3.7 Sonnet puede manejar imágenes y devolver salidas de texto, con una ventana de contexto de 200K."
|
||||
},
|
||||
"anthropic.claude-3-haiku-20240307-v1:0": {
|
||||
"description": "Claude 3 Haiku es el modelo más rápido y compacto de Anthropic, ofreciendo una velocidad de respuesta casi instantánea. Puede responder rápidamente a consultas y solicitudes simples. Los clientes podrán construir experiencias de IA sin costuras que imiten la interacción humana. Claude 3 Haiku puede manejar imágenes y devolver salidas de texto, con una ventana de contexto de 200K."
|
||||
},
|
||||
@@ -800,6 +797,9 @@
|
||||
"gemini-2.0-flash-001": {
|
||||
"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."
|
||||
},
|
||||
"gemini-2.0-flash-lite-001": {
|
||||
"description": "Variante del modelo Gemini 2.0 Flash, optimizada para objetivos como la rentabilidad y la baja latencia."
|
||||
},
|
||||
"gemini-2.0-flash-lite-preview-02-05": {
|
||||
"description": "Un modelo Gemini 2.0 Flash optimizado para objetivos de costo-efectividad y baja latencia."
|
||||
},
|
||||
@@ -1484,6 +1484,9 @@
|
||||
"qwen-max-latest": {
|
||||
"description": "El modelo de lenguaje a gran escala Tongyi Qwen de nivel de cientos de miles de millones, que admite entradas en diferentes idiomas como chino e inglés, es el modelo API detrás de la versión del producto Tongyi Qwen 2.5."
|
||||
},
|
||||
"qwen-omni-turbo-latest": {
|
||||
"description": "La serie de modelos Qwen-Omni admite la entrada de datos en múltiples modalidades, incluyendo video, audio, imágenes y texto, y produce audio y texto como salida."
|
||||
},
|
||||
"qwen-plus": {
|
||||
"description": "La versión mejorada del modelo de lenguaje a gran escala Qwen admite entradas en diferentes idiomas como chino e inglés."
|
||||
},
|
||||
@@ -1676,6 +1679,9 @@
|
||||
"us.anthropic.claude-3-5-sonnet-20241022-v2:0": {
|
||||
"description": "Claude 3.5 Sonnet eleva el estándar de la industria, superando a modelos competidores y a Claude 3 Opus, destacándose en evaluaciones amplias, mientras mantiene la velocidad y costo de nuestros modelos de nivel medio."
|
||||
},
|
||||
"us.anthropic.claude-3-7-sonnet-20250219-v1:0": {
|
||||
"description": "Claude 3.7 sonnet es el modelo de próxima generación más rápido de Anthropic. En comparación con Claude 3 Haiku, Claude 3.7 Sonnet ha mejorado en todas las habilidades y ha superado al modelo más grande de la generación anterior, Claude 3 Opus, en muchas pruebas de referencia de inteligencia."
|
||||
},
|
||||
"whisper-1": {
|
||||
"description": "Modelo de reconocimiento de voz general, que admite reconocimiento de voz multilingüe, traducción de voz y reconocimiento de idiomas."
|
||||
},
|
||||
|
||||
@@ -140,6 +140,18 @@
|
||||
"close": "Eliminar",
|
||||
"confirm": "Configuración completada, intente de nuevo"
|
||||
},
|
||||
"crawPages": {
|
||||
"crawling": "Reconocimiento de enlaces",
|
||||
"detail": {
|
||||
"preview": "Vista previa",
|
||||
"raw": "Texto original",
|
||||
"tooLong": "El contenido del texto es demasiado largo, el contexto de la conversación solo retiene los primeros 10000 caracteres, el exceso no se contabiliza en el contexto de la conversación"
|
||||
},
|
||||
"meta": {
|
||||
"crawler": "Modo de rastreo",
|
||||
"words": "Número de caracteres"
|
||||
}
|
||||
},
|
||||
"searchxng": {
|
||||
"baseURL": "Introduzca",
|
||||
"description": "Introduzca la URL de SearchXNG para comenzar la búsqueda en línea",
|
||||
|
||||
@@ -467,9 +467,6 @@
|
||||
"anthropic.claude-3-5-sonnet-20241022-v2:0": {
|
||||
"description": "Claude 3.5 Sonnet استانداردهای صنعت را ارتقا داده است، عملکردی بهتر از مدلهای رقیب و Claude 3 Opus دارد، در ارزیابیهای گسترده به خوبی عمل کرده و در عین حال سرعت و هزینه مدلهای سطح متوسط ما را حفظ میکند."
|
||||
},
|
||||
"anthropic.claude-3-7-sonnet-20250219-v1:0": {
|
||||
"description": "سونت کلود 3.7 سریعترین مدل نسل بعدی آنتروپیک است. در مقایسه با کلود 3 هایکو، سونت کلود 3.7 در تمام مهارتها بهبود یافته و در بسیاری از آزمونهای استاندارد هوش از بزرگترین مدل نسل قبلی، کلود 3 اوپوس، پیشی گرفته است."
|
||||
},
|
||||
"anthropic.claude-3-haiku-20240307-v1:0": {
|
||||
"description": "Claude 3 Haiku سریعترین و فشردهترین مدل Anthropic است که پاسخهای تقریباً فوری ارائه میدهد. این مدل میتواند به سرعت به پرسشها و درخواستهای ساده پاسخ دهد. مشتریان قادر خواهند بود تجربههای هوش مصنوعی یکپارچهای را که تعاملات انسانی را تقلید میکند، ایجاد کنند. Claude 3 Haiku میتواند تصاویر را پردازش کرده و خروجی متنی ارائه دهد و دارای پنجره متنی 200K است."
|
||||
},
|
||||
@@ -800,6 +797,9 @@
|
||||
"gemini-2.0-flash-001": {
|
||||
"description": "Gemini 2.0 Flash ویژگیها و بهبودهای نسل بعدی را ارائه میدهد، از جمله سرعت عالی، استفاده از ابزارهای بومی، تولید چندرسانهای و پنجره متن 1M توکن."
|
||||
},
|
||||
"gemini-2.0-flash-lite-001": {
|
||||
"description": "مدل متغیر Gemini 2.0 Flash برای بهینهسازی هزینه و تأخیر کم طراحی شده است."
|
||||
},
|
||||
"gemini-2.0-flash-lite-preview-02-05": {
|
||||
"description": "مدل Gemini 2.0 Flash که برای بهینهسازی هزینه و تأخیر کم طراحی شده است."
|
||||
},
|
||||
@@ -1484,6 +1484,9 @@
|
||||
"qwen-max-latest": {
|
||||
"description": "مدل زبانی بسیار بزرگ با مقیاس میلیاردی تونگی چیانون، که از ورودیهای زبانهای مختلف مانند چینی، انگلیسی و غیره پشتیبانی میکند. مدل API پشت نسخه محصول تونگی چیانون 2.5 فعلی."
|
||||
},
|
||||
"qwen-omni-turbo-latest": {
|
||||
"description": "مدلهای سری Qwen-Omni از ورودی دادههای چندگانه شامل ویدیو، صدا، تصویر و متن پشتیبانی میکنند و خروجیهای صوتی و متنی تولید میکنند."
|
||||
},
|
||||
"qwen-plus": {
|
||||
"description": "مدل زبان بسیار بزرگ Qwen در نسخه تقویت شده، از ورودی زبانهای مختلف مانند چینی و انگلیسی پشتیبانی میکند."
|
||||
},
|
||||
@@ -1676,6 +1679,9 @@
|
||||
"us.anthropic.claude-3-5-sonnet-20241022-v2:0": {
|
||||
"description": "Claude 3.5 Sonnet استانداردهای صنعتی را ارتقا داده و عملکردی فراتر از مدلهای رقیب و Claude 3 Opus دارد و در ارزیابیهای گستردهای عملکرد عالی از خود نشان میدهد، در حالی که سرعت و هزینه مدلهای سطح متوسط ما را نیز داراست."
|
||||
},
|
||||
"us.anthropic.claude-3-7-sonnet-20250219-v1:0": {
|
||||
"description": "Claude 3.7 sonnet سریعترین مدل نسل بعدی Anthropic است. در مقایسه با Claude 3 Haiku، Claude 3.7 Sonnet در تمام مهارتها بهبود یافته و در بسیاری از آزمونهای استاندارد هوش از بزرگترین مدل نسل قبلی، Claude 3 Opus، پیشی گرفته است."
|
||||
},
|
||||
"whisper-1": {
|
||||
"description": "مدل شناسایی گفتار عمومی، پشتیبانی از شناسایی گفتار چند زبانه، ترجمه گفتار و شناسایی زبان."
|
||||
},
|
||||
|
||||
@@ -140,6 +140,18 @@
|
||||
"close": "حذف",
|
||||
"confirm": "پیکربندی کامل و دوباره تلاش کنید"
|
||||
},
|
||||
"crawPages": {
|
||||
"crawling": "در حال شناسایی لینک",
|
||||
"detail": {
|
||||
"preview": "پیشنمایش",
|
||||
"raw": "متن اصلی",
|
||||
"tooLong": "محتوای متن بسیار طولانی است، متن مکالمه تنها شامل 10000 کاراکتر اول میشود و بخشهای اضافی در متن مکالمه محاسبه نمیشود"
|
||||
},
|
||||
"meta": {
|
||||
"crawler": "مدل خزنده",
|
||||
"words": "تعداد کاراکتر"
|
||||
}
|
||||
},
|
||||
"searchxng": {
|
||||
"baseURL": "لطفاً وارد کنید",
|
||||
"description": "لطفاً آدرس وب SearchXNG را وارد کنید تا جستجوی آنلاین را شروع کنید",
|
||||
|
||||
@@ -467,9 +467,6 @@
|
||||
"anthropic.claude-3-5-sonnet-20241022-v2:0": {
|
||||
"description": "Claude 3.5 Sonnet a élevé les normes de l'industrie, surpassant les modèles concurrents et Claude 3 Opus, tout en affichant d'excellentes performances dans une large gamme d'évaluations, tout en conservant la vitesse et le coût de nos modèles de niveau intermédiaire."
|
||||
},
|
||||
"anthropic.claude-3-7-sonnet-20250219-v1:0": {
|
||||
"description": "Claude 3.7 Sonnet élève les normes de l'industrie, surpassant les modèles concurrents et Claude 3 Opus, avec d'excellentes performances dans une large gamme d'évaluations, tout en offrant la vitesse et le coût de nos modèles de niveau intermédiaire."
|
||||
},
|
||||
"anthropic.claude-3-haiku-20240307-v1:0": {
|
||||
"description": "Claude 3 Haiku est le modèle le plus rapide et le plus compact d'Anthropic, offrant une vitesse de réponse quasi instantanée. Il peut répondre rapidement à des requêtes et demandes simples. Les clients pourront construire une expérience AI transparente imitant l'interaction humaine. Claude 3 Haiku peut traiter des images et retourner des sorties textuelles, avec une fenêtre contextuelle de 200K."
|
||||
},
|
||||
@@ -800,6 +797,9 @@
|
||||
"gemini-2.0-flash-001": {
|
||||
"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."
|
||||
},
|
||||
"gemini-2.0-flash-lite-001": {
|
||||
"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."
|
||||
},
|
||||
"gemini-2.0-flash-lite-preview-02-05": {
|
||||
"description": "Un modèle Gemini 2.0 Flash optimisé pour des objectifs de rentabilité et de faible latence."
|
||||
},
|
||||
@@ -1484,6 +1484,9 @@
|
||||
"qwen-max-latest": {
|
||||
"description": "Le modèle de langage à grande échelle Tongyi Qwen de niveau milliard, prenant en charge des entrées en chinois, en anglais et dans d'autres langues, actuellement le modèle API derrière la version produit Tongyi Qwen 2.5."
|
||||
},
|
||||
"qwen-omni-turbo-latest": {
|
||||
"description": "La série de modèles Qwen-Omni prend en charge l'entrée de données multimodales, y compris vidéo, audio, images et texte, et produit des sorties audio et textuelles."
|
||||
},
|
||||
"qwen-plus": {
|
||||
"description": "Version améliorée du modèle de langage à grande échelle Qwen, prenant en charge des entrées dans différentes langues telles que le chinois et l'anglais."
|
||||
},
|
||||
@@ -1676,6 +1679,9 @@
|
||||
"us.anthropic.claude-3-5-sonnet-20241022-v2:0": {
|
||||
"description": "Claude 3.5 Sonnet élève les normes de l'industrie, surpassant les modèles concurrents et Claude 3 Opus, avec d'excellentes performances dans une large gamme d'évaluations, tout en offrant la vitesse et le coût de nos modèles de niveau intermédiaire."
|
||||
},
|
||||
"us.anthropic.claude-3-7-sonnet-20250219-v1:0": {
|
||||
"description": "Claude 3.7 sonnet est le modèle de prochaine génération le plus rapide d'Anthropic. Par rapport à Claude 3 Haiku, Claude 3.7 Sonnet a amélioré ses compétences dans divers domaines et a surpassé le plus grand modèle de la génération précédente, Claude 3 Opus, dans de nombreux tests de référence intellectuels."
|
||||
},
|
||||
"whisper-1": {
|
||||
"description": "Modèle de reconnaissance vocale général, prenant en charge la reconnaissance vocale multilingue, la traduction vocale et la reconnaissance de langue."
|
||||
},
|
||||
|
||||
@@ -140,6 +140,18 @@
|
||||
"close": "Supprimer",
|
||||
"confirm": "Configuration terminée, veuillez réessayer"
|
||||
},
|
||||
"crawPages": {
|
||||
"crawling": "Identification des liens en cours",
|
||||
"detail": {
|
||||
"preview": "Aperçu",
|
||||
"raw": "Texte brut",
|
||||
"tooLong": "Le contenu du texte est trop long, le contexte de la conversation ne conserve que les 10000 premiers caractères, la partie excédentaire n'est pas prise en compte dans le contexte de la conversation"
|
||||
},
|
||||
"meta": {
|
||||
"crawler": "Mode de collecte",
|
||||
"words": "Nombre de caractères"
|
||||
}
|
||||
},
|
||||
"searchxng": {
|
||||
"baseURL": "Veuillez entrer",
|
||||
"description": "Veuillez entrer l'URL de SearchXNG pour commencer la recherche en ligne",
|
||||
|
||||
@@ -467,9 +467,6 @@
|
||||
"anthropic.claude-3-5-sonnet-20241022-v2:0": {
|
||||
"description": "Claude 3.5 Sonnet ha elevato gli standard del settore, superando le prestazioni dei modelli concorrenti e di Claude 3 Opus, dimostrando eccellenza in una vasta gamma di valutazioni, mantenendo al contempo la velocità e i costi dei nostri modelli di livello medio."
|
||||
},
|
||||
"anthropic.claude-3-7-sonnet-20250219-v1:0": {
|
||||
"description": "Claude 3.7 Sonnet è il modello più recente di Anthropic, con prestazioni all'avanguardia in una vasta gamma di valutazioni, superando i modelli concorrenti e Claude 3.5 Sonnet, dimostrando eccellenza in una vasta gamma di valutazioni, mantenendo al contempo la velocità e i costi dei nostri modelli di livello medio."
|
||||
},
|
||||
"anthropic.claude-3-haiku-20240307-v1:0": {
|
||||
"description": "Claude 3 Haiku è il modello più veloce e compatto di Anthropic, offrendo una velocità di risposta quasi istantanea. Può rispondere rapidamente a query e richieste semplici. I clienti saranno in grado di costruire un'esperienza AI senza soluzione di continuità che imita l'interazione umana. Claude 3 Haiku può gestire immagini e restituire output testuali, con una finestra di contesto di 200K."
|
||||
},
|
||||
@@ -800,6 +797,9 @@
|
||||
"gemini-2.0-flash-001": {
|
||||
"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."
|
||||
},
|
||||
"gemini-2.0-flash-lite-001": {
|
||||
"description": "Gemini 2.0 Flash è una variante del modello Flash, ottimizzata per obiettivi come il rapporto costo-efficacia e la bassa latenza."
|
||||
},
|
||||
"gemini-2.0-flash-lite-preview-02-05": {
|
||||
"description": "Un modello Gemini 2.0 Flash ottimizzato per obiettivi di costo-efficacia e bassa latenza."
|
||||
},
|
||||
@@ -1484,6 +1484,9 @@
|
||||
"qwen-max-latest": {
|
||||
"description": "Modello linguistico su larga scala Tongyi Qwen con miliardi di parametri, supporta input in diverse lingue tra cui cinese e inglese, attualmente il modello API dietro la versione del prodotto Tongyi Qwen 2.5."
|
||||
},
|
||||
"qwen-omni-turbo-latest": {
|
||||
"description": "La serie di modelli Qwen-Omni supporta l'input di dati in diverse modalità, inclusi video, audio, immagini e testo, e produce output audio e testuale."
|
||||
},
|
||||
"qwen-plus": {
|
||||
"description": "Qwen Plus è una versione potenziata del modello linguistico di grandi dimensioni, che supporta input in diverse lingue, tra cui cinese e inglese."
|
||||
},
|
||||
@@ -1676,6 +1679,9 @@
|
||||
"us.anthropic.claude-3-5-sonnet-20241022-v2:0": {
|
||||
"description": "Claude 3.5 Sonnet ha elevato gli standard del settore, superando le prestazioni dei modelli concorrenti e di Claude 3 Opus, dimostrando eccellenza in una vasta gamma di valutazioni, mantenendo al contempo la velocità e i costi dei nostri modelli di livello medio."
|
||||
},
|
||||
"us.anthropic.claude-3-7-sonnet-20250219-v1:0": {
|
||||
"description": "Claude 3.7 sonnet è il modello di prossima generazione più veloce di Anthropic. Rispetto a Claude 3 Haiku, Claude 3.7 Sonnet ha migliorato le sue capacità in vari ambiti e ha superato il modello di generazione precedente, Claude 3 Opus, in molti test di intelligenza."
|
||||
},
|
||||
"whisper-1": {
|
||||
"description": "Modello di riconoscimento vocale universale, supporta il riconoscimento vocale multilingue, la traduzione vocale e il riconoscimento linguistico."
|
||||
},
|
||||
|
||||
@@ -140,6 +140,18 @@
|
||||
"close": "Rimuovi",
|
||||
"confirm": "Configurazione completata, riprovare"
|
||||
},
|
||||
"crawPages": {
|
||||
"crawling": "Riconoscimento del link in corso",
|
||||
"detail": {
|
||||
"preview": "Anteprima",
|
||||
"raw": "Testo originale",
|
||||
"tooLong": "Il contenuto del testo è troppo lungo, il contesto della conversazione conserva solo i primi 10000 caratteri, la parte eccedente non viene considerata nel contesto della conversazione"
|
||||
},
|
||||
"meta": {
|
||||
"crawler": "Modalità di scansione",
|
||||
"words": "Numero di caratteri"
|
||||
}
|
||||
},
|
||||
"searchxng": {
|
||||
"baseURL": "Inserisci",
|
||||
"description": "Inserisci l'URL di SearchXNG per iniziare la ricerca online",
|
||||
|
||||
@@ -467,9 +467,6 @@
|
||||
"anthropic.claude-3-5-sonnet-20241022-v2:0": {
|
||||
"description": "Claude 3.5 Sonnetは業界標準を引き上げ、競合モデルやClaude 3 Opusを上回る性能を発揮し、広範な評価で優れた結果を示しています。また、中程度のレベルのモデルと同等の速度とコストを持っています。"
|
||||
},
|
||||
"anthropic.claude-3-7-sonnet-20250219-v1:0": {
|
||||
"description": "Claude 3.7 Sonnetは、競合他社よりも低価格で最大の効用を提供し、信頼性が高く耐久性のある主力機として設計されています。スケール化されたAIデプロイメントに適しています。Claude 3.7 Sonnetは画像を処理し、テキスト出力を返すことができ、200Kのコンテキストウィンドウを持っています。"
|
||||
},
|
||||
"anthropic.claude-3-haiku-20240307-v1:0": {
|
||||
"description": "Claude 3 HaikuはAnthropicの最も速く、最もコンパクトなモデルで、ほぼ瞬時の応答速度を提供します。簡単なクエリやリクエストに迅速に回答できます。顧客は人間のインタラクションを模倣するシームレスなAI体験を構築できるようになります。Claude 3 Haikuは画像を処理し、テキスト出力を返すことができ、200Kのコンテキストウィンドウを持っています。"
|
||||
},
|
||||
@@ -800,6 +797,9 @@
|
||||
"gemini-2.0-flash-001": {
|
||||
"description": "Gemini 2.0 Flashは、卓越した速度、ネイティブツールの使用、マルチモーダル生成、1Mトークンのコンテキストウィンドウを含む次世代の機能と改善を提供します。"
|
||||
},
|
||||
"gemini-2.0-flash-lite-001": {
|
||||
"description": "Gemini 2.0 Flashモデルのバリアントで、コスト効率と低遅延などの目標に最適化されています。"
|
||||
},
|
||||
"gemini-2.0-flash-lite-preview-02-05": {
|
||||
"description": "コスト効率と低遅延を目指して最適化されたGemini 2.0 Flashモデルです。"
|
||||
},
|
||||
@@ -1484,6 +1484,9 @@
|
||||
"qwen-max-latest": {
|
||||
"description": "通義千問の千億レベルの超大規模言語モデルで、中国語、英語などの異なる言語入力をサポートし、現在の通義千問2.5製品バージョンの背後にあるAPIモデルです。"
|
||||
},
|
||||
"qwen-omni-turbo-latest": {
|
||||
"description": "Qwen-Omniシリーズモデルは、動画、音声、画像、テキストなどのさまざまなモダリティのデータを入力し、音声とテキストを出力することをサポートしています。"
|
||||
},
|
||||
"qwen-plus": {
|
||||
"description": "通義千問の超大規模言語モデルの強化版で、中国語、英語などさまざまな言語の入力をサポートしています。"
|
||||
},
|
||||
@@ -1676,6 +1679,9 @@
|
||||
"us.anthropic.claude-3-5-sonnet-20241022-v2:0": {
|
||||
"description": "Claude 3.5 Sonnetは業界標準を向上させ、競合モデルやClaude 3 Opusを超える性能を持ち、広範な評価で優れた結果を示し、我々の中程度のモデルの速度とコストを兼ね備えています。"
|
||||
},
|
||||
"us.anthropic.claude-3-7-sonnet-20250219-v1:0": {
|
||||
"description": "Claude 3.7 Sonnetは、Anthropicの最も高速な次世代モデルです。Claude 3 Haikuと比較して、Claude 3.7 Sonnetはすべてのスキルで向上しており、多くの知能ベンチマークテストで前世代の最大モデルClaude 3 Opusを超えています。"
|
||||
},
|
||||
"whisper-1": {
|
||||
"description": "汎用音声認識モデル、多言語音声認識、音声翻訳、言語認識をサポート"
|
||||
},
|
||||
|
||||
@@ -140,6 +140,18 @@
|
||||
"close": "削除",
|
||||
"confirm": "設定が完了し、再試行しました"
|
||||
},
|
||||
"crawPages": {
|
||||
"crawling": "リンクを識別中",
|
||||
"detail": {
|
||||
"preview": "プレビュー",
|
||||
"raw": "原文",
|
||||
"tooLong": "テキストが長すぎます。会話のコンテキストには最初の10000文字のみが保持され、それを超える部分はカウントされません。"
|
||||
},
|
||||
"meta": {
|
||||
"crawler": "クローリングモード",
|
||||
"words": "文字数"
|
||||
}
|
||||
},
|
||||
"searchxng": {
|
||||
"baseURL": "入力してください",
|
||||
"description": "SearchXNG の URL を入力すると、ネット検索を開始できます",
|
||||
|
||||
@@ -467,9 +467,6 @@
|
||||
"anthropic.claude-3-5-sonnet-20241022-v2:0": {
|
||||
"description": "Claude 3.5 Sonnet는 업계 표준을 향상시켰으며, 경쟁 모델과 Claude 3 Opus를 초월하는 성능을 보여주고, 광범위한 평가에서 뛰어난 성과를 보였습니다. 또한 중간 수준 모델의 속도와 비용을 갖추고 있습니다."
|
||||
},
|
||||
"anthropic.claude-3-7-sonnet-20250219-v1:0": {
|
||||
"description": "Claude 3.7 Sonnet는 업계 표준을 향상시켰으며, 경쟁 모델과 Claude 3 Opus를 초월하는 성능을 보여주고, 광범위한 평가에서 뛰어난 성과를 보였습니다. 또한 중간 수준 모델의 속도와 비용을 갖추고 있습니다."
|
||||
},
|
||||
"anthropic.claude-3-haiku-20240307-v1:0": {
|
||||
"description": "Claude 3 Haiku는 Anthropic의 가장 빠르고 간결한 모델로, 거의 즉각적인 응답 속도를 제공합니다. 간단한 질문과 요청에 신속하게 답변할 수 있습니다. 고객은 인간 상호작용을 모방하는 원활한 AI 경험을 구축할 수 있습니다. Claude 3 Haiku는 이미지를 처리하고 텍스트 출력을 반환할 수 있으며, 200K의 컨텍스트 창을 갖추고 있습니다."
|
||||
},
|
||||
@@ -800,6 +797,9 @@
|
||||
"gemini-2.0-flash-001": {
|
||||
"description": "Gemini 2.0 Flash는 뛰어난 속도, 원주율 도구 사용, 다중 모달 생성 및 1M 토큰 문맥 창을 포함한 차세대 기능과 개선 사항을 제공합니다."
|
||||
},
|
||||
"gemini-2.0-flash-lite-001": {
|
||||
"description": "Gemini 2.0 플래시 모델 변형으로, 비용 효율성과 낮은 지연 시간 등의 목표를 위해 최적화되었습니다."
|
||||
},
|
||||
"gemini-2.0-flash-lite-preview-02-05": {
|
||||
"description": "비용 효율성과 낮은 지연 시간 등을 목표로 최적화된 Gemini 2.0 Flash 모델입니다."
|
||||
},
|
||||
@@ -1484,6 +1484,9 @@
|
||||
"qwen-max-latest": {
|
||||
"description": "통의 천문 1000억급 초대규모 언어 모델로, 중국어, 영어 등 다양한 언어 입력을 지원하며, 현재 통의 천문 2.5 제품 버전의 API 모델입니다."
|
||||
},
|
||||
"qwen-omni-turbo-latest": {
|
||||
"description": "Qwen-Omni 시리즈 모델은 비디오, 오디오, 이미지, 텍스트 등 다양한 모드의 데이터를 입력으로 지원하며, 오디오와 텍스트를 출력합니다."
|
||||
},
|
||||
"qwen-plus": {
|
||||
"description": "통의천문 초대형 언어 모델의 강화 버전으로, 중국어, 영어 등 다양한 언어 입력을 지원합니다."
|
||||
},
|
||||
@@ -1676,6 +1679,9 @@
|
||||
"us.anthropic.claude-3-5-sonnet-20241022-v2:0": {
|
||||
"description": "Claude 3.5 Sonnet는 업계 표준을 향상시켰으며, 경쟁 모델과 Claude 3 Opus를 초월하는 성능을 보여주고, 광범위한 평가에서 뛰어난 성과를 보이며, 중간 수준 모델의 속도와 비용을 갖추고 있습니다."
|
||||
},
|
||||
"us.anthropic.claude-3-7-sonnet-20250219-v1:0": {
|
||||
"description": "Claude 3.7 소네트는 Anthropic의 가장 빠른 차세대 모델입니다. Claude 3 하이쿠와 비교할 때, Claude 3.7 소네트는 모든 기술에서 향상되었으며, 많은 지능 기준 테스트에서 이전 세대의 가장 큰 모델인 Claude 3 오푸스를 초월했습니다."
|
||||
},
|
||||
"whisper-1": {
|
||||
"description": "범용 음성 인식 모델로, 다국어 음성 인식, 음성 번역 및 언어 인식을 지원합니다."
|
||||
},
|
||||
|
||||
@@ -140,6 +140,18 @@
|
||||
"close": "삭제",
|
||||
"confirm": "구성이 완료되었습니다. 다시 시도하십시오."
|
||||
},
|
||||
"crawPages": {
|
||||
"crawling": "링크 인식 중",
|
||||
"detail": {
|
||||
"preview": "미리보기",
|
||||
"raw": "원본 텍스트",
|
||||
"tooLong": "텍스트 내용이 너무 깁니다. 대화 맥락은 처음 10000자만 유지되며, 초과 부분은 대화 맥락에 포함되지 않습니다."
|
||||
},
|
||||
"meta": {
|
||||
"crawler": "크롤링 모드",
|
||||
"words": "문자 수"
|
||||
}
|
||||
},
|
||||
"searchxng": {
|
||||
"baseURL": "입력하십시오",
|
||||
"description": "SearchXNG의 URL을 입력하면 인터넷 검색을 시작할 수 있습니다.",
|
||||
|
||||
@@ -467,9 +467,6 @@
|
||||
"anthropic.claude-3-5-sonnet-20241022-v2:0": {
|
||||
"description": "Claude 3.5 Sonnet heeft de industrienormen verhoogd, met prestaties die de concurrentiemodellen en Claude 3 Opus overtreffen. Het presteert uitstekend in uitgebreide evaluaties, terwijl het de snelheid en kosten van onze middelgrote modellen behoudt."
|
||||
},
|
||||
"anthropic.claude-3-7-sonnet-20250219-v1:0": {
|
||||
"description": "Claude 3.7 Sonnet is een van de nieuwste modellen van Anthropic, met verbeterde prestaties en een groter contextvenster, waardoor het model beter in staat is om complexe taken uit te voeren."
|
||||
},
|
||||
"anthropic.claude-3-haiku-20240307-v1:0": {
|
||||
"description": "Claude 3 Haiku is het snelste en meest compacte model van Anthropic, met bijna onmiddellijke reactietijden. Het kan snel eenvoudige vragen en verzoeken beantwoorden. Klanten kunnen een naadloze AI-ervaring creëren die menselijke interactie nabootst. Claude 3 Haiku kan afbeeldingen verwerken en tekstoutput retourneren, met een contextvenster van 200K."
|
||||
},
|
||||
@@ -800,6 +797,9 @@
|
||||
"gemini-2.0-flash-001": {
|
||||
"description": "Gemini 2.0 Flash biedt next-gen functies en verbeteringen, waaronder uitstekende snelheid, native toolgebruik, multimodale generatie en een contextvenster van 1M tokens."
|
||||
},
|
||||
"gemini-2.0-flash-lite-001": {
|
||||
"description": "Gemini 2.0 Flash is een modelvariant die is geoptimaliseerd voor kosteneffectiviteit en lage latentie."
|
||||
},
|
||||
"gemini-2.0-flash-lite-preview-02-05": {
|
||||
"description": "Een Gemini 2.0 Flash-model dat is geoptimaliseerd voor kosteneffectiviteit en lage latentie."
|
||||
},
|
||||
@@ -1484,6 +1484,9 @@
|
||||
"qwen-max-latest": {
|
||||
"description": "Het Tongyi Qianwen model met een schaal van honderden miljarden, ondersteunt invoer in verschillende talen, waaronder Chinees en Engels, en is de API-model achter de huidige Tongyi Qianwen 2.5 productversie."
|
||||
},
|
||||
"qwen-omni-turbo-latest": {
|
||||
"description": "De Qwen-Omni serie modellen ondersteunt het invoeren van gegevens in verschillende modaliteiten, waaronder video, audio, afbeeldingen en tekst, en kan audio en tekst als output genereren."
|
||||
},
|
||||
"qwen-plus": {
|
||||
"description": "Qwen is een verbeterde versie van het grootschalige taalmodel dat ondersteuning biedt voor verschillende taalinputs zoals Chinees en Engels."
|
||||
},
|
||||
@@ -1676,6 +1679,9 @@
|
||||
"us.anthropic.claude-3-5-sonnet-20241022-v2:0": {
|
||||
"description": "Claude 3.5 Sonnet heeft de industrienormen verbeterd, met prestaties die de concurrentiemodellen en Claude 3 Opus overtreffen, en excelleert in uitgebreide evaluaties, terwijl het de snelheid en kosten van onze middelgrote modellen behoudt."
|
||||
},
|
||||
"us.anthropic.claude-3-7-sonnet-20250219-v1:0": {
|
||||
"description": "Claude 3.7 sonnet is het snelste volgende generatie model van Anthropic. In vergelijking met Claude 3 Haiku heeft Claude 3.7 Sonnet verbeteringen in verschillende vaardigheden en overtreft het de grootste modellen van de vorige generatie, Claude 3 Opus, in veel intellectuele benchmarktests."
|
||||
},
|
||||
"whisper-1": {
|
||||
"description": "Algemeen spraakherkenningsmodel, ondersteunt meertalige spraakherkenning, spraakvertaling en taalherkenning."
|
||||
},
|
||||
|
||||
@@ -140,6 +140,18 @@
|
||||
"close": "Verwijderen",
|
||||
"confirm": "Configuratie voltooid en opnieuw proberen"
|
||||
},
|
||||
"crawPages": {
|
||||
"crawling": "Linkherkenning",
|
||||
"detail": {
|
||||
"preview": "Voorbeeld",
|
||||
"raw": "Oorspronkelijke tekst",
|
||||
"tooLong": "De tekstinhoud is te lang, de gesprekscontext behoudt alleen de eerste 10000 tekens, het gedeelte daarboven wordt niet meegerekend in de gesprekscontext"
|
||||
},
|
||||
"meta": {
|
||||
"crawler": "Crawler-modus",
|
||||
"words": "Aantal tekens"
|
||||
}
|
||||
},
|
||||
"searchxng": {
|
||||
"baseURL": "Voer in",
|
||||
"description": "Voer de URL van SearchXNG in om te beginnen met online zoeken",
|
||||
|
||||
@@ -467,9 +467,6 @@
|
||||
"anthropic.claude-3-5-sonnet-20241022-v2:0": {
|
||||
"description": "Claude 3.5 Sonnet podnosi standardy branżowe, przewyższając modele konkurencji oraz Claude 3 Opus, wykazując doskonałe wyniki w szerokich ocenach, jednocześnie oferując prędkość i koszty naszych modeli średniego poziomu."
|
||||
},
|
||||
"anthropic.claude-3-7-sonnet-20250219-v1:0": {
|
||||
"description": "Claude 3.7 Sonnet to najnowszy model od Anthropic, który oferuje doskonałe wyniki w szerokim zakresie zadań, w tym generowanie treści, rozumienie języka naturalnego i przestrzeganie instrukcji. Claude 3.7 Sonnet jest szybki, niezawodny i ekonomiczny, co sprawia, że jest idealny do zastosowań produkcyjnych."
|
||||
},
|
||||
"anthropic.claude-3-haiku-20240307-v1:0": {
|
||||
"description": "Claude 3 Haiku to najszybszy i najbardziej kompaktowy model od Anthropic, oferujący niemal natychmiastową szybkość odpowiedzi. Może szybko odpowiadać na proste zapytania i prośby. Klienci będą mogli budować płynne doświadczenia AI, które naśladują interakcje międzyludzkie. Claude 3 Haiku może przetwarzać obrazy i zwracać wyjścia tekstowe, z oknem kontekstowym wynoszącym 200K."
|
||||
},
|
||||
@@ -800,6 +797,9 @@
|
||||
"gemini-2.0-flash-001": {
|
||||
"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."
|
||||
},
|
||||
"gemini-2.0-flash-lite-001": {
|
||||
"description": "Gemini 2.0 Flash to wariant modelu, zoptymalizowany pod kątem efektywności kosztowej i niskiego opóźnienia."
|
||||
},
|
||||
"gemini-2.0-flash-lite-preview-02-05": {
|
||||
"description": "Model Gemini 2.0 Flash, zoptymalizowany pod kątem efektywności kosztowej i niskiej latencji."
|
||||
},
|
||||
@@ -1484,6 +1484,9 @@
|
||||
"qwen-max-latest": {
|
||||
"description": "Model językowy Qwen Max o skali miliardów parametrów, obsługujący różne języki, w tym chiński i angielski, będący API modelu za produktem Qwen 2.5."
|
||||
},
|
||||
"qwen-omni-turbo-latest": {
|
||||
"description": "Modele z serii Qwen-Omni obsługują różne rodzaje danych wejściowych, w tym wideo, audio, obrazy i tekst, oraz generują wyjścia w postaci audio i tekstu."
|
||||
},
|
||||
"qwen-plus": {
|
||||
"description": "Qwen Plus to ulepszona wersja ogromnego modelu językowego, wspierająca różne języki, w tym chiński i angielski."
|
||||
},
|
||||
@@ -1676,6 +1679,9 @@
|
||||
"us.anthropic.claude-3-5-sonnet-20241022-v2:0": {
|
||||
"description": "Claude 3.5 Sonnet podnosi standardy branżowe, przewyższając modele konkurencji oraz Claude 3 Opus, osiągając doskonałe wyniki w szerokim zakresie ocen, przy zachowaniu prędkości i kosztów naszych modeli średniego poziomu."
|
||||
},
|
||||
"us.anthropic.claude-3-7-sonnet-20250219-v1:0": {
|
||||
"description": "Claude 3.7 sonet to najszybszy model następnej generacji od Anthropic. W porównaniu do Claude 3 Haiku, Claude 3.7 Sonet wykazuje poprawę w różnych umiejętnościach i przewyższa największy model poprzedniej generacji, Claude 3 Opus, w wielu testach inteligencji."
|
||||
},
|
||||
"whisper-1": {
|
||||
"description": "Uniwersalny model rozpoznawania mowy, obsługujący rozpoznawanie mowy w wielu językach, tłumaczenie mowy i rozpoznawanie języków."
|
||||
},
|
||||
|
||||
@@ -140,6 +140,18 @@
|
||||
"close": "Usuń",
|
||||
"confirm": "Konfiguracja zakończona, spróbuj ponownie"
|
||||
},
|
||||
"crawPages": {
|
||||
"crawling": "Rozpoznawanie linków",
|
||||
"detail": {
|
||||
"preview": "Podgląd",
|
||||
"raw": "Tekst źródłowy",
|
||||
"tooLong": "Treść tekstu jest zbyt długa, kontekst rozmowy zachowuje tylko pierwsze 10000 znaków, a nadmiar nie jest uwzględniany w kontekście rozmowy"
|
||||
},
|
||||
"meta": {
|
||||
"crawler": "Tryb przeszukiwania",
|
||||
"words": "Liczba znaków"
|
||||
}
|
||||
},
|
||||
"searchxng": {
|
||||
"baseURL": "Wprowadź",
|
||||
"description": "Wprowadź adres URL SearchXNG, aby rozpocząć wyszukiwanie w sieci",
|
||||
|
||||
@@ -467,9 +467,6 @@
|
||||
"anthropic.claude-3-5-sonnet-20241022-v2:0": {
|
||||
"description": "Claude 3.5 Sonnet elevou o padrão da indústria, superando modelos concorrentes e o Claude 3 Opus, apresentando um desempenho excepcional em avaliações amplas, enquanto mantém a velocidade e o custo de nossos modelos de nível médio."
|
||||
},
|
||||
"anthropic.claude-3-7-sonnet-20250219-v1:0": {
|
||||
"description": "Claude 3.7 Sonnet é o modelo de IA mais poderoso da Anthropic, com desempenho de ponta em tarefas altamente complexas. Ele pode lidar com prompts abertos e cenários não vistos, apresentando fluência excepcional e compreensão semelhante à humana. O Claude 3.7 Sonnet demonstra as possibilidades de geração de IA na vanguarda. O Claude 3.7 Sonnet pode processar imagens e retornar saídas de texto, com uma janela de contexto de 200K."
|
||||
},
|
||||
"anthropic.claude-3-haiku-20240307-v1:0": {
|
||||
"description": "O Claude 3 Haiku é o modelo mais rápido e compacto da Anthropic, oferecendo uma velocidade de resposta quase instantânea. Ele pode responder rapidamente a consultas e solicitações simples. Os clientes poderão construir uma experiência de IA sem costura que imita a interação humana. O Claude 3 Haiku pode processar imagens e retornar saídas de texto, com uma janela de contexto de 200K."
|
||||
},
|
||||
@@ -800,6 +797,9 @@
|
||||
"gemini-2.0-flash-001": {
|
||||
"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."
|
||||
},
|
||||
"gemini-2.0-flash-lite-001": {
|
||||
"description": "Variante do modelo Gemini 2.0 Flash, otimizada para custo-benefício e baixa latência."
|
||||
},
|
||||
"gemini-2.0-flash-lite-preview-02-05": {
|
||||
"description": "Um modelo Gemini 2.0 Flash otimizado para custo-benefício e baixa latência."
|
||||
},
|
||||
@@ -1484,6 +1484,9 @@
|
||||
"qwen-max-latest": {
|
||||
"description": "O modelo de linguagem em larga escala Qwen Max, com trilhões de parâmetros, que suporta entradas em diferentes idiomas, incluindo chinês e inglês, e é o modelo de API por trás da versão do produto Qwen 2.5."
|
||||
},
|
||||
"qwen-omni-turbo-latest": {
|
||||
"description": "A série de modelos Qwen-Omni suporta a entrada de dados em várias modalidades, incluindo vídeo, áudio, imagens e texto, e produz saídas em áudio e texto."
|
||||
},
|
||||
"qwen-plus": {
|
||||
"description": "Versão aprimorada do modelo de linguagem em larga escala Qwen, que suporta entradas em diferentes idiomas, como português e inglês."
|
||||
},
|
||||
@@ -1676,6 +1679,9 @@
|
||||
"us.anthropic.claude-3-5-sonnet-20241022-v2:0": {
|
||||
"description": "Claude 3.5 Sonnet eleva o padrão da indústria, superando modelos concorrentes e Claude 3 Opus, apresentando um desempenho excepcional em uma ampla gama de avaliações, enquanto mantém a velocidade e o custo de nossos modelos de nível médio."
|
||||
},
|
||||
"us.anthropic.claude-3-7-sonnet-20250219-v1:0": {
|
||||
"description": "Claude 3.7 sonnet é o modelo de próxima geração mais rápido da Anthropic. Em comparação com o Claude 3 Haiku, o Claude 3.7 Sonnet apresenta melhorias em várias habilidades e supera o maior modelo da geração anterior, o Claude 3 Opus, em muitos testes de referência de inteligência."
|
||||
},
|
||||
"whisper-1": {
|
||||
"description": "Modelo de reconhecimento de voz universal, suporta reconhecimento de voz multilíngue, tradução de voz e identificação de idiomas."
|
||||
},
|
||||
|
||||
@@ -140,6 +140,18 @@
|
||||
"close": "Remover",
|
||||
"confirm": "Configuração concluída, tente novamente"
|
||||
},
|
||||
"crawPages": {
|
||||
"crawling": "Reconhecendo links",
|
||||
"detail": {
|
||||
"preview": "Prévia",
|
||||
"raw": "Texto original",
|
||||
"tooLong": "O conteúdo do texto é muito longo, o contexto da conversa manterá apenas os primeiros 10000 caracteres, e a parte excedente não será considerada no contexto da conversa"
|
||||
},
|
||||
"meta": {
|
||||
"crawler": "Modo de Rastreamento",
|
||||
"words": "Número de caracteres"
|
||||
}
|
||||
},
|
||||
"searchxng": {
|
||||
"baseURL": "Digite",
|
||||
"description": "Digite o URL do SearchXNG para começar a pesquisa na internet",
|
||||
|
||||
@@ -467,9 +467,6 @@
|
||||
"anthropic.claude-3-5-sonnet-20241022-v2:0": {
|
||||
"description": "Claude 3.5 Sonnet установил новые стандарты в отрасли, превзойдя модели конкурентов и Claude 3 Opus, продемонстрировав отличные результаты в широкомасштабных оценках, при этом обладая скоростью и стоимостью наших моделей среднего уровня."
|
||||
},
|
||||
"anthropic.claude-3-7-sonnet-20250219-v1:0": {
|
||||
"description": "Claude 3.7 Sonnet — это самая мощная модель от Anthropic, обладающая передовыми характеристиками в области высоко сложных задач. Она может обрабатывать открытые подсказки и невидимые сценарии, демонстрируя отличную плавность и человеческое понимание. Claude 3.7 Sonnet демонстрирует передовые возможности генеративного AI. Claude 3.7 Sonnet может обрабатывать изображения и возвращать текстовый вывод, имея контекстное окно в 200K."
|
||||
},
|
||||
"anthropic.claude-3-haiku-20240307-v1:0": {
|
||||
"description": "Claude 3 Haiku — это самая быстрая и компактная модель от Anthropic, обеспечивающая почти мгновенную скорость ответа. Она может быстро отвечать на простые запросы и запросы. Клиенты смогут создать бесшовный AI-опыт, имитирующий человеческое взаимодействие. Claude 3 Haiku может обрабатывать изображения и возвращать текстовый вывод, имея контекстное окно в 200K."
|
||||
},
|
||||
@@ -800,6 +797,9 @@
|
||||
"gemini-2.0-flash-001": {
|
||||
"description": "Gemini 2.0 Flash предлагает функции следующего поколения и улучшения, включая выдающуюся скорость, использование встроенных инструментов, многомодальную генерацию и контекстное окно на 1M токенов."
|
||||
},
|
||||
"gemini-2.0-flash-lite-001": {
|
||||
"description": "Модельный вариант Gemini 2.0 Flash, оптимизированный для достижения таких целей, как экономическая эффективность и низкая задержка."
|
||||
},
|
||||
"gemini-2.0-flash-lite-preview-02-05": {
|
||||
"description": "Модель Gemini 2.0 Flash, оптимизированная для экономической эффективности и низкой задержки."
|
||||
},
|
||||
@@ -1484,6 +1484,9 @@
|
||||
"qwen-max-latest": {
|
||||
"description": "Модель языка Tongyi Qwen с уровнем масштабирования в триллионы, поддерживающая ввод на различных языках, включая китайский и английский, является API моделью, лежащей в основе продукта Tongyi Qwen 2.5."
|
||||
},
|
||||
"qwen-omni-turbo-latest": {
|
||||
"description": "Модели серии Qwen-Omni поддерживают ввод данных в различных модальностях, включая видео, аудио, изображения и текст, и могут выводить аудио и текст."
|
||||
},
|
||||
"qwen-plus": {
|
||||
"description": "Улучшенная версия Qwen-Turbo, поддерживающая входные данные на разных языках, включая китайский и английский."
|
||||
},
|
||||
@@ -1676,6 +1679,9 @@
|
||||
"us.anthropic.claude-3-5-sonnet-20241022-v2:0": {
|
||||
"description": "Claude 3.5 Sonnet устанавливает новые отраслевые стандарты, превосходя модели конкурентов и Claude 3 Opus, демонстрируя отличные результаты в широком спектре оценок, при этом обладая скоростью и стоимостью наших моделей среднего уровня."
|
||||
},
|
||||
"us.anthropic.claude-3-7-sonnet-20250219-v1:0": {
|
||||
"description": "Claude 3.7 sonnet — это самая быстрая модель следующего поколения от Anthropic. По сравнению с Claude 3 Haiku, Claude 3.7 Sonnet продемонстрировала улучшения во всех навыках и превзошла предыдущую крупнейшую модель Claude 3 Opus по многим интеллектуальным бенчмаркам."
|
||||
},
|
||||
"whisper-1": {
|
||||
"description": "Универсальная модель распознавания речи, поддерживающая многоязычное распознавание речи, перевод речи и распознавание языка."
|
||||
},
|
||||
|
||||
@@ -140,6 +140,18 @@
|
||||
"close": "Удалить",
|
||||
"confirm": "Конфигурация завершена, попробуйте снова"
|
||||
},
|
||||
"crawPages": {
|
||||
"crawling": "Идентификация ссылки",
|
||||
"detail": {
|
||||
"preview": "Предварительный просмотр",
|
||||
"raw": "Исходный текст",
|
||||
"tooLong": "Содержимое текста слишком длинное, контекст диалога сохраняет только первые 10000 символов, превышающая часть не учитывается в контексте диалога"
|
||||
},
|
||||
"meta": {
|
||||
"crawler": "Режим обхода",
|
||||
"words": "Количество символов"
|
||||
}
|
||||
},
|
||||
"searchxng": {
|
||||
"baseURL": "Введите",
|
||||
"description": "Введите URL SearchXNG, чтобы начать поиск в сети",
|
||||
|
||||
@@ -467,9 +467,6 @@
|
||||
"anthropic.claude-3-5-sonnet-20241022-v2:0": {
|
||||
"description": "Claude 3.5 Sonnet, sektör standartlarını yükselterek, rakip modelleri ve Claude 3 Opus'u geride bırakarak, geniş bir değerlendirme yelpazesinde mükemmel performans sergilemekte, orta seviye modellerimizin hız ve maliyet avantajlarını sunmaktadır."
|
||||
},
|
||||
"anthropic.claude-3-7-sonnet-20250219-v1:0": {
|
||||
"description": "Claude 3.7 Sonnet, endüstri standartlarını yükselterek, rakip modelleri ve Claude 3 Opus'u geride bırakarak, geniş bir değerlendirme yelpazesinde mükemmel performans sergilemekte, orta seviye modellerimizin hız ve maliyet avantajlarını sunmaktadır."
|
||||
},
|
||||
"anthropic.claude-3-haiku-20240307-v1:0": {
|
||||
"description": "Claude 3 Haiku, Anthropic'in en hızlı ve en kompakt modelidir, neredeyse anında yanıt hızı sunar. Basit sorgular ve taleplere hızlı bir şekilde yanıt verebilir. Müşteriler, insan etkileşimini taklit eden kesintisiz bir AI deneyimi oluşturabileceklerdir. Claude 3 Haiku, görüntüleri işleyebilir ve metin çıktısı döndürebilir, 200K bağlam penceresine sahiptir."
|
||||
},
|
||||
@@ -800,6 +797,9 @@
|
||||
"gemini-2.0-flash-001": {
|
||||
"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."
|
||||
},
|
||||
"gemini-2.0-flash-lite-001": {
|
||||
"description": "Gemini 2.0 Flash model varyantı, maliyet etkinliği ve düşük gecikme gibi hedefler için optimize edilmiştir."
|
||||
},
|
||||
"gemini-2.0-flash-lite-preview-02-05": {
|
||||
"description": "Maliyet etkinliği ve düşük gecikme gibi hedefler için optimize edilmiş bir Gemini 2.0 Flash modelidir."
|
||||
},
|
||||
@@ -1484,6 +1484,9 @@
|
||||
"qwen-max-latest": {
|
||||
"description": "Tongyi Qianwen, 100 milyar seviyesinde büyük bir dil modeli, Çince, İngilizce ve diğer dillerde girişleri destekler, şu anda Tongyi Qianwen 2.5 ürün versiyonunun arkasındaki API modelidir."
|
||||
},
|
||||
"qwen-omni-turbo-latest": {
|
||||
"description": "Qwen-Omni serisi modeller, video, ses, resim ve metin gibi çeşitli modlarda veri girişi destekler ve ses ile metin çıktısı verir."
|
||||
},
|
||||
"qwen-plus": {
|
||||
"description": "Tongyi Qianwen, Çince, İngilizce gibi farklı dil girişlerini destekleyen geliştirilmiş büyük ölçekli bir dil modelidir."
|
||||
},
|
||||
@@ -1676,6 +1679,9 @@
|
||||
"us.anthropic.claude-3-5-sonnet-20241022-v2:0": {
|
||||
"description": "Claude 3.5 Sonnet, endüstri standartlarını yükselterek, rakip modelleri ve Claude 3 Opus'u aşan performans sergilemekte; geniş değerlendirmelerde mükemmel sonuçlar verirken, orta seviye modellerimizin hız ve maliyetine sahiptir."
|
||||
},
|
||||
"us.anthropic.claude-3-7-sonnet-20250219-v1:0": {
|
||||
"description": "Claude 3.7 sonnet, Anthropic'in en hızlı bir sonraki nesil modelidir. Claude 3 Haiku ile karşılaştırıldığında, Claude 3.7 Sonnet, tüm becerilerde iyileşmeler göstermiştir ve birçok zeka standart testinde bir önceki neslin en büyük modeli olan Claude 3 Opus'u geride bırakmıştır."
|
||||
},
|
||||
"whisper-1": {
|
||||
"description": "Genel ses tanıma modeli, çok dilli ses tanıma, ses çevirisi ve dil tanıma desteği sunar."
|
||||
},
|
||||
|
||||
@@ -140,6 +140,18 @@
|
||||
"close": "Sil",
|
||||
"confirm": "Yapılandırma tamamlandı ve yeniden denendi"
|
||||
},
|
||||
"crawPages": {
|
||||
"crawling": "Bağlantı tanımlanıyor",
|
||||
"detail": {
|
||||
"preview": "Önizleme",
|
||||
"raw": "Ham metin",
|
||||
"tooLong": "Metin içeriği çok uzun, diyalog bağlamında yalnızca ilk 10000 karakter saklanır, fazlası bağlamda dikkate alınmaz"
|
||||
},
|
||||
"meta": {
|
||||
"crawler": "Tarayıcı Modu",
|
||||
"words": "Karakter sayısı"
|
||||
}
|
||||
},
|
||||
"searchxng": {
|
||||
"baseURL": "Lütfen girin",
|
||||
"description": "SearchXNG'nin URL'sini girin, böylece çevrimiçi arama yapmaya başlayabilirsiniz",
|
||||
|
||||
@@ -467,9 +467,6 @@
|
||||
"anthropic.claude-3-5-sonnet-20241022-v2:0": {
|
||||
"description": "Claude 3.5 Sonnet nâng cao tiêu chuẩn ngành, hiệu suất vượt trội so với các mô hình đối thủ và Claude 3 Opus, thể hiện xuất sắc trong các đánh giá rộng rãi, đồng thời có tốc độ và chi phí tương đương với các mô hình tầm trung của chúng tôi."
|
||||
},
|
||||
"anthropic.claude-3-7-sonnet-20250219-v1:0": {
|
||||
"description": "Claude 3.7 Sonnet là mô hình AI mạnh nhất của Anthropic, với hiệu suất vượt trội so với các mô hình đối thủ và Claude 3 Opus, thể hiện xuất sắc trong nhiều đánh giá rộng rãi, đồng thời có tốc độ và chi phí tương đương với các mô hình tầm trung của chúng tôi."
|
||||
},
|
||||
"anthropic.claude-3-haiku-20240307-v1:0": {
|
||||
"description": "Claude 3 Haiku là mô hình nhanh nhất và gọn nhẹ nhất của Anthropic, cung cấp tốc độ phản hồi gần như ngay lập tức. Nó có thể nhanh chóng trả lời các truy vấn và yêu cầu đơn giản. Khách hàng sẽ có thể xây dựng trải nghiệm AI liền mạch mô phỏng tương tác của con người. Claude 3 Haiku có thể xử lý hình ảnh và trả về đầu ra văn bản, với cửa sổ ngữ cảnh 200K."
|
||||
},
|
||||
@@ -800,6 +797,9 @@
|
||||
"gemini-2.0-flash-001": {
|
||||
"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."
|
||||
},
|
||||
"gemini-2.0-flash-lite-001": {
|
||||
"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."
|
||||
},
|
||||
"gemini-2.0-flash-lite-preview-02-05": {
|
||||
"description": "Một mô hình Gemini 2.0 Flash được tối ưu hóa cho hiệu quả chi phí và độ trễ thấp."
|
||||
},
|
||||
@@ -1484,6 +1484,9 @@
|
||||
"qwen-max-latest": {
|
||||
"description": "Mô hình ngôn ngữ quy mô lớn Qwen với hàng trăm tỷ tham số, hỗ trợ đầu vào bằng tiếng Trung, tiếng Anh và nhiều ngôn ngữ khác, là mô hình API đứng sau phiên bản sản phẩm Qwen 2.5 hiện tại."
|
||||
},
|
||||
"qwen-omni-turbo-latest": {
|
||||
"description": "Mô hình Qwen-Omni hỗ trợ đầu vào từ nhiều loại dữ liệu khác nhau, bao gồm video, âm thanh, hình ảnh, văn bản, và xuất ra âm thanh và văn bản."
|
||||
},
|
||||
"qwen-plus": {
|
||||
"description": "Mô hình ngôn ngữ quy mô lớn Qwen phiên bản nâng cao, hỗ trợ đầu vào bằng tiếng Trung, tiếng Anh và nhiều ngôn ngữ khác."
|
||||
},
|
||||
@@ -1676,6 +1679,9 @@
|
||||
"us.anthropic.claude-3-5-sonnet-20241022-v2:0": {
|
||||
"description": "Claude 3.5 Sonnet nâng cao tiêu chuẩn ngành, hiệu suất vượt trội so với các mô hình cạnh tranh và Claude 3 Opus, thể hiện xuất sắc trong nhiều đánh giá, đồng thời có tốc độ và chi phí tương đương với các mô hình tầm trung của chúng tôi."
|
||||
},
|
||||
"us.anthropic.claude-3-7-sonnet-20250219-v1:0": {
|
||||
"description": "Claude 3.7 sonnet là mô hình thế hệ tiếp theo nhanh nhất của Anthropic. So với Claude 3 Haiku, Claude 3.7 Sonnet đã cải thiện ở nhiều kỹ năng và vượt qua mô hình lớn nhất thế hệ trước là Claude 3 Opus trong nhiều bài kiểm tra trí tuệ."
|
||||
},
|
||||
"whisper-1": {
|
||||
"description": "Mô hình nhận diện giọng nói đa năng, hỗ trợ nhận diện giọng nói đa ngôn ngữ, dịch giọng nói và nhận diện ngôn ngữ."
|
||||
},
|
||||
|
||||
@@ -140,6 +140,18 @@
|
||||
"close": "Xóa",
|
||||
"confirm": "Đã hoàn thành cấu hình và thử lại"
|
||||
},
|
||||
"crawPages": {
|
||||
"crawling": "Đang nhận diện liên kết",
|
||||
"detail": {
|
||||
"preview": "Xem trước",
|
||||
"raw": "Văn bản gốc",
|
||||
"tooLong": "Nội dung văn bản quá dài, ngữ cảnh cuộc trò chuyện chỉ giữ lại 10000 ký tự đầu tiên, phần vượt quá sẽ không được tính vào ngữ cảnh cuộc trò chuyện"
|
||||
},
|
||||
"meta": {
|
||||
"crawler": "Chế độ thu thập",
|
||||
"words": "Số ký tự"
|
||||
}
|
||||
},
|
||||
"searchxng": {
|
||||
"baseURL": "Nhập vào",
|
||||
"description": "Nhập URL của SearchXNG để bắt đầu tìm kiếm trực tuyến",
|
||||
|
||||
@@ -467,9 +467,6 @@
|
||||
"anthropic.claude-3-5-sonnet-20241022-v2:0": {
|
||||
"description": "Claude 3.5 Sonnet 提升了行业标准,性能超过竞争对手模型和 Claude 3 Opus,在广泛的评估中表现出色,同时具有我们中等层级模型的速度和成本。"
|
||||
},
|
||||
"anthropic.claude-3-7-sonnet-20250219-v1:0": {
|
||||
"description": "Claude 3.7 sonnet 是 Anthropic 最快的下一代模型。与 Claude 3 Haiku 相比,Claude 3.7 Sonnet 在各项技能上都有所提升,并在许多智力基准测试中超越了上一代最大的模型 Claude 3 Opus。"
|
||||
},
|
||||
"anthropic.claude-3-haiku-20240307-v1:0": {
|
||||
"description": "Claude 3 Haiku 是 Anthropic 最快、最紧凑的模型,提供近乎即时的响应速度。它可以快速回答简单的查询和请求。客户将能够构建模仿人类互动的无缝 AI 体验。Claude 3 Haiku 可以处理图像并返回文本输出,具有 200K 的上下文窗口。"
|
||||
},
|
||||
@@ -800,6 +797,9 @@
|
||||
"gemini-2.0-flash-001": {
|
||||
"description": "Gemini 2.0 Flash 提供下一代功能和改进,包括卓越的速度、原生工具使用、多模态生成和1M令牌上下文窗口。"
|
||||
},
|
||||
"gemini-2.0-flash-lite-001": {
|
||||
"description": "Gemini 2.0 Flash 模型变体,针对成本效益和低延迟等目标进行了优化。"
|
||||
},
|
||||
"gemini-2.0-flash-lite-preview-02-05": {
|
||||
"description": "一个 Gemini 2.0 Flash 模型,针对成本效益和低延迟等目标进行了优化。"
|
||||
},
|
||||
@@ -1484,6 +1484,9 @@
|
||||
"qwen-max-latest": {
|
||||
"description": "通义千问千亿级别超大规模语言模型,支持中文、英文等不同语言输入,当前通义千问2.5产品版本背后的API模型。"
|
||||
},
|
||||
"qwen-omni-turbo-latest": {
|
||||
"description": "Qwen-Omni 系列模型支持输入多种模态的数据,包括视频、音频、图片、文本,并输出音频与文本。"
|
||||
},
|
||||
"qwen-plus": {
|
||||
"description": "通义千问超大规模语言模型增强版,支持中文、英文等不同语言输入。"
|
||||
},
|
||||
@@ -1676,6 +1679,9 @@
|
||||
"us.anthropic.claude-3-5-sonnet-20241022-v2:0": {
|
||||
"description": "Claude 3.5 Sonnet 提升了行业标准,性能超过竞争对手模型和 Claude 3 Opus,在广泛的评估中表现出色,同时具有我们中等层级模型的速度和成本。"
|
||||
},
|
||||
"us.anthropic.claude-3-7-sonnet-20250219-v1:0": {
|
||||
"description": "Claude 3.7 sonnet 是 Anthropic 最快的下一代模型。与 Claude 3 Haiku 相比,Claude 3.7 Sonnet 在各项技能上都有所提升,并在许多智力基准测试中超越了上一代最大的模型 Claude 3 Opus。"
|
||||
},
|
||||
"whisper-1": {
|
||||
"description": "通用语音识别模型,支持多语言语音识别、语音翻译和语言识别"
|
||||
},
|
||||
|
||||
@@ -140,6 +140,18 @@
|
||||
"close": "删除",
|
||||
"confirm": "已完成配置并重试"
|
||||
},
|
||||
"crawPages": {
|
||||
"crawling": "链接识别中",
|
||||
"detail": {
|
||||
"preview": "预览",
|
||||
"raw": "原始文本",
|
||||
"tooLong": "文本内容过长,对话上下文仅保留前 10000 字符,超过部分不计入会话上下文"
|
||||
},
|
||||
"meta": {
|
||||
"crawler": "抓取模式",
|
||||
"words": "字符数"
|
||||
}
|
||||
},
|
||||
"searchxng": {
|
||||
"baseURL": "请输入",
|
||||
"description": "请输入 SearchXNG 的网址,即可开始联网搜索",
|
||||
|
||||
@@ -467,9 +467,6 @@
|
||||
"anthropic.claude-3-5-sonnet-20241022-v2:0": {
|
||||
"description": "Claude 3.5 Sonnet 提升了行業標準,性能超越競爭對手模型和 Claude 3 Opus,在廣泛的評估中表現出色,同時具備我們中等層級模型的速度和成本。"
|
||||
},
|
||||
"anthropic.claude-3-7-sonnet-20250219-v1:0": {
|
||||
"description": "Claude 3.7 Sonnet 提升了行業標準,性能超越競爭對手模型和 Claude 3 Opus,在廣泛的評估中表現出色,同時具備我們中等層級模型的速度和成本。"
|
||||
},
|
||||
"anthropic.claude-3-haiku-20240307-v1:0": {
|
||||
"description": "Claude 3 Haiku是Anthropic最快、最緊湊的模型,提供近乎即時的響應速度。它可以快速回答簡單的查詢和請求。客戶將能夠構建模仿人類互動的無縫AI體驗。Claude 3 Haiku可以處理圖像並返回文本輸出,具有200K的上下文窗口。"
|
||||
},
|
||||
@@ -800,6 +797,9 @@
|
||||
"gemini-2.0-flash-001": {
|
||||
"description": "Gemini 2.0 Flash 提供下一代功能和改進,包括卓越的速度、原生工具使用、多模態生成和1M令牌上下文窗口。"
|
||||
},
|
||||
"gemini-2.0-flash-lite-001": {
|
||||
"description": "Gemini 2.0 Flash 模型變體,針對成本效益和低延遲等目標進行了優化。"
|
||||
},
|
||||
"gemini-2.0-flash-lite-preview-02-05": {
|
||||
"description": "一個 Gemini 2.0 Flash 模型,針對成本效益和低延遲等目標進行了優化。"
|
||||
},
|
||||
@@ -1484,6 +1484,9 @@
|
||||
"qwen-max-latest": {
|
||||
"description": "通義千問千億級別超大規模語言模型,支持中文、英文等不同語言輸入,當前通義千問2.5產品版本背後的API模型。"
|
||||
},
|
||||
"qwen-omni-turbo-latest": {
|
||||
"description": "Qwen-Omni 系列模型支持輸入多種模態的數據,包括視頻、音頻、圖片、文本,並輸出音頻與文本。"
|
||||
},
|
||||
"qwen-plus": {
|
||||
"description": "通義千問超大規模語言模型增強版,支持中文、英文等不同語言輸入。"
|
||||
},
|
||||
@@ -1676,6 +1679,9 @@
|
||||
"us.anthropic.claude-3-5-sonnet-20241022-v2:0": {
|
||||
"description": "Claude 3.5 Sonnet 提升了行業標準,性能超越競爭對手模型和 Claude 3 Opus,在廣泛的評估中表現出色,同時具備我們中等層級模型的速度和成本。"
|
||||
},
|
||||
"us.anthropic.claude-3-7-sonnet-20250219-v1:0": {
|
||||
"description": "Claude 3.7 sonnet 是 Anthropic 最快速的下一代模型。與 Claude 3 Haiku 相比,Claude 3.7 Sonnet 在各項技能上都有所提升,並在許多智力基準測試中超越了上一代最大的模型 Claude 3 Opus。"
|
||||
},
|
||||
"whisper-1": {
|
||||
"description": "通用語音識別模型,支持多語言語音識別、語音翻譯和語言識別"
|
||||
},
|
||||
|
||||
@@ -140,6 +140,18 @@
|
||||
"close": "刪除",
|
||||
"confirm": "已完成配置並重試"
|
||||
},
|
||||
"crawPages": {
|
||||
"crawling": "連結識別中",
|
||||
"detail": {
|
||||
"preview": "預覽",
|
||||
"raw": "原始文本",
|
||||
"tooLong": "文本內容過長,對話上下文僅保留前 10000 字元,超過部分不計入會話上下文"
|
||||
},
|
||||
"meta": {
|
||||
"crawler": "抓取模式",
|
||||
"words": "字元數"
|
||||
}
|
||||
},
|
||||
"searchxng": {
|
||||
"baseURL": "請輸入",
|
||||
"description": "請輸入 SearchXNG 的網址,即可開始聯網搜索",
|
||||
|
||||
@@ -25,6 +25,9 @@
|
||||
"license": "MIT",
|
||||
"author": "LobeHub <i@lobehub.com>",
|
||||
"sideEffects": false,
|
||||
"workspaces": [
|
||||
"packages/*"
|
||||
],
|
||||
"scripts": {
|
||||
"build": "next build",
|
||||
"build:analyze": "ANALYZE=true next build",
|
||||
@@ -124,6 +127,7 @@
|
||||
"@icons-pack/react-simple-icons": "9.6.0",
|
||||
"@khmyznikov/pwa-install": "0.3.9",
|
||||
"@langchain/community": "^0.3.22",
|
||||
"@lobechat/web-crawler": "workspace:*",
|
||||
"@lobehub/charts": "^1.12.0",
|
||||
"@lobehub/chat-plugin-sdk": "^1.32.4",
|
||||
"@lobehub/chat-plugins-gateway": "^1.9.0",
|
||||
|
||||
@@ -0,0 +1,34 @@
|
||||
# @lobechat/web-crawler
|
||||
|
||||
LobeChat 内置的网页抓取模块,用于从网页中提取结构化内容,并转换为 Markdown 格式。
|
||||
|
||||
## 📝 简介
|
||||
|
||||
`@lobechat/web-crawler` 是 LobeChat 项目的内部组件,专门负责网页内容的抓取和处理。它能够智能地从各种网页中提取有意义的内容,剔除广告、导航栏等干扰元素,并将结果转换为结构良好的 Markdown 文本。
|
||||
|
||||
## 🔍 主要功能
|
||||
|
||||
- **网页内容抓取**:支持从各类网站获取原始 HTML 内容
|
||||
- **智能内容提取**:使用 Mozilla 的 Readability 算法识别页面中的主要内容
|
||||
- **降级处理机制**:当标准抓取失败时,自动切换到 Browserless.io 服务进行渲染抓取(需要自行配置环境变量)
|
||||
- **Markdown 转换**:将提取的 HTML 内容转换为易于 AI 处理的 Markdown 格式
|
||||
|
||||
## 🛠️ 技术实现
|
||||
|
||||
该模块主要依赖以下技术:
|
||||
|
||||
- **@mozilla/readability**:提供了强大的内容提取算法
|
||||
- **happy-dom**:轻量级的服务端 DOM 实现
|
||||
- **node-html-markdown**:高效的 HTML 到 Markdown 转换工具
|
||||
|
||||
## 🤝 共建改进
|
||||
|
||||
由于网页结构的多样性和复杂性,内容提取可能会遇到各种挑战。如果您发现某些网站的抓取效果不佳,欢迎通过以下方式参与改进:
|
||||
|
||||
1. 提交具体的问题网址和期望的输出结果
|
||||
2. 分享您对特定网站类型的处理经验
|
||||
3. 提出针对性的算法或配置调整建议
|
||||
|
||||
## 📌 注意事项
|
||||
|
||||
这是 LobeHub 的内部模块(`"private": true`),不作为独立包发布使用。它专为 LobeChat 的特定需求设计,与其他系统组件紧密集成。
|
||||
@@ -0,0 +1,13 @@
|
||||
{
|
||||
"name": "@lobechat/web-crawler",
|
||||
"version": "1.0.0",
|
||||
"private": true,
|
||||
"main": "src/index.ts",
|
||||
"types": "src/index.ts",
|
||||
"dependencies": {
|
||||
"@mozilla/readability": "^0.5.0",
|
||||
"happy-dom": "^17.0.0",
|
||||
"node-html-markdown": "^1.3.0",
|
||||
"query-string": "^9.1.1"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,62 @@
|
||||
import qs from 'query-string';
|
||||
|
||||
import { CrawlImpl, CrawlSuccessResult } from '../type';
|
||||
import { htmlToMarkdown } from '../utils/htmlToMarkdown';
|
||||
|
||||
const BASE_URL = process.env.BROWSERLESS_URL ?? 'https://chrome.browserless.io';
|
||||
const BROWSERLESS_TOKEN = process.env.BROWSERLESS_TOKEN;
|
||||
|
||||
class BrowserlessInitError extends Error {
|
||||
constructor() {
|
||||
super('`BROWSERLESS_URL` or `BROWSERLESS_TOKEN` are required');
|
||||
this.name = 'BrowserlessInitError';
|
||||
}
|
||||
}
|
||||
|
||||
export const browserless: CrawlImpl = async (url, { filterOptions }) => {
|
||||
if (!process.env.BROWSERLESS_URL && !process.env.BROWSERLESS_TOKEN) {
|
||||
throw new BrowserlessInitError();
|
||||
}
|
||||
|
||||
const input = {
|
||||
gotoOptions: { waitUntil: 'networkidle2' },
|
||||
url,
|
||||
};
|
||||
|
||||
try {
|
||||
const res = await fetch(
|
||||
qs.stringifyUrl({ query: { token: BROWSERLESS_TOKEN }, url: `${BASE_URL}/content` }),
|
||||
{
|
||||
body: JSON.stringify(input),
|
||||
headers: {
|
||||
'Content-Type': 'application/json',
|
||||
},
|
||||
method: 'POST',
|
||||
},
|
||||
);
|
||||
const html = await res.text();
|
||||
|
||||
const result = htmlToMarkdown(html, { filterOptions, url });
|
||||
|
||||
if (
|
||||
!!result.content &&
|
||||
result.title &&
|
||||
// Just a moment... 说明被 CF 拦截了
|
||||
result.title.trim() !== 'Just a moment...'
|
||||
) {
|
||||
return {
|
||||
content: result.content,
|
||||
contentType: 'text',
|
||||
description: result?.excerpt,
|
||||
length: result.length,
|
||||
siteName: result?.siteName,
|
||||
title: result?.title,
|
||||
url,
|
||||
} satisfies CrawlSuccessResult;
|
||||
}
|
||||
} catch (error) {
|
||||
console.error(error);
|
||||
}
|
||||
|
||||
return;
|
||||
};
|
||||
@@ -0,0 +1,11 @@
|
||||
import { browserless } from './browserless';
|
||||
import { jina } from './jina';
|
||||
import { naive } from './naive';
|
||||
|
||||
export const crawlImpls = {
|
||||
browserless,
|
||||
jina,
|
||||
naive,
|
||||
};
|
||||
|
||||
export type CrawlImplType = keyof typeof crawlImpls;
|
||||
@@ -0,0 +1,37 @@
|
||||
import { CrawlImpl } from '../type';
|
||||
|
||||
export const jina: CrawlImpl<{ apiKey?: string }> = async (url, params) => {
|
||||
const token = params.apiKey ?? process.env.JINA_API_KEY;
|
||||
|
||||
try {
|
||||
const res = await fetch(`https://r.jina.ai/${url}`, {
|
||||
headers: {
|
||||
'Accept': 'application/json',
|
||||
'Authorization': token ? `Bearer ${token}` : '',
|
||||
'x-send-from': 'LobeChat Community',
|
||||
},
|
||||
});
|
||||
|
||||
if (res.ok) {
|
||||
const json = await res.json();
|
||||
if (json.code === 200) {
|
||||
const result = json.data;
|
||||
return {
|
||||
content: result.content,
|
||||
contentType: 'text',
|
||||
description: result?.description,
|
||||
length: result.content.length,
|
||||
siteName: result?.siteName,
|
||||
title: result?.title,
|
||||
url: url,
|
||||
};
|
||||
}
|
||||
|
||||
throw json;
|
||||
}
|
||||
} catch (error) {
|
||||
console.error(error);
|
||||
}
|
||||
|
||||
return;
|
||||
};
|
||||
@@ -0,0 +1,84 @@
|
||||
import { CrawlImpl, CrawlSuccessResult } from '../type';
|
||||
import { NetworkConnectionError, PageNotFoundError } from '../utils/errorType';
|
||||
import { htmlToMarkdown } from '../utils/htmlToMarkdown';
|
||||
|
||||
const mixinHeaders = {
|
||||
// 接受的内容类型
|
||||
'Accept':
|
||||
'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.7',
|
||||
// 接受的编码方式
|
||||
'Accept-Encoding': 'gzip, deflate, br',
|
||||
// 接受的语言
|
||||
'Accept-Language': 'en-US,en;q=0.9,zh;q=0.8',
|
||||
// 缓存控制
|
||||
'Cache-Control': 'max-age=0',
|
||||
// 连接类型
|
||||
'Connection': 'keep-alive',
|
||||
// 表明请求来自哪个站点
|
||||
'Referer': 'https://www.google.com/',
|
||||
// 升级不安全请求
|
||||
'Upgrade-Insecure-Requests': '1',
|
||||
// 模拟真实浏览器的 User-Agent
|
||||
'User-Agent':
|
||||
'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/121.0.0.0 Safari/537.36',
|
||||
// 防止跨站请求伪造
|
||||
'sec-ch-ua': '"Google Chrome";v="121", "Not A(Brand";v="99", "Chromium";v="121"',
|
||||
'sec-ch-ua-mobile': '?0',
|
||||
'sec-ch-ua-platform': '"Windows"',
|
||||
'sec-fetch-dest': 'document',
|
||||
'sec-fetch-mode': 'navigate',
|
||||
'sec-fetch-site': 'none',
|
||||
'sec-fetch-user': '?1',
|
||||
};
|
||||
|
||||
export const naive: CrawlImpl = async (url, { filterOptions }) => {
|
||||
let res: Response;
|
||||
|
||||
try {
|
||||
res = await fetch(url, { headers: mixinHeaders });
|
||||
} catch (e) {
|
||||
if ((e as Error).message === 'fetch failed') {
|
||||
throw new NetworkConnectionError();
|
||||
}
|
||||
throw e;
|
||||
}
|
||||
|
||||
if (res.status === 404) {
|
||||
throw new PageNotFoundError(res.statusText);
|
||||
}
|
||||
const type = res.headers.get('content-type');
|
||||
|
||||
if (type?.includes('application/json')) {
|
||||
const json = await res.json();
|
||||
return {
|
||||
content: JSON.stringify(json, null, 2),
|
||||
contentType: 'json',
|
||||
length: json.length,
|
||||
url,
|
||||
} satisfies CrawlSuccessResult;
|
||||
}
|
||||
|
||||
try {
|
||||
const html = await res.text();
|
||||
|
||||
const result = htmlToMarkdown(html, { filterOptions, url });
|
||||
|
||||
// if the content is not empty or blocked
|
||||
// just return
|
||||
if (!!result.content && result.title !== 'Just a moment...') {
|
||||
return {
|
||||
content: result.content,
|
||||
contentType: 'text',
|
||||
description: result?.excerpt,
|
||||
length: result.length,
|
||||
siteName: result?.siteName,
|
||||
title: result?.title,
|
||||
url,
|
||||
} satisfies CrawlSuccessResult;
|
||||
}
|
||||
} catch (error) {
|
||||
console.error(error);
|
||||
}
|
||||
|
||||
return;
|
||||
};
|
||||
@@ -0,0 +1,66 @@
|
||||
import { CrawlImplType, crawlImpls } from './crawImpl';
|
||||
import { CrawlUrlRule } from './type';
|
||||
import { crawUrlRules } from './urlRules';
|
||||
import { applyUrlRules } from './utils/appUrlRules';
|
||||
|
||||
export class Crawler {
|
||||
impls = ['naive', 'jina', 'browserless'] as const;
|
||||
|
||||
/**
|
||||
* 爬取网页内容
|
||||
* @param options 爬取选项
|
||||
*/
|
||||
async crawl({
|
||||
url,
|
||||
impls,
|
||||
filterOptions: userFilterOptions,
|
||||
}: {
|
||||
filterOptions?: CrawlUrlRule['filterOptions'];
|
||||
impls?: string[];
|
||||
url: string;
|
||||
}) {
|
||||
// 应用URL规则
|
||||
const { transformedUrl, filterOptions: ruleFilterOptions } = applyUrlRules(url, crawUrlRules);
|
||||
|
||||
// 合并用户提供的过滤选项和规则中的过滤选项,用户选项优先
|
||||
const mergedFilterOptions = {
|
||||
...ruleFilterOptions,
|
||||
...userFilterOptions,
|
||||
};
|
||||
|
||||
let finalError: Error | undefined;
|
||||
|
||||
const finalImpls = impls
|
||||
? (impls.filter((impl) => Object.keys(crawlImpls).includes(impl)) as CrawlImplType[])
|
||||
: this.impls;
|
||||
|
||||
// 按照内置的实现顺序依次尝试
|
||||
for (const impl of finalImpls) {
|
||||
try {
|
||||
const res = await crawlImpls[impl](transformedUrl, { filterOptions: mergedFilterOptions });
|
||||
|
||||
if (res)
|
||||
return {
|
||||
crawler: impl,
|
||||
data: res,
|
||||
originalUrl: url,
|
||||
transformedUrl: transformedUrl !== url ? transformedUrl : undefined,
|
||||
};
|
||||
} catch (error) {
|
||||
console.error(error);
|
||||
finalError = error as Error;
|
||||
}
|
||||
}
|
||||
|
||||
const errorType = finalError?.name || 'UnknownError';
|
||||
const errorMessage = finalError?.message;
|
||||
|
||||
return {
|
||||
content: `Fail to crawl the page. Error type: ${errorType}, error message: ${errorMessage}`,
|
||||
errorMessage: errorMessage,
|
||||
errorType,
|
||||
originalUrl: url,
|
||||
transformedUrl: transformedUrl !== url ? transformedUrl : undefined,
|
||||
};
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,2 @@
|
||||
export { Crawler } from './crawler';
|
||||
export * from './type';
|
||||
@@ -0,0 +1,42 @@
|
||||
export interface CrawlSuccessResult {
|
||||
content?: string;
|
||||
contentType: 'text' | 'json';
|
||||
description?: string;
|
||||
length?: number;
|
||||
siteName?: string;
|
||||
title?: string;
|
||||
url: string;
|
||||
}
|
||||
|
||||
export interface CrawlErrorResult {
|
||||
content: string;
|
||||
errorMessage: string;
|
||||
url: string;
|
||||
}
|
||||
|
||||
export interface FilterOptions {
|
||||
// 是否启用Readability
|
||||
enableReadability?: boolean;
|
||||
|
||||
pureText?: boolean;
|
||||
}
|
||||
|
||||
type CrawlImplParams<T> = T & {
|
||||
filterOptions: FilterOptions;
|
||||
};
|
||||
|
||||
export type CrawlImpl<Params = object> = (
|
||||
url: string,
|
||||
params: CrawlImplParams<Params>,
|
||||
) => Promise<CrawlSuccessResult | undefined>;
|
||||
|
||||
export interface CrawlUrlRule {
|
||||
// 内容过滤配置(可选)
|
||||
filterOptions?: FilterOptions;
|
||||
// 是否使用正则表达式匹配(默认为glob模式)
|
||||
isRegex?: boolean;
|
||||
// URL匹配模式,支持glob模式或正则表达式
|
||||
urlPattern: string;
|
||||
// URL转换模板(可选),如果提供则进行URL转换
|
||||
urlTransform?: string;
|
||||
}
|
||||
@@ -0,0 +1,34 @@
|
||||
import { CrawlUrlRule } from './type';
|
||||
|
||||
export const crawUrlRules: CrawlUrlRule[] = [
|
||||
// github 源码解析
|
||||
{
|
||||
filterOptions: {
|
||||
enableReadability: false,
|
||||
},
|
||||
urlPattern: 'https://github.com/([^/]+)/([^/]+)/blob/([^/]+)/(.*)',
|
||||
urlTransform: 'https://github.com/$1/$2/raw/refs/heads/$3/$4',
|
||||
},
|
||||
{
|
||||
filterOptions: {
|
||||
enableReadability: false,
|
||||
},
|
||||
// GitHub discussion
|
||||
urlPattern: 'https://github.com/(.*)/discussions/(.*)',
|
||||
},
|
||||
{
|
||||
// Medium 文章转换为 Scribe.rip
|
||||
urlPattern: 'https://medium.com/(.*)',
|
||||
urlTransform: 'https://scribe.rip/$1',
|
||||
},
|
||||
|
||||
// 体育数据网站规则
|
||||
{
|
||||
filterOptions: {
|
||||
// 对体育数据表格禁用 Readability 并且转换为纯文本
|
||||
enableReadability: false,
|
||||
pureText: true,
|
||||
},
|
||||
urlPattern: 'https://www.qiumiwu.com/standings/(.*)',
|
||||
},
|
||||
];
|
||||
@@ -0,0 +1,638 @@
|
||||
// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html
|
||||
|
||||
exports[`htmlToMarkdown > should transform terms.html to markdown 1`] = `
|
||||
{
|
||||
"byline": null,
|
||||
"content": " Lasted Updated at
|
||||
|
||||
2024-03-01
|
||||
|
||||
Welcome to LobeHub! Please carefully read the following Terms of Use (hereinafter referred to as the "Agreement"). This Agreement constitutes a legally binding agreement between You and LobeHub regarding the access and use of the LobeHub software applications, services, and websites (collectively referred to as the "Services").
|
||||
|
||||
By accessing or using the Services in any way, You acknowledge that You have read, understood, and agreed to be bound by all the terms of this Agreement. If You do not agree to any part of this Agreement, You are not permitted to continue accessing or using the Services.
|
||||
|
||||
## Definitions[ ](https://lobehub.com/zh/terms#definitions)
|
||||
|
||||
The words of which the initial letter is capitalized have meanings defined under the following conditions. The following definitions shall have the same meaning regardless of whether they appear in singular or in plural.
|
||||
|
||||
* **Affiliate** means an entity that controls, is controlled by or is under common control with a party, where "control" means ownership of 50% or more of the shares, equity interest or other securities entitled to vote for election of directors or other managing authority.
|
||||
* **Agreement** means this Terms of Use Agreement.
|
||||
* **Company** (referred to as either "the Company", "We", "Us" or "Our" in this Agreement) refers to LobeHub LLC.
|
||||
* **Service** means the LobeHub software applications, services, and website.
|
||||
* **You** means the individual accessing or using the Services, or the company, or other legal entity on behalf of which such individual is accessing or using the Services, as applicable.
|
||||
|
||||
## Our Services[ ](https://lobehub.com/zh/terms#our-services)
|
||||
|
||||
LobeHub provides a platform and interface that enables users to interact with artificial intelligence technologies, including but not limited to natural language processing models or content generation models developed independently or provided by third parties such as Google, Microsoft, OpenAI, and other commercial companies as well as open-source communities. The Service facilitates functions such as information retrieval, content creation, and automation through user interaction with AI systems. Additionally, it utilizes cloud technology to provide capabilities like data synchronization, vector data storage, server-side functionalities, etc., to enhance the interactive experience with AI models.
|
||||
|
||||
## Eligibility[ ](https://lobehub.com/zh/terms#eligibility)
|
||||
|
||||
By accessing or using the Services, You represent and warrant to the Company that You: (1)Are of legal age (18 years and above). (2)Have legal capacity and agree to abide by these terms. (3)Will use the Services in accordance with this Agreement and all applicable laws. (4)Will not use the Services for any illegal, harmful, dangerous, or offensive purposes.
|
||||
|
||||
Examples of prohibited activities include but are not limited to:
|
||||
|
||||
* Illegal activities
|
||||
* Infringement of intellectual property rights
|
||||
* Generating harmful, unsafe, deceptive, or illegal content
|
||||
* Impersonation, fraud
|
||||
|
||||
If You do not comply with the usage conditions, We reserve the right to suspend or terminate Your account and refuse any and all current or future use of the Services (or any part thereof).
|
||||
|
||||
## Account Registration[ ](https://lobehub.com/zh/terms#account-registration)
|
||||
|
||||
To access the Services, You must register an account by providing true, accurate, up-to-date, and complete information. You are solely responsible for all activities that occur under Your account, including maintaining the security of Your account and restricting access. You must immediately notify LobeHub of any unauthorized account use or other security breaches.
|
||||
|
||||
Please ensure to keep Your password secure and take responsibility for all use of Your account and password. If We deem the chosen username inappropriate, containing obscene content, or otherwise offensive, We reserve the right to delete, revoke, or modify that username.
|
||||
|
||||
## Purchases and Payments[ ](https://lobehub.com/zh/terms#purchases-and-payments)
|
||||
|
||||
You agree to provide current, complete, and accurate purchase and account information for all purchases made using the Services. You also agree to promptly update Your account and payment information, including email address, payment method, and payment card expiration date, to allow us to complete Your transactions and contact You when necessary. Sales tax will be added to the purchase price as required by law.
|
||||
|
||||
You agree to pay all charges at the current purchase price and authorize us to charge any such amounts to Your chosen payment provider at the time of purchase. If Your order requires recurring charges, You agree that We may charge Your payment method on a recurring basis at the specified intervals without obtaining prior approval for each recurring charge until the relevant order is canceled. We reserve the right to correct any errors or pricing errors even after payment has been requested or accepted.
|
||||
|
||||
We may utilize third-party payment processing services (such as Stripe) for payment processing. You may use a valid card (credit or debit card) for payment, subject to verification and authorization by Your card issuer. We will not be liable for any delays or failure to provide Services resulting from payment failures due to authorization issues or any reasons related to third-party payment providers.
|
||||
|
||||
We reserve the right to refuse or cancel Your order at any time for certain reasons, including but not limited to: (1) Service availability, (2) errors in Service description or pricing, (3) order errors, (4) suspected fraud or unauthorized or illegal transactions. We reserve the right, at our sole discretion, to limit or prohibit orders placed by dealers, resellers, or distributors.
|
||||
|
||||
## Fee Changes[ ](https://lobehub.com/zh/terms#fee-changes)
|
||||
|
||||
We reserve the right to adjust the Service fees at our discretion and at any time. Any changes in fees will take effect immediately upon the change. Services that have already been paid for and purchased will not be affected.
|
||||
|
||||
If Your order requires recurring automatic billing, the revised price will take effect on the next billing cycle. We will notify You in advance of any fee adjustments so that You have the opportunity to cancel the order before the adjustment takes effect. If You do not cancel the order and continue to use the Services, You agree to pay the revised fee amount.
|
||||
|
||||
## Refunds[ ](https://lobehub.com/zh/terms#refunds)
|
||||
|
||||
For Services that have been purchased but not used, We support refunds within 30 days of payment. However, for Services that have been used or purchased for more than 30 days, We will not accept refund requests.
|
||||
|
||||
For subscription-based Services where partial usage has occurred, Your refund request will be reviewed on a case-by-case basis, and the final decision on approving the refund will be at the Company's discretion.
|
||||
|
||||
## Content[ ](https://lobehub.com/zh/terms#content)
|
||||
|
||||
Our Services allows You to generate and publish content. You are responsible for the legality, reliability, and appropriateness of the content generated using the AI ability. We do not assume responsibility for user-generated content on the Services. You explicitly understand and agree that You are solely responsible for the content You post and all activities conducted under Your account, whether by Yourself or by third parties using Your account.
|
||||
|
||||
By generating and publishing content in the Services, You grant us the rights and licenses necessary to use, modify, publicly perform, publicly display, copy, and distribute such content within the Services. You retain full ownership of all content created, published, or displayed within the Services and are responsible for maintaining these rights. You agree that this license includes the permission for us to provide Your content to other Service users for their use under these terms. Additionally, You declare and warrant that: (1) the content is owned by You or You have the legal right to use and authorize it to us under this agreement. (2) posting the shared information in the Services will not infringe upon the privacy rights, image rights, copyrights, contractual relationships, or other individual rights of others.
|
||||
|
||||
All content generated by You is by default stored locally on the client-side, and You are responsible for the storage and backup of Your content.
|
||||
|
||||
Additionally, We offer optional cloud sync content functionality. By using this feature, You agree that We may retain complete and accurate copies of any content in locations independent of the Services in our manner. However, We cannot guarantee that data will not be lost or damaged. Data or content loss or damage can occur due to various reasons, such as pre-existing damage before synchronization or changes during synchronization.
|
||||
|
||||
We do not assume any responsibility for the security and integrity of content in the event of content damage or loss under any circumstances.
|
||||
|
||||
## Intellectual Property Rights[ ](https://lobehub.com/zh/terms#intellectual-property-rights)
|
||||
|
||||
LobeHub reserves all rights to the technology, software, first-party content, and data within the Services, including but not limited to patents, trademarks, trade secrets, copyrights, and other intellectual property rights. Your permission to use the Services does not grant You any ownership or title. You are not permitted to copy, modify, adapt, translate, create derivative works, reverse engineer, disassemble, or decompile the Services or any part thereof. If You wish to participate in collaborative technical development, please engage through our GitHub open-source community and adhere to the relevant open-source licenses.
|
||||
|
||||
## Privacy and Security[ ](https://lobehub.com/zh/terms#privacy-and-security)
|
||||
|
||||
LobeHub employs industry-standard technical, managerial, and physical security measures to protect the security, confidentiality, and integrity of Your data. However, We cannot guarantee that unauthorized access, hacking attacks, data loss, or other breaches will never occur. LobeHub is not liable for any damages or liabilities related to security incidents. Please refer to our Privacy Policy for more detailed information.
|
||||
|
||||
## Termination of Services[ ](https://lobehub.com/zh/terms#termination-of-services)
|
||||
|
||||
You may close Your account and cease using the Services at any time. In the event of a violation of the terms of the agreement, LobeHub may immediately suspend or terminate Your access to the Services. Upon termination, You will immediately lose the right to access or use the Services. LobeHub will not be liable to You or any third party for the termination of the Services.
|
||||
|
||||
## Disclaimer of Warranties[ ](https://lobehub.com/zh/terms#disclaimer-of-warranties)
|
||||
|
||||
The Services provided by LobeHub are provided on an "as-is" basis, and without any form of guarantee. We explicitly disclaim all warranties, whether express, implied, statutory, or otherwise, including but not limited to warranties of merchantability, fitness for a particular purpose, and non-infringement. Your use of the Services is at Your own risk.
|
||||
|
||||
## Limitation of Liability[ ](https://lobehub.com/zh/terms#limitation-of-liability)
|
||||
|
||||
In no event shall LobeHub, its Affiliates, directors, employees, or agents be liable for any direct, indirect, punitive, incidental, special, or consequential damages arising from or related to Your use or inability to use the Services. This limitation applies regardless of the basis or form of action.
|
||||
|
||||
## Modification of Terms[ ](https://lobehub.com/zh/terms#modification-of-terms)
|
||||
|
||||
We may revise this agreement periodically, and the new version of the agreement will replace the previous version. We will indicate the "last updated" date at the beginning and provide notice within the Services to inform You of significant changes. It is Your responsibility to regularly review these legal terms to stay informed of any updates. By continuing to use the Services after the revised legal terms are posted, You will be deemed to have understood and accepted any changes to the revised legal terms.
|
||||
|
||||
## Governing Law and Jurisdiction[ ](https://lobehub.com/zh/terms#governing-law-and-jurisdiction)
|
||||
|
||||
This agreement shall be governed by the laws of the State of Delaware, and You agree to submit to the exclusive jurisdiction of the state and federal courts located in Delaware for the resolution of any disputes related to this agreement or the Services. You may also be required to comply with the laws of Your local jurisdiction, state, country, or international laws when using the Services.
|
||||
|
||||
## Conclusion[ ](https://lobehub.com/zh/terms#conclusion)
|
||||
|
||||
This agreement represents the entire agreement between You and LobeHub regarding the use of the Services. It supersedes any prior agreements or understandings. The failure of LobeHub to enforce any provision of this agreement does not constitute a waiver of its rights.
|
||||
|
||||
By accessing or using the LobeHub Services, You acknowledge that You have read, understood, and agreed to be bound by this agreement. If You have any questions regarding this agreement, please contact us at[support@lobehub.com](mailto:support@lobehub.com).",
|
||||
"dir": null,
|
||||
"excerpt": "Lasted Updated at",
|
||||
"lang": null,
|
||||
"length": 18284,
|
||||
"publishedTime": null,
|
||||
"siteName": null,
|
||||
"textContent": "
|
||||
|
||||
|
||||
Lasted Updated at
|
||||
2024-03-01
|
||||
|
||||
|
||||
|
||||
Welcome to LobeHub! Please carefully read the following Terms of Use (hereinafter
|
||||
referred to as the "Agreement"). This Agreement constitutes a legally binding
|
||||
agreement between You and LobeHub regarding the access and use of the LobeHub
|
||||
software applications, services, and websites (collectively referred to as the
|
||||
"Services").
|
||||
|
||||
|
||||
By accessing or using the Services in any way, You acknowledge that You have read,
|
||||
understood, and agreed to be bound by all the terms of this Agreement. If You do not
|
||||
agree to any part of this Agreement, You are not permitted to continue accessing or
|
||||
using the Services.
|
||||
|
||||
|
||||
Definitions
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
The words of which the initial letter is capitalized have meanings defined under the
|
||||
following conditions. The following definitions shall have the same meaning
|
||||
regardless of whether they appear in singular or in plural.
|
||||
|
||||
|
||||
|
||||
Affiliate means an entity that controls, is controlled by or is
|
||||
under common control with a party, where "control" means ownership of 50% or more
|
||||
of the shares, equity interest or other securities entitled to vote for election
|
||||
of directors or other managing authority.
|
||||
|
||||
Agreement means this Terms of Use Agreement.
|
||||
|
||||
Company (referred to as either "the Company", "We", "Us" or "Our"
|
||||
in this Agreement) refers to LobeHub LLC.
|
||||
|
||||
|
||||
Service means the LobeHub software applications, services, and
|
||||
website.
|
||||
|
||||
|
||||
You means the individual accessing or using the Services, or the
|
||||
company, or other legal entity on behalf of which such individual is accessing or
|
||||
using the Services, as applicable.
|
||||
|
||||
|
||||
|
||||
Our Services
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
LobeHub provides a platform and interface that enables users to interact with
|
||||
artificial intelligence technologies, including but not limited to natural language
|
||||
processing models or content generation models developed independently or provided
|
||||
by third parties such as Google, Microsoft, OpenAI, and other commercial companies
|
||||
as well as open-source communities. The Service facilitates functions such as
|
||||
information retrieval, content creation, and automation through user interaction
|
||||
with AI systems. Additionally, it utilizes cloud technology to provide capabilities
|
||||
like data synchronization, vector data storage, server-side functionalities, etc.,
|
||||
to enhance the interactive experience with AI models.
|
||||
|
||||
|
||||
Eligibility
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
By accessing or using the Services, You represent and warrant to the Company that
|
||||
You: (1)Are of legal age (18 years and above). (2)Have legal capacity and agree to
|
||||
abide by these terms. (3)Will use the Services in accordance with this Agreement and
|
||||
all applicable laws. (4)Will not use the Services for any illegal, harmful,
|
||||
dangerous, or offensive purposes.
|
||||
|
||||
Examples of prohibited activities include but are not limited to:
|
||||
|
||||
Illegal activities
|
||||
Infringement of intellectual property rights
|
||||
Generating harmful, unsafe, deceptive, or illegal content
|
||||
Impersonation, fraud
|
||||
|
||||
|
||||
If You do not comply with the usage conditions, We reserve the right to suspend or
|
||||
terminate Your account and refuse any and all current or future use of the Services
|
||||
(or any part thereof).
|
||||
|
||||
|
||||
Account Registration
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
To access the Services, You must register an account by providing true, accurate,
|
||||
up-to-date, and complete information. You are solely responsible for all activities
|
||||
that occur under Your account, including maintaining the security of Your account
|
||||
and restricting access. You must immediately notify LobeHub of any unauthorized
|
||||
account use or other security breaches.
|
||||
|
||||
|
||||
Please ensure to keep Your password secure and take responsibility for all use of
|
||||
Your account and password. If We deem the chosen username inappropriate, containing
|
||||
obscene content, or otherwise offensive, We reserve the right to delete, revoke, or
|
||||
modify that username.
|
||||
|
||||
|
||||
Purchases and Payments
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
You agree to provide current, complete, and accurate purchase and account
|
||||
information for all purchases made using the Services. You also agree to promptly
|
||||
update Your account and payment information, including email address, payment
|
||||
method, and payment card expiration date, to allow us to complete Your transactions
|
||||
and contact You when necessary. Sales tax will be added to the purchase price as
|
||||
required by law.
|
||||
|
||||
|
||||
You agree to pay all charges at the current purchase price and authorize us to
|
||||
charge any such amounts to Your chosen payment provider at the time of purchase. If
|
||||
Your order requires recurring charges, You agree that We may charge Your payment
|
||||
method on a recurring basis at the specified intervals without obtaining prior
|
||||
approval for each recurring charge until the relevant order is canceled. We reserve
|
||||
the right to correct any errors or pricing errors even after payment has been
|
||||
requested or accepted.
|
||||
|
||||
|
||||
We may utilize third-party payment processing services (such as Stripe) for payment
|
||||
processing. You may use a valid card (credit or debit card) for payment, subject to
|
||||
verification and authorization by Your card issuer. We will not be liable for any
|
||||
delays or failure to provide Services resulting from payment failures due to
|
||||
authorization issues or any reasons related to third-party payment providers.
|
||||
|
||||
|
||||
We reserve the right to refuse or cancel Your order at any time for certain reasons,
|
||||
including but not limited to: (1) Service availability, (2) errors in Service
|
||||
description or pricing, (3) order errors, (4) suspected fraud or unauthorized or
|
||||
illegal transactions. We reserve the right, at our sole discretion, to limit or
|
||||
prohibit orders placed by dealers, resellers, or distributors.
|
||||
|
||||
|
||||
Fee Changes
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
We reserve the right to adjust the Service fees at our discretion and at any time.
|
||||
Any changes in fees will take effect immediately upon the change. Services that have
|
||||
already been paid for and purchased will not be affected.
|
||||
|
||||
|
||||
If Your order requires recurring automatic billing, the revised price will take
|
||||
effect on the next billing cycle. We will notify You in advance of any fee
|
||||
adjustments so that You have the opportunity to cancel the order before the
|
||||
adjustment takes effect. If You do not cancel the order and continue to use the
|
||||
Services, You agree to pay the revised fee amount.
|
||||
|
||||
|
||||
Refunds
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
For Services that have been purchased but not used, We support refunds within 30
|
||||
days of payment. However, for Services that have been used or purchased for more
|
||||
than 30 days, We will not accept refund requests.
|
||||
|
||||
|
||||
For subscription-based Services where partial usage has occurred, Your refund
|
||||
request will be reviewed on a case-by-case basis, and the final decision on
|
||||
approving the refund will be at the Company's discretion.
|
||||
|
||||
|
||||
Content
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Our Services allows You to generate and publish content. You are responsible for the
|
||||
legality, reliability, and appropriateness of the content generated using the AI
|
||||
ability. We do not assume responsibility for user-generated content on the Services.
|
||||
You explicitly understand and agree that You are solely responsible for the content
|
||||
You post and all activities conducted under Your account, whether by Yourself or by
|
||||
third parties using Your account.
|
||||
|
||||
|
||||
By generating and publishing content in the Services, You grant us the rights and
|
||||
licenses necessary to use, modify, publicly perform, publicly display, copy, and
|
||||
distribute such content within the Services. You retain full ownership of all
|
||||
content created, published, or displayed within the Services and are responsible for
|
||||
maintaining these rights. You agree that this license includes the permission for us
|
||||
to provide Your content to other Service users for their use under these terms.
|
||||
Additionally, You declare and warrant that: (1) the content is owned by You or You
|
||||
have the legal right to use and authorize it to us under this agreement. (2) posting
|
||||
the shared information in the Services will not infringe upon the privacy rights,
|
||||
image rights, copyrights, contractual relationships, or other individual rights of
|
||||
others.
|
||||
|
||||
|
||||
All content generated by You is by default stored locally on the client-side, and
|
||||
You are responsible for the storage and backup of Your content.
|
||||
|
||||
|
||||
Additionally, We offer optional cloud sync content functionality. By using this
|
||||
feature, You agree that We may retain complete and accurate copies of any content in
|
||||
locations independent of the Services in our manner. However, We cannot guarantee
|
||||
that data will not be lost or damaged. Data or content loss or damage can occur due
|
||||
to various reasons, such as pre-existing damage before synchronization or changes
|
||||
during synchronization.
|
||||
|
||||
|
||||
We do not assume any responsibility for the security and integrity of content in the
|
||||
event of content damage or loss under any circumstances.
|
||||
|
||||
|
||||
Intellectual Property Rights
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
LobeHub reserves all rights to the technology, software, first-party content, and
|
||||
data within the Services, including but not limited to patents, trademarks, trade
|
||||
secrets, copyrights, and other intellectual property rights. Your permission to use
|
||||
the Services does not grant You any ownership or title. You are not permitted to
|
||||
copy, modify, adapt, translate, create derivative works, reverse engineer,
|
||||
disassemble, or decompile the Services or any part thereof. If You wish to
|
||||
participate in collaborative technical development, please engage through our GitHub
|
||||
open-source community and adhere to the relevant open-source licenses.
|
||||
|
||||
|
||||
Privacy and Security
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
LobeHub employs industry-standard technical, managerial, and physical security
|
||||
measures to protect the security, confidentiality, and integrity of Your data.
|
||||
However, We cannot guarantee that unauthorized access, hacking attacks, data loss,
|
||||
or other breaches will never occur. LobeHub is not liable for any damages or
|
||||
liabilities related to security incidents. Please refer to our Privacy Policy for
|
||||
more detailed information.
|
||||
|
||||
|
||||
Termination of Services
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
You may close Your account and cease using the Services at any time. In the event of
|
||||
a violation of the terms of the agreement, LobeHub may immediately suspend or
|
||||
terminate Your access to the Services. Upon termination, You will immediately lose
|
||||
the right to access or use the Services. LobeHub will not be liable to You or any
|
||||
third party for the termination of the Services.
|
||||
|
||||
|
||||
Disclaimer of Warranties
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
The Services provided by LobeHub are provided on an "as-is" basis, and without any
|
||||
form of guarantee. We explicitly disclaim all warranties, whether express, implied,
|
||||
statutory, or otherwise, including but not limited to warranties of merchantability,
|
||||
fitness for a particular purpose, and non-infringement. Your use of the Services is
|
||||
at Your own risk.
|
||||
|
||||
|
||||
Limitation of Liability
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
In no event shall LobeHub, its Affiliates, directors, employees, or agents be liable
|
||||
for any direct, indirect, punitive, incidental, special, or consequential damages
|
||||
arising from or related to Your use or inability to use the Services. This
|
||||
limitation applies regardless of the basis or form of action.
|
||||
|
||||
|
||||
Modification of Terms
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
We may revise this agreement periodically, and the new version of the agreement will
|
||||
replace the previous version. We will indicate the "last updated" date at the
|
||||
beginning and provide notice within the Services to inform You of significant
|
||||
changes. It is Your responsibility to regularly review these legal terms to stay
|
||||
informed of any updates. By continuing to use the Services after the revised legal
|
||||
terms are posted, You will be deemed to have understood and accepted any changes to
|
||||
the revised legal terms.
|
||||
|
||||
|
||||
Governing Law and Jurisdiction
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
This agreement shall be governed by the laws of the State of Delaware, and You agree
|
||||
to submit to the exclusive jurisdiction of the state and federal courts located in
|
||||
Delaware for the resolution of any disputes related to this agreement or the
|
||||
Services. You may also be required to comply with the laws of Your local
|
||||
jurisdiction, state, country, or international laws when using the Services.
|
||||
|
||||
|
||||
Conclusion
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
This agreement represents the entire agreement between You and LobeHub regarding the
|
||||
use of the Services. It supersedes any prior agreements or understandings. The
|
||||
failure of LobeHub to enforce any provision of this agreement does not constitute a
|
||||
waiver of its rights.
|
||||
|
||||
|
||||
By accessing or using the LobeHub Services, You acknowledge that You have read,
|
||||
understood, and agreed to be bound by this agreement. If You have any questions
|
||||
regarding this agreement, please contact us at
|
||||
support@lobehub.com.
|
||||
|
||||
",
|
||||
"title": "Terms of Service · LobeHub",
|
||||
}
|
||||
`;
|
||||
|
||||
exports[`htmlToMarkdown > should transform yingchao.html to markdown 1`] = `
|
||||
{
|
||||
"byline": null,
|
||||
"content": " 资讯
|
||||
|
||||
全部 NBA CBA 英超 法甲 意甲 德甲 西甲 综合 专题 预测
|
||||
|
||||
比赛
|
||||
|
||||
全部 NBA CBA FIBA 英超 法甲 意甲 德甲 西甲 美职联 沙特联 欧洲杯 美洲杯
|
||||
|
||||
视频
|
||||
|
||||
回放 集锦
|
||||
|
||||
图库
|
||||
|
||||
图集 壁纸
|
||||
|
||||
数据
|
||||
|
||||
NBA CBA 英超 德甲 西甲 意甲 法甲 美职联 沙特联 球员PK 球知 百科
|
||||
|
||||
装备
|
||||
|
||||
最新 最热
|
||||
|
||||
发现
|
||||
|
||||
推荐 关注
|
||||
|
||||
NBA CBA 英超 德甲 西甲 意甲 法甲 美职联 沙特联 球员PK 球知 百科
|
||||
|
||||
球队 场次 胜/平/负 积分 进/失球 净胜球
|
||||
|
||||
1
|
||||
|
||||
利物浦
|
||||
|
||||
28 20/7/1 67 66/26 40 2
|
||||
|
||||
阿森纳
|
||||
|
||||
27 15/9/3 54 51/23 28 3
|
||||
|
||||
诺丁汉森林
|
||||
|
||||
27 14/6/7 48 44/33 11 4
|
||||
|
||||
曼城
|
||||
|
||||
27 14/5/8 47 53/37 16 5
|
||||
|
||||
切尔西
|
||||
|
||||
27 13/7/7 46 52/36 16 6
|
||||
|
||||
纽卡斯尔
|
||||
|
||||
27 13/5/9 44 46/38 8 7
|
||||
|
||||
伯恩茅斯
|
||||
|
||||
27 12/7/8 43 45/32 13 8
|
||||
|
||||
布莱顿
|
||||
|
||||
27 11/10/6 43 44/39 5 9
|
||||
|
||||
富勒姆
|
||||
|
||||
27 11/9/7 42 40/36 4 10
|
||||
|
||||
阿斯顿维拉
|
||||
|
||||
28 11/9/8 42 40/45 \\-5 11
|
||||
|
||||
布伦特福德
|
||||
|
||||
27 11/5/11 38 48/43 5 12
|
||||
|
||||
水晶宫
|
||||
|
||||
27 9/9/9 36 35/33 2 13
|
||||
|
||||
热刺
|
||||
|
||||
27 10/3/14 33 53/39 14 14
|
||||
|
||||
曼联
|
||||
|
||||
27 9/6/12 33 33/39 \\-6 15
|
||||
|
||||
埃弗顿
|
||||
|
||||
27 7/11/9 32 30/34 \\-4 16
|
||||
|
||||
西汉姆
|
||||
|
||||
26 8/6/12 30 30/47 \\-17 17
|
||||
|
||||
狼队
|
||||
|
||||
27 6/4/17 22 37/56 \\-19 18
|
||||
|
||||
伊普斯维奇
|
||||
|
||||
27 3/8/16 17 26/57 \\-31 19
|
||||
|
||||
莱切斯特
|
||||
|
||||
26 4/5/17 17 25/59 \\-34 20
|
||||
|
||||
南安普敦
|
||||
|
||||
27 2/3/22 9 19/65 \\-46
|
||||
|
||||
关于我们
|
||||
|
||||
关于我们 免责声明 联系我们 用户协议 隐私政策 账户注销 成长规则 侵权投诉
|
||||
|
||||
服务
|
||||
|
||||
篮球百科 建议反馈
|
||||
|
||||
copyright © 2016 - 2025 qiumiwu.com All Rights Reserved
|
||||
|
||||
粤公网安备 44190002004105号 粤ICP备16062857号 增值电信业务经营许可证粤B2-20210041 粤网文\\[2021\\]4047-607号
|
||||
|
||||
客服微信 qiumiwu
|
||||
|
||||
意见反馈
|
||||
|
||||
温馨提示
|
||||
|
||||
扫描二维码,下载球迷屋App,获得更好的使用体验",
|
||||
"dir": null,
|
||||
"excerpt": "球迷屋为您提供2024-2025赛季英超积分排行榜,包含所有英超球队的全部赛季的排行榜数据,包含了英超球队的排名、场次、胜平负、进球、失球、积分等等详细积分数据,让大家迅速了解英超积分排行榜的数据。",
|
||||
"lang": null,
|
||||
"length": 201,
|
||||
"publishedTime": null,
|
||||
"siteName": null,
|
||||
"textContent": "
|
||||
copyright © 2016 - 2025 qiumiwu.com All Rights Reserved
|
||||
|
||||
|
||||
|
||||
粤公网安备 44190002004105号
|
||||
粤ICP备16062857号
|
||||
增值电信业务经营许可证粤B2-20210041
|
||||
粤网文[2021]4047-607号
|
||||
|
||||
",
|
||||
"title": "英超排行榜|英超积分榜2024-2025赛季 - 球迷屋",
|
||||
}
|
||||
`;
|
||||
@@ -0,0 +1,26 @@
|
||||
import { applyUrlRules } from './appUrlRules';
|
||||
|
||||
describe('applyUrlRules', () => {
|
||||
it('github file rules', () => {
|
||||
const result = applyUrlRules(
|
||||
'https://github.com/lobehub/chat-plugin-web-crawler/blob/main/api/v1/_utils.ts',
|
||||
[
|
||||
{
|
||||
filterOptions: {
|
||||
enableReadability: false,
|
||||
},
|
||||
urlPattern: 'https://github.com/([^/]+)/([^/]+)/blob/([^/]+)/(.*)',
|
||||
urlTransform: 'https://github.com/$1/$2/raw/refs/heads/$3/$4',
|
||||
},
|
||||
],
|
||||
);
|
||||
|
||||
expect(result).toEqual({
|
||||
filterOptions: {
|
||||
enableReadability: false,
|
||||
},
|
||||
transformedUrl:
|
||||
'https://github.com/lobehub/chat-plugin-web-crawler/raw/refs/heads/main/api/v1/_utils.ts',
|
||||
});
|
||||
});
|
||||
});
|
||||
@@ -0,0 +1,40 @@
|
||||
import { CrawlUrlRule } from '../type';
|
||||
|
||||
export const applyUrlRules = (
|
||||
url: string,
|
||||
urlRules: CrawlUrlRule[],
|
||||
): {
|
||||
filterOptions?: CrawlUrlRule['filterOptions'];
|
||||
transformedUrl: string;
|
||||
} => {
|
||||
for (const rule of urlRules) {
|
||||
// 转换为正则表达式
|
||||
const regex = new RegExp(rule.urlPattern);
|
||||
const match = url.match(regex);
|
||||
|
||||
if (match) {
|
||||
if (rule.urlTransform) {
|
||||
// 如果有转换规则,进行 URL 转换
|
||||
// 替换 $1, $2 等占位符为捕获组内容
|
||||
const transformedUrl = rule.urlTransform.replaceAll(
|
||||
/\$(\d+)/g,
|
||||
(_, index) => match[parseInt(index)] || '',
|
||||
);
|
||||
|
||||
return {
|
||||
filterOptions: rule.filterOptions,
|
||||
transformedUrl,
|
||||
};
|
||||
} else {
|
||||
// 没有转换规则但匹配了模式,只返回过滤选项
|
||||
return {
|
||||
filterOptions: rule.filterOptions,
|
||||
transformedUrl: url,
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// 没有匹配任何规则,返回原始 URL
|
||||
return { transformedUrl: url };
|
||||
};
|
||||
@@ -0,0 +1,12 @@
|
||||
export class PageNotFoundError extends Error {
|
||||
constructor(message: string) {
|
||||
super(message);
|
||||
this.name = 'PageNotFoundError';
|
||||
}
|
||||
}
|
||||
export class NetworkConnectionError extends Error {
|
||||
constructor() {
|
||||
super('Network connection error');
|
||||
this.name = 'NetworkConnectionError';
|
||||
}
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,35 @@
|
||||
import { readFileSync } from 'node:fs';
|
||||
import * as path from 'node:path';
|
||||
import { expect } from 'vitest';
|
||||
|
||||
import { FilterOptions } from '../type';
|
||||
import { htmlToMarkdown } from './htmlToMarkdown';
|
||||
|
||||
interface TestItem {
|
||||
file: string;
|
||||
url: string;
|
||||
filterOptions?: FilterOptions;
|
||||
}
|
||||
const list: TestItem[] = [
|
||||
{
|
||||
file: 'terms.html',
|
||||
url: 'https://lobehub.com/terms',
|
||||
},
|
||||
{
|
||||
file: 'yingchao.html',
|
||||
url: 'https://www.qiumiwu.com/standings/yingchao',
|
||||
filterOptions: { pureText: true, enableReadability: false },
|
||||
},
|
||||
];
|
||||
|
||||
describe('htmlToMarkdown', () => {
|
||||
list.forEach((item) => {
|
||||
it(`should transform ${item.file} to markdown`, () => {
|
||||
const html = readFileSync(path.join(__dirname, `./html/${item.file}`), { encoding: 'utf8' });
|
||||
|
||||
const data = htmlToMarkdown(html, { url: item.url, filterOptions: item.filterOptions || {} });
|
||||
|
||||
expect(data).toMatchSnapshot();
|
||||
});
|
||||
});
|
||||
});
|
||||
@@ -0,0 +1,45 @@
|
||||
import { Readability } from '@mozilla/readability';
|
||||
import { Window } from 'happy-dom';
|
||||
import { NodeHtmlMarkdown, type TranslatorConfigObject } from 'node-html-markdown';
|
||||
|
||||
import { FilterOptions } from '../type';
|
||||
|
||||
export const htmlToMarkdown = (
|
||||
html: string,
|
||||
{ url, filterOptions }: { filterOptions: FilterOptions; url: string },
|
||||
) => {
|
||||
const window = new Window({ url });
|
||||
|
||||
const document = window.document;
|
||||
document.body.innerHTML = html;
|
||||
|
||||
// @ts-expect-error reason: Readability expects a Document type
|
||||
const parsedContent = new Readability(document).parse();
|
||||
|
||||
const useReadability = filterOptions.enableReadability ?? true;
|
||||
|
||||
let htmlNode = html;
|
||||
|
||||
if (useReadability && parsedContent?.content) {
|
||||
htmlNode = parsedContent?.content;
|
||||
}
|
||||
|
||||
const customTranslators = (
|
||||
filterOptions.pureText
|
||||
? {
|
||||
a: {
|
||||
postprocess: (_: string, content: string) => content,
|
||||
},
|
||||
img: {
|
||||
ignore: true,
|
||||
},
|
||||
}
|
||||
: {}
|
||||
) as TranslatorConfigObject;
|
||||
|
||||
const nodeHtmlMarkdown = new NodeHtmlMarkdown({}, customTranslators);
|
||||
|
||||
const content = nodeHtmlMarkdown.translate(htmlNode);
|
||||
|
||||
return { ...parsedContent, content };
|
||||
};
|
||||
@@ -0,0 +1,20 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
"module": "CommonJS",
|
||||
"target": "ESNext",
|
||||
"lib": ["dom", "dom.iterable", "esnext"],
|
||||
"sourceMap": true,
|
||||
"skipDefaultLibCheck": true,
|
||||
"jsx": "react-jsx",
|
||||
"baseUrl": ".",
|
||||
"allowSyntheticDefaultImports": true,
|
||||
"moduleResolution": "node",
|
||||
"forceConsistentCasingInFileNames": true,
|
||||
"noImplicitReturns": true,
|
||||
"noUnusedLocals": true,
|
||||
"resolveJsonModule": true,
|
||||
"skipLibCheck": true,
|
||||
"strict": true,
|
||||
"types": ["vitest/globals"]
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
packages:
|
||||
- 'packages/**'
|
||||
- '.'
|
||||
@@ -1,14 +1,9 @@
|
||||
import { Icon } from '@lobehub/ui';
|
||||
import { ConfigProvider, Empty } from 'antd';
|
||||
import { useTheme } from 'antd-style';
|
||||
import { LucideSquareArrowLeft, LucideSquareArrowRight } from 'lucide-react';
|
||||
import { memo, useContext, useEffect } from 'react';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
import { Center, Flexbox } from 'react-layout-kit';
|
||||
import { memo, useEffect } from 'react';
|
||||
import { Flexbox } from 'react-layout-kit';
|
||||
|
||||
import PluginRender from '@/features/PluginsUI/Render';
|
||||
import { useChatStore } from '@/store/chat';
|
||||
import { chatPortalSelectors, chatSelectors } from '@/store/chat/selectors';
|
||||
import { chatSelectors } from '@/store/chat/selectors';
|
||||
import { ChatMessage } from '@/types/message';
|
||||
|
||||
import Arguments from './Arguments';
|
||||
@@ -30,14 +25,7 @@ const CustomRender = memo<CustomRenderProps>(
|
||||
setShowPluginRender,
|
||||
pluginError,
|
||||
}) => {
|
||||
const [loading, isMessageToolUIOpen] = useChatStore((s) => [
|
||||
chatSelectors.isPluginApiInvoking(id)(s),
|
||||
chatPortalSelectors.isPluginUIOpen(id)(s),
|
||||
]);
|
||||
const { direction } = useContext(ConfigProvider.ConfigContext);
|
||||
const { t } = useTranslation('plugin');
|
||||
|
||||
const theme = useTheme();
|
||||
const [loading] = useChatStore((s) => [chatSelectors.isPluginApiInvoking(id)(s)]);
|
||||
|
||||
useEffect(() => {
|
||||
if (!plugin?.type || loading) return;
|
||||
@@ -45,25 +33,6 @@ const CustomRender = memo<CustomRenderProps>(
|
||||
setShowPluginRender(plugin?.type !== 'default');
|
||||
}, [plugin?.type, loading]);
|
||||
|
||||
if (isMessageToolUIOpen)
|
||||
return (
|
||||
<Center paddingBlock={8} style={{ background: theme.colorFillQuaternary, borderRadius: 4 }}>
|
||||
<Empty
|
||||
description={t('showInPortal')}
|
||||
image={
|
||||
<Icon
|
||||
color={theme.colorTextQuaternary}
|
||||
icon={direction === 'rtl' ? LucideSquareArrowLeft : LucideSquareArrowRight}
|
||||
size={'large'}
|
||||
/>
|
||||
}
|
||||
styles={{
|
||||
image: { height: 24 },
|
||||
}}
|
||||
/>
|
||||
</Center>
|
||||
);
|
||||
|
||||
if (loading) return <Arguments arguments={requestArgs} shine />;
|
||||
|
||||
return (
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
import { Suspense, memo } from 'react';
|
||||
|
||||
import { LOADING_FLAT } from '@/const/message';
|
||||
import ErrorResponse from '@/features/Conversation/Messages/Assistant/Tool/Render/ErrorResponse';
|
||||
import { useChatStore } from '@/store/chat';
|
||||
import { chatSelectors } from '@/store/chat/selectors';
|
||||
|
||||
import Arguments from './Arguments';
|
||||
import CustomRender from './CustomRender';
|
||||
import ErrorResponse from './ErrorResponse';
|
||||
|
||||
interface RenderProps {
|
||||
messageId: string;
|
||||
|
||||
@@ -7,6 +7,7 @@ import Loading from '../Loading';
|
||||
import { useParseContent } from '../useParseContent';
|
||||
|
||||
export interface BuiltinTypeProps {
|
||||
apiName?: string;
|
||||
arguments?: string;
|
||||
content: string;
|
||||
id: string;
|
||||
@@ -25,6 +26,7 @@ const BuiltinType = memo<BuiltinTypeProps>(
|
||||
identifier,
|
||||
loading,
|
||||
pluginError,
|
||||
apiName,
|
||||
}) => {
|
||||
const { isJSON, data } = useParseContent(content);
|
||||
|
||||
@@ -40,6 +42,7 @@ const BuiltinType = memo<BuiltinTypeProps>(
|
||||
|
||||
return (
|
||||
<Render
|
||||
apiName={apiName}
|
||||
args={args}
|
||||
content={data}
|
||||
identifier={identifier}
|
||||
|
||||
@@ -40,6 +40,7 @@ const PluginRender = memo<PluginRenderProps>(
|
||||
case 'builtin': {
|
||||
return (
|
||||
<BuiltinType
|
||||
apiName={payload?.apiName}
|
||||
arguments={argumentsStr}
|
||||
content={content}
|
||||
id={id}
|
||||
|
||||
@@ -40,6 +40,7 @@ const ToolRender = memo(() => {
|
||||
|
||||
return (
|
||||
<Render
|
||||
apiName={plugin.apiName}
|
||||
arguments={args}
|
||||
identifier={plugin.identifier}
|
||||
messageId={messageId}
|
||||
|
||||
@@ -141,6 +141,18 @@ export default {
|
||||
close: '删除',
|
||||
confirm: '已完成配置并重试',
|
||||
},
|
||||
crawPages: {
|
||||
crawling: '链接识别中',
|
||||
detail: {
|
||||
preview: '预览',
|
||||
raw: '原始文本',
|
||||
tooLong: '文本内容过长,对话上下文仅保留前 10000 字符,超过部分不计入会话上下文',
|
||||
},
|
||||
meta: {
|
||||
crawler: '抓取模式',
|
||||
words: '字符数',
|
||||
},
|
||||
},
|
||||
searchxng: {
|
||||
baseURL: '请输入',
|
||||
description: '请输入 SearchXNG 的网址,即可开始联网搜索',
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
import { Crawler } from '@lobechat/web-crawler';
|
||||
import { TRPCError } from '@trpc/server';
|
||||
import pMap from 'p-map';
|
||||
import { z } from 'zod';
|
||||
|
||||
import { toolsEnv } from '@/config/tools';
|
||||
@@ -10,6 +12,27 @@ import { SEARCH_SEARXNG_NOT_CONFIG } from '@/types/tool/search';
|
||||
const searchProcedure = isServerMode ? authedProcedure : passwordProcedure;
|
||||
|
||||
export const searchRouter = router({
|
||||
crawlPages: searchProcedure
|
||||
.input(
|
||||
z.object({
|
||||
impls: z.string().array().optional(),
|
||||
urls: z.string().array(),
|
||||
}),
|
||||
)
|
||||
.mutation(async ({ input }) => {
|
||||
const crawler = new Crawler();
|
||||
|
||||
const results = await pMap(
|
||||
input.urls,
|
||||
async (url) => {
|
||||
return await crawler.crawl({ impls: input.impls, url });
|
||||
},
|
||||
{ concurrency: 10 },
|
||||
);
|
||||
|
||||
return { results };
|
||||
}),
|
||||
|
||||
query: searchProcedure
|
||||
.input(
|
||||
z.object({
|
||||
|
||||
@@ -4,6 +4,14 @@ class SearchService {
|
||||
search(query: string, searchEngine?: string[]) {
|
||||
return toolsClient.search.query.query({ query, searchEngine });
|
||||
}
|
||||
|
||||
crawlPage(url: string) {
|
||||
return toolsClient.search.crawlPages.mutate({ urls: [url] });
|
||||
}
|
||||
|
||||
crawlPages(urls: string[]) {
|
||||
return toolsClient.search.crawlPages.mutate({ urls });
|
||||
}
|
||||
}
|
||||
|
||||
export const searchService = new SearchService();
|
||||
|
||||
@@ -13,6 +13,16 @@ import {
|
||||
import { nanoid } from '@/utils/uuid';
|
||||
|
||||
export interface SearchAction {
|
||||
crawlMultiPages: (
|
||||
id: string,
|
||||
params: { urls: string[] },
|
||||
aiSummary?: boolean,
|
||||
) => Promise<boolean | undefined>;
|
||||
crawlSinglePage: (
|
||||
id: string,
|
||||
params: { url: string },
|
||||
aiSummary?: boolean,
|
||||
) => Promise<boolean | undefined>;
|
||||
/**
|
||||
* 重新发起搜索
|
||||
* @description 会更新插件的 arguments 参数,然后再次搜索
|
||||
@@ -28,6 +38,7 @@ export interface SearchAction {
|
||||
data: SearchQuery,
|
||||
aiSummary?: boolean,
|
||||
) => Promise<void | boolean>;
|
||||
togglePageContent: (url: string) => void;
|
||||
toggleSearchLoading: (id: string, loading: boolean) => void;
|
||||
}
|
||||
|
||||
@@ -37,12 +48,47 @@ export const searchSlice: StateCreator<
|
||||
[],
|
||||
SearchAction
|
||||
> = (set, get) => ({
|
||||
crawlMultiPages: async (id, params, aiSummary = true) => {
|
||||
const { internal_updateMessageContent } = get();
|
||||
get().toggleSearchLoading(id, true);
|
||||
const response = await searchService.crawlPages(params.urls);
|
||||
|
||||
await get().updatePluginState(id, response);
|
||||
get().toggleSearchLoading(id, false);
|
||||
const { results } = response;
|
||||
|
||||
if (!results) return;
|
||||
|
||||
const content = results.map((item) =>
|
||||
'errorMessage' in item
|
||||
? item
|
||||
: {
|
||||
...item.data,
|
||||
// if crawl too many content
|
||||
// slice the top 10000 char
|
||||
content: item.data.content?.slice(0, 10_000),
|
||||
},
|
||||
);
|
||||
|
||||
await internal_updateMessageContent(id, JSON.stringify(content));
|
||||
|
||||
// if aiSummary is true, then trigger ai message
|
||||
return aiSummary;
|
||||
},
|
||||
|
||||
crawlSinglePage: async (id, params, aiSummary) => {
|
||||
const { crawlMultiPages } = get();
|
||||
|
||||
return await crawlMultiPages(id, { urls: [params.url] }, aiSummary);
|
||||
},
|
||||
|
||||
reSearchWithSearXNG: async (id, data, options) => {
|
||||
get().toggleSearchLoading(id, true);
|
||||
await get().updatePluginArguments(id, data);
|
||||
|
||||
await get().searchWithSearXNG(id, data, options?.aiSummary);
|
||||
},
|
||||
|
||||
saveSearXNGSearchResult: async (id) => {
|
||||
const message = chatSelectors.getMessageById(id)(get());
|
||||
if (!message || !message.plugin) return;
|
||||
@@ -133,6 +179,10 @@ export const searchSlice: StateCreator<
|
||||
return aiSummary;
|
||||
},
|
||||
|
||||
togglePageContent: (url) => {
|
||||
set({ activePageContentUrl: url });
|
||||
},
|
||||
|
||||
toggleSearchLoading: (id, loading) => {
|
||||
set(
|
||||
{ searchLoading: { ...get().searchLoading, [id]: loading } },
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
import { FileItem } from '@/types/files';
|
||||
|
||||
export interface ChatToolState {
|
||||
activePageContentUrl?: string;
|
||||
dalleImageLoading: Record<string, boolean>;
|
||||
dalleImageMap: Record<string, FileItem>;
|
||||
searchLoading: Record<string, boolean>;
|
||||
|
||||
@@ -0,0 +1,190 @@
|
||||
import { Alert, CopyButton, Icon, Markdown } from '@lobehub/ui';
|
||||
import { Descriptions, Segmented, Typography } from 'antd';
|
||||
import { createStyles } from 'antd-style';
|
||||
import { ExternalLink } from 'lucide-react';
|
||||
import Link from 'next/link';
|
||||
import { memo, useState } from 'react';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
import { Flexbox } from 'react-layout-kit';
|
||||
|
||||
import { CrawlResult } from '@/types/tool/crawler';
|
||||
|
||||
const useStyles = createStyles(({ token, css }) => {
|
||||
return {
|
||||
cardBody: css`
|
||||
padding-block: 12px 8px;
|
||||
padding-inline: 16px;
|
||||
`,
|
||||
container: css`
|
||||
cursor: pointer;
|
||||
|
||||
overflow: hidden;
|
||||
|
||||
max-width: 360px;
|
||||
border: 1px solid ${token.colorBorderSecondary};
|
||||
border-radius: 12px;
|
||||
|
||||
transition: border-color 0.2s;
|
||||
|
||||
:hover {
|
||||
border-color: ${token.colorPrimary};
|
||||
}
|
||||
`,
|
||||
description: css`
|
||||
margin-block: 0 4px !important;
|
||||
color: ${token.colorTextSecondary};
|
||||
`,
|
||||
detailsSection: css`
|
||||
padding-block: ${token.paddingSM}px;
|
||||
`,
|
||||
externalLink: css`
|
||||
color: ${token.colorPrimary};
|
||||
`,
|
||||
footer: css`
|
||||
padding: ${token.paddingXS}px;
|
||||
border-radius: 6px;
|
||||
text-align: center;
|
||||
background-color: ${token.colorFillQuaternary};
|
||||
`,
|
||||
footerText: css`
|
||||
font-size: ${token.fontSizeSM}px;
|
||||
color: ${token.colorTextTertiary} !important;
|
||||
`,
|
||||
metaInfo: css`
|
||||
display: flex;
|
||||
align-items: center;
|
||||
color: ${token.colorTextSecondary};
|
||||
`,
|
||||
sliced: css`
|
||||
color: ${token.colorTextQuaternary};
|
||||
`,
|
||||
title: css`
|
||||
overflow: hidden;
|
||||
display: -webkit-box;
|
||||
-webkit-box-orient: vertical;
|
||||
-webkit-line-clamp: 2;
|
||||
|
||||
margin-block-end: 0;
|
||||
|
||||
font-size: 16px;
|
||||
font-weight: bold;
|
||||
`,
|
||||
titleRow: css`
|
||||
color: ${token.colorText};
|
||||
`,
|
||||
|
||||
url: css`
|
||||
color: ${token.colorTextTertiary};
|
||||
`,
|
||||
};
|
||||
});
|
||||
|
||||
interface PageContentProps {
|
||||
messageId: string;
|
||||
result?: CrawlResult;
|
||||
}
|
||||
|
||||
const SLICED_LIMITED = 10_000;
|
||||
|
||||
const PageContent = memo<PageContentProps>(({ result }) => {
|
||||
const { t } = useTranslation('plugin');
|
||||
const { styles } = useStyles();
|
||||
const [display, setDisplay] = useState('render');
|
||||
|
||||
if (!result) return undefined;
|
||||
|
||||
const { url, title, description, content } = result.data;
|
||||
return (
|
||||
<Flexbox gap={24}>
|
||||
<Flexbox gap={8}>
|
||||
<Flexbox
|
||||
align={'center'}
|
||||
className={styles.titleRow}
|
||||
gap={24}
|
||||
horizontal
|
||||
justify={'space-between'}
|
||||
>
|
||||
<Flexbox>
|
||||
<div className={styles.title}>{title || result.originalUrl}</div>
|
||||
</Flexbox>
|
||||
</Flexbox>
|
||||
{description && (
|
||||
<Typography.Paragraph
|
||||
className={styles.description}
|
||||
ellipsis={{ expandable: false, rows: 4 }}
|
||||
>
|
||||
{description}
|
||||
</Typography.Paragraph>
|
||||
)}
|
||||
<Flexbox align={'center'} className={styles.url} gap={4} horizontal>
|
||||
{result.data.siteName && <div>{result.data.siteName} · </div>}
|
||||
<Link
|
||||
className={styles.url}
|
||||
href={url}
|
||||
onClick={(e) => e.stopPropagation()}
|
||||
rel={'nofollow'}
|
||||
style={{ display: 'flex', gap: 4 }}
|
||||
target={'_blank'}
|
||||
>
|
||||
{result.originalUrl}
|
||||
<Icon icon={ExternalLink} />
|
||||
</Link>
|
||||
</Flexbox>
|
||||
|
||||
<div className={styles.footer}>
|
||||
<Descriptions
|
||||
classNames={{
|
||||
content: styles.footerText,
|
||||
}}
|
||||
column={2}
|
||||
items={[
|
||||
{
|
||||
children: result.data.content?.length,
|
||||
label: t('search.crawPages.meta.words'),
|
||||
},
|
||||
{
|
||||
children: result.crawler,
|
||||
label: t('search.crawPages.meta.crawler'),
|
||||
},
|
||||
]}
|
||||
size="small"
|
||||
/>
|
||||
</div>
|
||||
</Flexbox>
|
||||
{content && (
|
||||
<Flexbox gap={12} paddingBlock={'0 12px'}>
|
||||
<Flexbox horizontal justify={'space-between'}>
|
||||
<Segmented
|
||||
onChange={(value) => setDisplay(value)}
|
||||
options={[
|
||||
{ label: t('search.crawPages.detail.preview'), value: 'render' },
|
||||
{ label: t('search.crawPages.detail.raw'), value: 'raw' },
|
||||
]}
|
||||
value={display}
|
||||
/>
|
||||
<CopyButton content={content} />
|
||||
</Flexbox>
|
||||
{content.length > SLICED_LIMITED && (
|
||||
<Alert message={t('search.crawPages.detail.tooLong')} variant={'pure'} />
|
||||
)}
|
||||
{display === 'render' ? (
|
||||
<Markdown variant={'chat'}>{content}</Markdown>
|
||||
) : (
|
||||
<div style={{ paddingBlock: '0 12px' }}>
|
||||
{content.length < SLICED_LIMITED ? (
|
||||
content
|
||||
) : (
|
||||
<>
|
||||
<span>{content.slice(0, SLICED_LIMITED)}</span>
|
||||
<span className={styles.sliced}>{content.slice(SLICED_LIMITED, -1)}</span>
|
||||
</>
|
||||
)}
|
||||
</div>
|
||||
)}
|
||||
</Flexbox>
|
||||
)}
|
||||
</Flexbox>
|
||||
);
|
||||
});
|
||||
|
||||
export default PageContent;
|
||||
@@ -0,0 +1,23 @@
|
||||
import { memo } from 'react';
|
||||
|
||||
import { useChatStore } from '@/store/chat';
|
||||
import { CrawlResult } from '@/types/tool/crawler';
|
||||
|
||||
import PageContent from '../PageContent';
|
||||
|
||||
interface PageContentProps {
|
||||
messageId: string;
|
||||
results: CrawlResult[];
|
||||
urls: string[];
|
||||
}
|
||||
|
||||
const PageContents = memo<PageContentProps>(({ urls, messageId, results }) => {
|
||||
const activePageContentUrl = useChatStore((s) => s.activePageContentUrl);
|
||||
|
||||
const url = urls.find((u) => u === activePageContentUrl);
|
||||
const result = results.find((result) => result.originalUrl === url);
|
||||
|
||||
return <PageContent messageId={messageId} result={result} />;
|
||||
});
|
||||
|
||||
export default PageContents;
|
||||
+1
-1
@@ -5,7 +5,7 @@ import { Flexbox } from 'react-layout-kit';
|
||||
|
||||
import { SearchResult } from '@/types/tool/search';
|
||||
|
||||
import { ENGINE_ICON_MAP } from '../../../const';
|
||||
import { ENGINE_ICON_MAP } from '../../../../const';
|
||||
import TitleExtra from './TitleExtra';
|
||||
|
||||
const useStyles = createStyles(({ css, token }) => {
|
||||
@@ -0,0 +1,69 @@
|
||||
import { Skeleton } from 'antd';
|
||||
import { uniq } from 'lodash-es';
|
||||
import { memo } from 'react';
|
||||
import { Flexbox } from 'react-layout-kit';
|
||||
|
||||
import { useChatStore } from '@/store/chat';
|
||||
import { chatToolSelectors } from '@/store/chat/selectors';
|
||||
import { SearchQuery, SearchResponse } from '@/types/tool/search';
|
||||
|
||||
import SearchBar from '../../components/SearchBar';
|
||||
import Footer from './Footer';
|
||||
import ResultList from './ResultList';
|
||||
|
||||
interface InspectorUIProps {
|
||||
messageId: string;
|
||||
query: SearchQuery;
|
||||
response: SearchResponse;
|
||||
}
|
||||
|
||||
const Inspector = memo<InspectorUIProps>(({ query: args, messageId, response }) => {
|
||||
const engines = uniq((response.results || []).map((result) => result.engine));
|
||||
const defaultEngines = engines.length > 0 ? engines : args.searchEngines || [];
|
||||
const loading = useChatStore(chatToolSelectors.isSearXNGSearching(messageId));
|
||||
|
||||
if (loading) {
|
||||
return (
|
||||
<Flexbox gap={12} height={'100%'}>
|
||||
<SearchBar
|
||||
aiSummary={false}
|
||||
defaultEngines={defaultEngines}
|
||||
defaultQuery={args.query}
|
||||
messageId={messageId}
|
||||
tooltip={false}
|
||||
/>
|
||||
|
||||
<Flexbox gap={16} paddingBlock={16} paddingInline={12}>
|
||||
{[1, 2, 3, 4, 6].map((id) => (
|
||||
<Skeleton
|
||||
active
|
||||
key={id}
|
||||
paragraph={{ rows: 3, width: `${(id % 4) + 5}0%` }}
|
||||
title={false}
|
||||
/>
|
||||
))}
|
||||
</Flexbox>
|
||||
</Flexbox>
|
||||
);
|
||||
}
|
||||
|
||||
return (
|
||||
<Flexbox gap={0} height={'100%'}>
|
||||
<Flexbox gap={12} height={'100%'}>
|
||||
<SearchBar
|
||||
aiSummary={false}
|
||||
defaultEngines={defaultEngines}
|
||||
defaultQuery={args.query}
|
||||
messageId={messageId}
|
||||
tooltip={false}
|
||||
/>
|
||||
<Flexbox height={'100%'} width={'100%'}>
|
||||
<ResultList dataSources={response.results} />
|
||||
</Flexbox>
|
||||
</Flexbox>
|
||||
<Footer />
|
||||
</Flexbox>
|
||||
);
|
||||
});
|
||||
|
||||
export default Inspector;
|
||||
@@ -1,77 +1,41 @@
|
||||
import { Skeleton } from 'antd';
|
||||
import { uniq } from 'lodash-es';
|
||||
import { memo } from 'react';
|
||||
import { Flexbox } from 'react-layout-kit';
|
||||
|
||||
import { useChatStore } from '@/store/chat';
|
||||
import { chatToolSelectors } from '@/store/chat/selectors';
|
||||
import { SearchResponse } from '@/types/tool/search';
|
||||
import { WebBrowsingApiName } from '@/tools/web-browsing';
|
||||
import { BuiltinPortalProps } from '@/types/tool';
|
||||
import { CrawlPluginState } from '@/types/tool/crawler';
|
||||
import { SearchQuery } from '@/types/tool/search';
|
||||
|
||||
import SearchBar from '../components/SearchBar';
|
||||
import Footer from './Footer';
|
||||
import ResultList from './ResultList';
|
||||
import PageContent from './PageContent';
|
||||
import PageContents from './PageContents';
|
||||
import Search from './Search';
|
||||
|
||||
interface SearchArguments {
|
||||
query: string;
|
||||
searchEngine?: string[];
|
||||
}
|
||||
|
||||
interface InspectorUIProps<T = Record<string, any>, S = any> {
|
||||
arguments: T;
|
||||
identifier: string;
|
||||
messageId: string;
|
||||
state: S;
|
||||
}
|
||||
|
||||
const Inspector = memo<InspectorUIProps<SearchArguments, SearchResponse>>(
|
||||
({ arguments: args, messageId, state }) => {
|
||||
const engines = uniq((state.results || []).map((result) => result.engine));
|
||||
const defaultEngines = engines.length > 0 ? engines : args.searchEngine || [];
|
||||
const loading = useChatStore(chatToolSelectors.isSearXNGSearching(messageId));
|
||||
|
||||
if (loading) {
|
||||
return (
|
||||
<Flexbox gap={12} height={'100%'}>
|
||||
<SearchBar
|
||||
aiSummary={false}
|
||||
defaultEngines={defaultEngines}
|
||||
defaultQuery={args.query}
|
||||
messageId={messageId}
|
||||
tooltip={false}
|
||||
/>
|
||||
|
||||
<Flexbox gap={16} paddingBlock={16} paddingInline={12}>
|
||||
{[1, 2, 3, 4, 6].map((id) => (
|
||||
<Skeleton
|
||||
active
|
||||
key={id}
|
||||
paragraph={{ rows: 3, width: `${(id % 4) + 5}0%` }}
|
||||
title={false}
|
||||
/>
|
||||
))}
|
||||
</Flexbox>
|
||||
</Flexbox>
|
||||
);
|
||||
const Inspector = memo<BuiltinPortalProps>(({ arguments: args, messageId, state, apiName }) => {
|
||||
switch (apiName) {
|
||||
case WebBrowsingApiName.searchWithSearXNG: {
|
||||
return <Search messageId={messageId} query={args as SearchQuery} response={state} />;
|
||||
}
|
||||
|
||||
return (
|
||||
<Flexbox gap={0} height={'100%'}>
|
||||
<Flexbox gap={12} height={'100%'}>
|
||||
<SearchBar
|
||||
aiSummary={false}
|
||||
defaultEngines={defaultEngines}
|
||||
defaultQuery={args.query}
|
||||
messageId={messageId}
|
||||
tooltip={false}
|
||||
/>
|
||||
<Flexbox height={'100%'} width={'100%'}>
|
||||
<ResultList dataSources={state.results} />
|
||||
</Flexbox>
|
||||
</Flexbox>
|
||||
<Footer />
|
||||
</Flexbox>
|
||||
);
|
||||
},
|
||||
);
|
||||
case WebBrowsingApiName.crawlSinglePage: {
|
||||
const url = args.url;
|
||||
const result = (state as CrawlPluginState).results.find(
|
||||
(result) => result.originalUrl === url,
|
||||
);
|
||||
|
||||
return <PageContent messageId={messageId} result={result} />;
|
||||
}
|
||||
|
||||
case WebBrowsingApiName.crawlMultiPages: {
|
||||
return (
|
||||
<PageContents
|
||||
messageId={messageId}
|
||||
results={(state as CrawlPluginState).results}
|
||||
urls={args.urls}
|
||||
/>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
return null;
|
||||
});
|
||||
|
||||
export default Inspector;
|
||||
|
||||
@@ -0,0 +1,57 @@
|
||||
'use client';
|
||||
|
||||
import { CopyButton } from '@lobehub/ui';
|
||||
import { createStyles } from 'antd-style';
|
||||
import Link from 'next/link';
|
||||
import { memo } from 'react';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
import { Flexbox } from 'react-layout-kit';
|
||||
|
||||
import { shinyTextStylish } from '@/styles/loading';
|
||||
|
||||
const useStyles = createStyles(({ token, css }) => {
|
||||
return {
|
||||
cardBody: css`
|
||||
padding-block: 12px 8px;
|
||||
padding-inline: 12px;
|
||||
`,
|
||||
container: css`
|
||||
overflow: hidden;
|
||||
justify-content: space-between;
|
||||
|
||||
max-width: 360px;
|
||||
border: 1px solid ${token.colorBorderSecondary};
|
||||
border-radius: 12px;
|
||||
`,
|
||||
|
||||
footer: css`
|
||||
padding-block: 8px;
|
||||
padding-inline: 12px;
|
||||
|
||||
font-size: ${token.fontSizeSM}px;
|
||||
color: ${token.colorTextTertiary};
|
||||
|
||||
background-color: ${token.colorFillQuaternary};
|
||||
`,
|
||||
shining: shinyTextStylish(token),
|
||||
};
|
||||
});
|
||||
|
||||
const LoadingCard = memo<{ url: string }>(({ url }) => {
|
||||
const { t } = useTranslation('plugin');
|
||||
const { styles } = useStyles();
|
||||
|
||||
return (
|
||||
<Flexbox className={styles.container}>
|
||||
<Flexbox className={styles.cardBody} horizontal>
|
||||
<Link href={url} rel={'nofollow'} target={'_blank'}>
|
||||
<div className={styles.shining}>{url}</div>
|
||||
</Link>
|
||||
<CopyButton content={url} size={'small'} />
|
||||
</Flexbox>
|
||||
<div className={styles.footer}>{t('search.crawPages.crawling')}</div>
|
||||
</Flexbox>
|
||||
);
|
||||
});
|
||||
|
||||
export default LoadingCard;
|
||||
@@ -0,0 +1,142 @@
|
||||
'use client';
|
||||
|
||||
import { CrawlSuccessResult } from '@lobechat/web-crawler';
|
||||
import { Icon } from '@lobehub/ui';
|
||||
import { Descriptions, Typography } from 'antd';
|
||||
import { createStyles } from 'antd-style';
|
||||
import { ExternalLink } from 'lucide-react';
|
||||
import Link from 'next/link';
|
||||
import { memo } from 'react';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
import { Center, Flexbox } from 'react-layout-kit';
|
||||
|
||||
import { useChatStore } from '@/store/chat';
|
||||
import { WebBrowsingManifest } from '@/tools/web-browsing';
|
||||
|
||||
const { Paragraph } = Typography;
|
||||
|
||||
const useStyles = createStyles(({ token, css }) => {
|
||||
return {
|
||||
cardBody: css`
|
||||
padding-block: 12px 8px;
|
||||
padding-inline: 16px;
|
||||
`,
|
||||
container: css`
|
||||
cursor: pointer;
|
||||
|
||||
overflow: hidden;
|
||||
|
||||
max-width: 360px;
|
||||
border: 1px solid ${token.colorBorderSecondary};
|
||||
border-radius: 12px;
|
||||
|
||||
transition: border-color 0.2s;
|
||||
|
||||
:hover {
|
||||
border-color: ${token.colorPrimary};
|
||||
}
|
||||
`,
|
||||
description: css`
|
||||
margin-block: 0 4px !important;
|
||||
color: ${token.colorTextTertiary};
|
||||
`,
|
||||
detailsSection: css`
|
||||
padding-block: ${token.paddingSM}px;
|
||||
`,
|
||||
externalLink: css`
|
||||
color: ${token.colorTextQuaternary};
|
||||
|
||||
:hover {
|
||||
color: ${token.colorText};
|
||||
}
|
||||
`,
|
||||
footer: css`
|
||||
padding: ${token.paddingXS}px;
|
||||
text-align: center;
|
||||
background-color: ${token.colorFillQuaternary};
|
||||
`,
|
||||
footerText: css`
|
||||
font-size: ${token.fontSizeSM}px;
|
||||
color: ${token.colorTextTertiary} !important;
|
||||
`,
|
||||
metaInfo: css`
|
||||
display: flex;
|
||||
align-items: center;
|
||||
color: ${token.colorTextSecondary};
|
||||
`,
|
||||
title: css`
|
||||
overflow: hidden;
|
||||
display: -webkit-box;
|
||||
-webkit-box-orient: vertical;
|
||||
-webkit-line-clamp: 1;
|
||||
|
||||
margin-block-end: 0;
|
||||
`,
|
||||
titleRow: css`
|
||||
color: ${token.colorText};
|
||||
`,
|
||||
};
|
||||
});
|
||||
|
||||
interface CrawlerData {
|
||||
crawler: string;
|
||||
messageId: string;
|
||||
originalUrl: string;
|
||||
result: CrawlSuccessResult;
|
||||
}
|
||||
|
||||
const CrawlerResultCard = memo<CrawlerData>(({ result, messageId, crawler, originalUrl }) => {
|
||||
const { t } = useTranslation('plugin');
|
||||
const { styles } = useStyles();
|
||||
const [openToolUI, togglePageContent] = useChatStore((s) => [s.openToolUI, s.togglePageContent]);
|
||||
|
||||
const { url, title, description } = result;
|
||||
|
||||
return (
|
||||
<Flexbox
|
||||
className={styles.container}
|
||||
justify={'space-between'}
|
||||
onClick={() => {
|
||||
openToolUI(messageId, WebBrowsingManifest.identifier);
|
||||
togglePageContent(originalUrl);
|
||||
}}
|
||||
>
|
||||
<Flexbox className={styles.cardBody} gap={8}>
|
||||
<Flexbox align={'center'} className={styles.titleRow} horizontal justify={'space-between'}>
|
||||
<Flexbox>
|
||||
<div className={styles.title}>{title || originalUrl}</div>
|
||||
</Flexbox>
|
||||
<Link href={url} onClick={(e) => e.stopPropagation()} target={'_blank'}>
|
||||
<Center className={styles.externalLink}>
|
||||
<Icon icon={ExternalLink} />
|
||||
</Center>
|
||||
</Link>
|
||||
</Flexbox>
|
||||
<Paragraph className={styles.description} ellipsis={{ expandable: false, rows: 2 }}>
|
||||
{description || result.content?.slice(0, 40)}
|
||||
</Paragraph>
|
||||
</Flexbox>
|
||||
<div className={styles.footer}>
|
||||
<Descriptions
|
||||
classNames={{
|
||||
content: styles.footerText,
|
||||
}}
|
||||
column={2}
|
||||
items={[
|
||||
{
|
||||
children: result.content?.length,
|
||||
label: t('search.crawPages.meta.words'),
|
||||
},
|
||||
{
|
||||
children: crawler,
|
||||
label: t('search.crawPages.meta.crawler'),
|
||||
},
|
||||
]}
|
||||
size="small"
|
||||
/>
|
||||
</div>
|
||||
</Flexbox>
|
||||
);
|
||||
});
|
||||
|
||||
export default CrawlerResultCard;
|
||||
@@ -0,0 +1,41 @@
|
||||
import { memo } from 'react';
|
||||
import { Flexbox } from 'react-layout-kit';
|
||||
|
||||
import { CrawlPluginState } from '@/types/tool/crawler';
|
||||
|
||||
import Loading from './Loading';
|
||||
import Result from './Result';
|
||||
|
||||
interface PagesContentProps {
|
||||
messageId: string;
|
||||
results?: CrawlPluginState['results'];
|
||||
urls: string[];
|
||||
}
|
||||
|
||||
const PagesContent = memo<PagesContentProps>(({ results, messageId, urls }) => {
|
||||
if (!results || results.length === 0) {
|
||||
return (
|
||||
<Flexbox gap={12} horizontal>
|
||||
{urls.map((url) => (
|
||||
<Loading key={url} url={url} />
|
||||
))}
|
||||
</Flexbox>
|
||||
);
|
||||
}
|
||||
|
||||
return (
|
||||
<Flexbox gap={12} horizontal>
|
||||
{results.map((result) => (
|
||||
<Result
|
||||
crawler={result.crawler}
|
||||
key={result.originalUrl}
|
||||
messageId={messageId}
|
||||
originalUrl={result.originalUrl}
|
||||
result={result.data}
|
||||
/>
|
||||
))}
|
||||
</Flexbox>
|
||||
);
|
||||
});
|
||||
|
||||
export default PagesContent;
|
||||
+1
-1
@@ -8,7 +8,7 @@ import { Flexbox } from 'react-layout-kit';
|
||||
|
||||
import { useIsMobile } from '@/hooks/useIsMobile';
|
||||
|
||||
import { EngineAvatarGroup } from '../../components/EngineAvatar';
|
||||
import { EngineAvatarGroup } from '../../../components/EngineAvatar';
|
||||
|
||||
const useStyles = createStyles(({ css, token }) => ({
|
||||
font: css`
|
||||
+1
-1
@@ -10,7 +10,7 @@ import { useChatStore } from '@/store/chat';
|
||||
import { chatToolSelectors } from '@/store/chat/selectors';
|
||||
import { SearchQuery, SearchResponse } from '@/types/tool/search';
|
||||
|
||||
import SearchBar from '../../components/SearchBar';
|
||||
import SearchBar from '../../../components/SearchBar';
|
||||
import SearchView from './SearchView';
|
||||
|
||||
interface SearchQueryViewProps {
|
||||
+1
-1
@@ -6,7 +6,7 @@ import { Flexbox } from 'react-layout-kit';
|
||||
import { useChatStore } from '@/store/chat';
|
||||
import { WebBrowsingManifest } from '@/tools/web-browsing';
|
||||
|
||||
import { EngineAvatarGroup } from '../../components/EngineAvatar';
|
||||
import { EngineAvatarGroup } from '../../../components/EngineAvatar';
|
||||
|
||||
const useStyles = createStyles(({ css, token }) => ({
|
||||
container: css`
|
||||
@@ -0,0 +1,62 @@
|
||||
import { Alert, Highlighter } from '@lobehub/ui';
|
||||
import { memo, useState } from 'react';
|
||||
import { Flexbox } from 'react-layout-kit';
|
||||
|
||||
import { ChatMessagePluginError } from '@/types/message';
|
||||
import { SearchQuery, SearchResponse } from '@/types/tool/search';
|
||||
|
||||
import ConfigForm from './ConfigForm';
|
||||
import SearchQueryView from './SearchQuery';
|
||||
import SearchResult from './SearchResult';
|
||||
|
||||
interface SearchProps {
|
||||
messageId: string;
|
||||
pluginError: ChatMessagePluginError;
|
||||
searchQuery: SearchQuery;
|
||||
searchResponse?: SearchResponse;
|
||||
}
|
||||
|
||||
const Search = memo<SearchProps>(({ messageId, searchQuery, searchResponse, pluginError }) => {
|
||||
const [editing, setEditing] = useState(false);
|
||||
|
||||
if (pluginError) {
|
||||
if (pluginError?.type === 'PluginSettingsInvalid') {
|
||||
return <ConfigForm id={messageId} provider={pluginError.body?.provider} />;
|
||||
}
|
||||
|
||||
return (
|
||||
<Alert
|
||||
extra={
|
||||
<Flexbox>
|
||||
<Highlighter copyButtonSize={'small'} language={'json'} type={'pure'}>
|
||||
{JSON.stringify(pluginError.body?.data || pluginError.body, null, 2)}
|
||||
</Highlighter>
|
||||
</Flexbox>
|
||||
}
|
||||
message={pluginError?.message}
|
||||
type={'error'}
|
||||
/>
|
||||
);
|
||||
}
|
||||
|
||||
return (
|
||||
<Flexbox gap={8}>
|
||||
<SearchQueryView
|
||||
args={searchQuery}
|
||||
editing={editing}
|
||||
messageId={messageId}
|
||||
pluginState={searchResponse}
|
||||
setEditing={setEditing}
|
||||
/>
|
||||
<SearchResult
|
||||
args={searchQuery}
|
||||
editing={editing}
|
||||
messageId={messageId}
|
||||
pluginState={searchResponse}
|
||||
setEditing={setEditing}
|
||||
/>
|
||||
</Flexbox>
|
||||
);
|
||||
});
|
||||
|
||||
export default Search;
|
||||
@@ -1,56 +1,47 @@
|
||||
import { Alert, Highlighter } from '@lobehub/ui';
|
||||
import { memo, useState } from 'react';
|
||||
import { Flexbox } from 'react-layout-kit';
|
||||
import { memo } from 'react';
|
||||
|
||||
import { WebBrowsingApiName } from '@/tools/web-browsing';
|
||||
import PageContent from '@/tools/web-browsing/Render/PageContent';
|
||||
import { BuiltinRenderProps } from '@/types/tool';
|
||||
import { CrawlMultiPagesQuery, CrawlPluginState, CrawlSinglePageQuery } from '@/types/tool/crawler';
|
||||
import { SearchContent, SearchQuery, SearchResponse } from '@/types/tool/search';
|
||||
|
||||
import ConfigForm from './ConfigForm';
|
||||
import SearchQueryView from './SearchQuery';
|
||||
import SearchResult from './SearchResult';
|
||||
import Search from './Search';
|
||||
|
||||
const WebBrowsing = memo<BuiltinRenderProps<SearchContent[], SearchQuery, SearchResponse>>(
|
||||
({ messageId, args, pluginState, pluginError }) => {
|
||||
const [editing, setEditing] = useState(false);
|
||||
|
||||
if (pluginError) {
|
||||
if (pluginError?.type === 'PluginSettingsInvalid') {
|
||||
return <ConfigForm id={messageId} provider={pluginError.body?.provider} />;
|
||||
const WebBrowsing = memo<BuiltinRenderProps<SearchContent[]>>(
|
||||
({ messageId, args, pluginState, pluginError, apiName }) => {
|
||||
switch (apiName) {
|
||||
case WebBrowsingApiName.searchWithSearXNG: {
|
||||
return (
|
||||
<Search
|
||||
messageId={messageId}
|
||||
pluginError={pluginError}
|
||||
searchQuery={args as SearchQuery}
|
||||
searchResponse={pluginState as SearchResponse}
|
||||
/>
|
||||
);
|
||||
}
|
||||
|
||||
return (
|
||||
<Alert
|
||||
extra={
|
||||
<Flexbox>
|
||||
<Highlighter copyButtonSize={'small'} language={'json'} type={'pure'}>
|
||||
{JSON.stringify(pluginError.body?.data || pluginError.body, null, 2)}
|
||||
</Highlighter>
|
||||
</Flexbox>
|
||||
}
|
||||
message={pluginError?.message}
|
||||
type={'error'}
|
||||
/>
|
||||
);
|
||||
}
|
||||
case WebBrowsingApiName.crawlSinglePage: {
|
||||
return (
|
||||
<PageContent
|
||||
messageId={messageId}
|
||||
results={(pluginState as CrawlPluginState)?.results}
|
||||
urls={[(args as CrawlSinglePageQuery).url]}
|
||||
/>
|
||||
);
|
||||
}
|
||||
|
||||
return (
|
||||
<Flexbox gap={8}>
|
||||
<SearchQueryView
|
||||
args={args}
|
||||
editing={editing}
|
||||
messageId={messageId}
|
||||
pluginState={pluginState}
|
||||
setEditing={setEditing}
|
||||
/>
|
||||
<SearchResult
|
||||
args={args}
|
||||
editing={editing}
|
||||
messageId={messageId}
|
||||
pluginState={pluginState}
|
||||
setEditing={setEditing}
|
||||
/>
|
||||
</Flexbox>
|
||||
);
|
||||
case WebBrowsingApiName.crawlMultiPages: {
|
||||
return (
|
||||
<PageContent
|
||||
messageId={messageId}
|
||||
results={(pluginState as CrawlPluginState)?.results}
|
||||
urls={(args as CrawlMultiPagesQuery).urls}
|
||||
/>
|
||||
);
|
||||
}
|
||||
}
|
||||
},
|
||||
);
|
||||
|
||||
|
||||
@@ -2,12 +2,20 @@ import dayjs from 'dayjs';
|
||||
|
||||
import { BuiltinToolManifest } from '@/types/tool';
|
||||
|
||||
import { systemPrompt } from './systemRole';
|
||||
|
||||
export const WebBrowsingApiName = {
|
||||
crawlMultiPages: 'crawlMultiPages',
|
||||
crawlSinglePage: 'crawlSinglePage',
|
||||
searchWithSearXNG: 'searchWithSearXNG',
|
||||
};
|
||||
|
||||
export const WebBrowsingManifest: BuiltinToolManifest = {
|
||||
api: [
|
||||
{
|
||||
description:
|
||||
'A meta search engine. Useful for when you need to answer questions about current events. Input should be a search query. Output is a JSON array of the query results',
|
||||
name: 'searchWithSearXNG',
|
||||
name: WebBrowsingApiName.searchWithSearXNG,
|
||||
parameters: {
|
||||
properties: {
|
||||
query: {
|
||||
@@ -46,57 +54,45 @@ export const WebBrowsingManifest: BuiltinToolManifest = {
|
||||
type: 'object',
|
||||
},
|
||||
},
|
||||
{
|
||||
description:
|
||||
'A crawler can visit page content. Output is a JSON object of title, content, url and website',
|
||||
name: WebBrowsingApiName.crawlSinglePage,
|
||||
parameters: {
|
||||
properties: {
|
||||
url: {
|
||||
description: 'The url need to be crawled',
|
||||
type: 'string',
|
||||
},
|
||||
},
|
||||
required: ['url'],
|
||||
type: 'object',
|
||||
},
|
||||
},
|
||||
{
|
||||
description:
|
||||
'A crawler can visit multi pages. If need to visit multi website, use this one. Output is an array of JSON object of title, content, url and website',
|
||||
name: WebBrowsingApiName.crawlMultiPages,
|
||||
parameters: {
|
||||
properties: {
|
||||
urls: {
|
||||
items: {
|
||||
description: 'The url need to be crawled',
|
||||
type: 'string',
|
||||
},
|
||||
type: 'array',
|
||||
},
|
||||
},
|
||||
required: ['urls'],
|
||||
type: 'object',
|
||||
},
|
||||
},
|
||||
],
|
||||
identifier: 'lobe-web-browsing',
|
||||
meta: {
|
||||
avatar: '🌐',
|
||||
title: 'Web Browsing',
|
||||
},
|
||||
systemRole: `You are a search tool that uses SearxNG, a meta search engine. When given a search query, you will return relevant results from various search engines. Your results will be in JSON format, containing titles, links, and snippets of relevant web pages. If no good results are found, you will say so. You can also provide answers, infoboxes, or suggestions if available.
|
||||
|
||||
SearXNG combine with these engines:
|
||||
- Google: The world's most popular search engine, offering a wide range of general web results.,
|
||||
- Bilibili: A Chinese video sharing website themed around animation, comic, and games (ACG) ,(又名 B 站),
|
||||
- Bing: Microsoft's search engine, providing web results with a focus on visual search.,
|
||||
- DuckDuckGo: A privacy-focused search engine that doesn't track users.,
|
||||
- npm: The package manager for JavaScript, used to find Node.js packages.,
|
||||
- PyPI: The Python Package Index, used to find Python packages.,
|
||||
- GitHub: A platform for version control and collaboration, search for code repositories.,
|
||||
- arXiv: A repository of electronic preprints for scientific papers.,
|
||||
- Google Scholar: A freely accessible web search engine for scholarly literature.,
|
||||
- Z-Library: A shadow library project for file-sharing access to scholarly journal articles and books.,
|
||||
- Reddit: A network of communities based on people's interests, search for discussions and content.,
|
||||
- IMDb: An online database of information related to films, TV programs, and video games.,
|
||||
- Brave: A privacy-focused browser with its own search engine.,
|
||||
- Wikipedia: A free online encyclopedia, search for articles on various topics.,
|
||||
- Pinterest: An image sharing and social media service, search for images and ideas.,
|
||||
- Unsplash: A website dedicated to sharing stock photography, search for high-quality images.,
|
||||
- Vimeo: A video hosting, sharing, and services platform.,
|
||||
- YouTube: A video sharing platform, search for a wide variety of video content.
|
||||
|
||||
SearXNG comes with a search syntax by with you can modify the categories, engines, languages and more.
|
||||
|
||||
## \`!\` select engine and category
|
||||
|
||||
To set category and/or engine names use a \`!\` prefix. To give a few examples:
|
||||
|
||||
- search in category **map** for **paris**
|
||||
- \`!map paris\`
|
||||
- image search
|
||||
- \`!images Wau Holland\`
|
||||
|
||||
Abbreviations of the engines and languages are also accepted. Engine/category modifiers are chain able and inclusive. E.g. with \`!map !ddg !wp paris\` search in map category and DuckDuckGo and Wikipedia for **paris**.
|
||||
|
||||
## \`:\` select language
|
||||
|
||||
To select language filter use a \`:\` prefix. To give an example:
|
||||
|
||||
- search Wikipedia by a custom language
|
||||
- \`:fr !wp Wau Holland\`
|
||||
|
||||
You need to summarize in the language of the user's question. If you use search content in your reply, you must use Markdown footnote format to indicate the source, Such as [^1].
|
||||
|
||||
current date: ${dayjs(new Date()).format('YYYY-MM-DD')}
|
||||
`,
|
||||
systemRole: systemPrompt(dayjs(new Date()).format('YYYY-MM-DD')),
|
||||
type: 'builtin',
|
||||
};
|
||||
|
||||
@@ -0,0 +1,109 @@
|
||||
export const systemPrompt = (
|
||||
date: string,
|
||||
) => `You have a Web Information tool with powerful internet access capabilities. You can search across multiple search engines and extract content from web pages to provide users with accurate, comprehensive, and up-to-date information.
|
||||
|
||||
<core_capabilities>
|
||||
1. Search the web using multiple search engines (searchWithSearXNG)
|
||||
2. Retrieve content from a specific webpage (crawlSinglePage)
|
||||
3. Retrieve content from multiple webpages simultaneously (crawlMultiPages)
|
||||
</core_capabilities>
|
||||
|
||||
<workflow>
|
||||
1. Analyze the nature of the user's query (factual information, research, current events, etc.)
|
||||
2. Select the appropriate tool and search strategy based on the query type
|
||||
3. Execute searches or crawl operations to gather relevant information
|
||||
4. Synthesize information with proper attribution of sources
|
||||
5. Present findings in a clear, organized manner with appropriate citations
|
||||
</workflow>
|
||||
|
||||
<tool_selection_guidelines>
|
||||
- For general information queries: Use searchWithSearXNG with the most relevant search engines
|
||||
- For detailed understanding of specific single page content: Use 'crawlSinglePage' on the most authoritative or relevant page from search results. If you need to visit multiple pages, prefer to use 'crawlMultiPages'
|
||||
- For multi-perspective information or comparative analysis: Use 'crawlMultiPages' on several different relevant sources
|
||||
</tool_selection_guidelines>
|
||||
|
||||
<search_engine_selection>
|
||||
Choose search engines based on the query type:
|
||||
- General knowledge: google, bing, duckduckgo, brave, wikipedia
|
||||
- Academic/scientific information: google scholar, arxiv, z-library
|
||||
- Code/technical queries: google, github, npm, pypi
|
||||
- Videos: youtube, vimeo, bilibili
|
||||
- Images: unsplash, pinterest
|
||||
- Entertainment: imdb, reddit
|
||||
- For region-specific information, prefer search engines popular in that region
|
||||
</search_engine_selection>
|
||||
|
||||
<citation_requirements>
|
||||
- Always cite sources using markdown footnote format (e.g., [^1])
|
||||
- List all referenced URLs at the end of your response
|
||||
- Clearly distinguish between quoted information and your own analysis
|
||||
- Respond in the same language as the user's query
|
||||
</citation_requirements>
|
||||
|
||||
<response_format>
|
||||
When providing information from web searches:
|
||||
1. Start with a direct answer to the user's question when possible
|
||||
2. Provide relevant details from sources
|
||||
3. Include proper citations using footnotes
|
||||
4. List all sources at the end of your response
|
||||
5. For time-sensitive information, note when the information was retrieved
|
||||
|
||||
Example:
|
||||
|
||||
According to recent studies, global temperatures have risen by 1.1°C since pre-industrial times[^1].
|
||||
|
||||
[^1]: [Climate Report in 2023](https://example.org/climate-report-2023)
|
||||
</response_format>
|
||||
|
||||
<searxng_description>
|
||||
SearXNG is a metasearch engine that can leverage multiple search engines including:
|
||||
- Google: World's most popular search engine providing broad web results
|
||||
- Bilibili: Chinese video sharing website focused on animation, comics, and games (aka B-site)
|
||||
- Bing: Microsoft's search engine providing web results with emphasis on visual search
|
||||
- DuckDuckGo: Privacy-focused search engine that doesn't track users
|
||||
- npm: JavaScript package manager for finding Node.js packages
|
||||
- PyPI: Python Package Index for finding Python packages
|
||||
- GitHub: Version control and collaboration platform for searching code repositories
|
||||
- arXiv: Repository of electronic preprints of scientific papers
|
||||
- Google Scholar: Free web search engine for scholarly literature
|
||||
- Z-Library: File-sharing project for journal articles and books
|
||||
- Reddit: Network of communities based on people's interests
|
||||
- IMDb: Online database related to films, TV programs, and video games
|
||||
- Brave: Privacy-focused browser with its own search engine
|
||||
- Wikipedia: Free online encyclopedia with articles on various topics
|
||||
- Pinterest: Image sharing and social media service for finding images
|
||||
- Unsplash: Website dedicated to sharing high-quality stock photography
|
||||
- Vimeo: Video hosting, sharing, and service platform
|
||||
- YouTube: Video sharing platform for searching various video content
|
||||
|
||||
<search_syntax>
|
||||
SearXNG has special search syntax to modify the categories, engines, and language of searches:
|
||||
|
||||
1. Use \`!\` to select engines and categories:
|
||||
- Search for "paris" in the "map" category: \`!map paris\`
|
||||
- Search for images: \`!images Wau Holland\`
|
||||
- Chain multiple modifiers: \`!map !ddg !wp paris\` (searches for "paris" in the map category, DuckDuckGo, and Wikipedia)
|
||||
|
||||
2. Use \`:\` to select language:
|
||||
- Search Wikipedia in a specific language: \`:fr !wp Wau Holland\` (uses French)
|
||||
</search_syntax>
|
||||
</searxng_description>
|
||||
|
||||
<crawling_best_practices>
|
||||
- Only crawl pages that are publicly accessible
|
||||
- When crawling multiple pages, crawl all relevant sources
|
||||
- Prioritize authoritative sources over user-generated content when appropriate
|
||||
- For controversial topics, crawl sources representing different perspectives
|
||||
- Verify information across multiple sources when possible
|
||||
- Consider the recency of information, especially for time-sensitive topics
|
||||
</crawling_best_practices>
|
||||
|
||||
<error_handling>
|
||||
- If search returns no results, try alternative search terms or engines
|
||||
- If a page cannot be crawled, explain the issue to the user and suggest alternatives
|
||||
- For ambiguous queries, ask for clarification before conducting extensive searches
|
||||
- If information seems outdated, note this to the user and suggest searching for more recent sources
|
||||
</error_handling>
|
||||
|
||||
Current date: ${date}
|
||||
`;
|
||||
@@ -29,6 +29,7 @@ export interface LobeBuiltinTool {
|
||||
}
|
||||
|
||||
export interface BuiltinRenderProps<Content = any, Arguments = any, State = any> {
|
||||
apiName?: string;
|
||||
args: Arguments;
|
||||
content: Content;
|
||||
identifier?: string;
|
||||
@@ -40,6 +41,7 @@ export interface BuiltinRenderProps<Content = any, Arguments = any, State = any>
|
||||
export type BuiltinRender = <T = any>(props: BuiltinRenderProps<T>) => ReactNode;
|
||||
|
||||
export interface BuiltinPortalProps<Arguments = Record<string, any>, State = any> {
|
||||
apiName?: string;
|
||||
arguments: Arguments;
|
||||
identifier: string;
|
||||
messageId: string;
|
||||
|
||||
@@ -0,0 +1,19 @@
|
||||
import { CrawlSuccessResult } from '@lobechat/web-crawler';
|
||||
|
||||
export interface CrawlSinglePageQuery {
|
||||
url: string;
|
||||
}
|
||||
|
||||
export interface CrawlMultiPagesQuery {
|
||||
urls: string[];
|
||||
}
|
||||
|
||||
export interface CrawlResult {
|
||||
crawler: string;
|
||||
data: CrawlSuccessResult;
|
||||
originalUrl: string;
|
||||
}
|
||||
|
||||
export interface CrawlPluginState {
|
||||
results: CrawlResult[];
|
||||
}
|
||||
@@ -2,6 +2,7 @@ export interface SearchQuery {
|
||||
query: string;
|
||||
searchEngines?: string[];
|
||||
}
|
||||
|
||||
export const SEARCH_SEARXNG_NOT_CONFIG = 'SearXNG is not configured';
|
||||
|
||||
export interface SearchResponse {
|
||||
|
||||
Reference in New Issue
Block a user