@activepieces/piece-cohere 0.0.1 → 0.0.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@activepieces/piece-cohere",
3
- "version": "0.0.1",
3
+ "version": "0.0.3",
4
4
  "main": "./src/index.js",
5
5
  "types": "./src/index.d.ts",
6
6
  "scripts": {
@@ -8,9 +8,9 @@
8
8
  "lint": "eslint 'src/**/*.ts'"
9
9
  },
10
10
  "dependencies": {
11
- "@activepieces/pieces-common": "0.12.0",
12
- "@activepieces/pieces-framework": "0.26.0",
13
- "@activepieces/shared": "0.43.0",
11
+ "@activepieces/pieces-common": "0.12.3",
12
+ "@activepieces/pieces-framework": "0.29.1",
13
+ "@activepieces/shared": "0.83.0",
14
14
  "tslib": "2.6.2"
15
15
  }
16
16
  }
@@ -0,0 +1,41 @@
1
+ {
2
+ "Generate text using Cohere AI language models": "Text mit Cohere KI-Sprachmodellen generieren",
3
+ "\nTo obtain your Cohere API Key:\n\n1. Go to the [Cohere Dashboard](https://dashboard.cohere.com/api-keys).\n2. Sign in or create a free account.\n3. Navigate to **API Keys** in the left sidebar.\n4. Click **Create Trial Key** (free) or use a production key.\n5. Copy the key and paste it below.\n\n": "\nUm Ihren Cohere API-Schlüssel zu erhalten:\n\n1. Gehe zur [Cohere Dashboard](https://dashboard.cohere.com/api-keys).\n2. Melden Sie sich an oder erstellen Sie ein kostenloses Konto.\n3. Navigiere zu **API Schlüsseln** in der linken Seitenleiste.\n4. Klicke auf **Testschlüssel erstellen** (kostenlos) oder verwende einen Produktionsschlüssel.\n5. Kopieren Sie den Schlüssel und fügen Sie ihn unten ein.\n\n",
4
+ "Generate Text": "Text generieren",
5
+ "Custom API Call": "Eigener API-Aufruf",
6
+ "Generate a text response using Cohere AI Chat API": "Generieren Sie eine Text-Antwort mithilfe der Cohere AI-Chat-API",
7
+ "Make a custom API call to a specific endpoint": "Einen benutzerdefinierten API-Aufruf an einen bestimmten Endpunkt machen",
8
+ "Prompt": "Prompt",
9
+ "Model": "Modell",
10
+ "Temperature": "Temperatur",
11
+ "Max Tokens": "Max. Token",
12
+ "Method": "Methode",
13
+ "Headers": "Kopfzeilen",
14
+ "Query Parameters": "Abfrageparameter",
15
+ "Body Type": "Körpertyp",
16
+ "Body": "Körper",
17
+ "Response is Binary ?": "Antwort ist binär?",
18
+ "No Error on Failure": "Kein Fehler bei Fehler",
19
+ "Timeout (in seconds)": "Timeout (in Sekunden)",
20
+ "Follow redirects": "Weiterleitungen folgen",
21
+ "The user message to send to the model": "Die Benutzernachricht, die an das Modell gesendet wird",
22
+ "The Cohere model to use for generation": "Das Cohere Modell für die Generierung",
23
+ "Controls randomness (0.0 = deterministic, 1.0 = maximum randomness). Default: 0.3": "Steuert Zufallsreichtum (0.0 = deterministisch, 1.0 = maximale Zufallszahl). Standard: 0.3",
24
+ "Maximum number of tokens to generate. Leave empty for model default.": "Maximale Anzahl zu generierender Token. Leer lassen für Modell-Standardwerte.",
25
+ "Authorization headers are injected automatically from your connection.": "Autorisierungs-Header werden automatisch von Ihrer Verbindung injiziert.",
26
+ "Enable for files like PDFs, images, etc.": "Aktivieren für Dateien wie PDFs, Bilder usw.",
27
+ "Command A (03-2025)": "Befehl A (03-2025)",
28
+ "Command R+ (08-2024)": "Befehl R+ (08-2024)",
29
+ "Command R (08-2024)": "Befehl R (08-2024)",
30
+ "Command R7B (12-2024)": "Befehl R7B (12-2024)",
31
+ "GET": "ERHALTEN",
32
+ "POST": "POST",
33
+ "PATCH": "PATCH",
34
+ "PUT": "PUT",
35
+ "DELETE": "LÖSCHEN",
36
+ "HEAD": "HEAD",
37
+ "None": "Keine",
38
+ "JSON": "JSON",
39
+ "Form Data": "Formulardaten",
40
+ "Raw": "Rohe"
41
+ }
@@ -0,0 +1,41 @@
1
+ {
2
+ "Generate text using Cohere AI language models": "Generar texto usando modelos de idioma de Cohere AI",
3
+ "\nTo obtain your Cohere API Key:\n\n1. Go to the [Cohere Dashboard](https://dashboard.cohere.com/api-keys).\n2. Sign in or create a free account.\n3. Navigate to **API Keys** in the left sidebar.\n4. Click **Create Trial Key** (free) or use a production key.\n5. Copy the key and paste it below.\n\n": "\nTo obtain your Cohere API Key:\n\n1. Go to the [Cohere Dashboard](https://dashboard.cohere.com/api-keys).\n2. Sign in or create a free account.\n3. Navigate to **API Keys** in the left sidebar.\n4. Click **Create Trial Key** (free) or use a production key.\n5. Copy the key and paste it below.\n\n",
4
+ "Generate Text": "Generar texto",
5
+ "Custom API Call": "Llamada API personalizada",
6
+ "Generate a text response using Cohere AI Chat API": "Generar una respuesta de texto usando Cohere AI Chat API",
7
+ "Make a custom API call to a specific endpoint": "Hacer una llamada API personalizada a un extremo específico",
8
+ "Prompt": "Petición",
9
+ "Model": "Modelo",
10
+ "Temperature": "Temperatura",
11
+ "Max Tokens": "Tokens máximos",
12
+ "Method": "Método",
13
+ "Headers": "Encabezados",
14
+ "Query Parameters": "Parámetros de consulta",
15
+ "Body Type": "Tipo de cuerpo",
16
+ "Body": "Cuerpo",
17
+ "Response is Binary ?": "¿Respuesta es binaria?",
18
+ "No Error on Failure": "No hay ningún error en fallo",
19
+ "Timeout (in seconds)": "Tiempo de espera (en segundos)",
20
+ "Follow redirects": "Seguir redirecciones",
21
+ "The user message to send to the model": "El mensaje de usuario a enviar al modelo",
22
+ "The Cohere model to use for generation": "El modelo de Cohere a usar durante generación",
23
+ "Controls randomness (0.0 = deterministic, 1.0 = maximum randomness). Default: 0.3": "Controla al azar (0.0 = determinístico, 1.0 = máximo aleatorio). Por defecto: 0.3",
24
+ "Maximum number of tokens to generate. Leave empty for model default.": "Número máximo de tokens a generar. Dejar vacío para el modelo predeterminado.",
25
+ "Authorization headers are injected automatically from your connection.": "Las cabeceras de autorización se inyectan automáticamente desde tu conexión.",
26
+ "Enable for files like PDFs, images, etc.": "Activar para archivos como PDFs, imágenes, etc.",
27
+ "Command A (03-2025)": "Comando A (03-2025)",
28
+ "Command R+ (08-2024)": "Comando R + (08-2024)",
29
+ "Command R (08-2024)": "Comando R (08-2024)",
30
+ "Command R7B (12-2024)": "Comando R7B (12-2024)",
31
+ "GET": "RECOGER",
32
+ "POST": "POST",
33
+ "PATCH": "PATCH",
34
+ "PUT": "PUT",
35
+ "DELETE": "BORRAR",
36
+ "HEAD": "LIMPIO",
37
+ "None": "Ninguna",
38
+ "JSON": "JSON",
39
+ "Form Data": "Datos de Formulario",
40
+ "Raw": "Rápido"
41
+ }
@@ -0,0 +1,41 @@
1
+ {
2
+ "Generate text using Cohere AI language models": "Générer du texte en utilisant les modèles de langage Cohere AI",
3
+ "\nTo obtain your Cohere API Key:\n\n1. Go to the [Cohere Dashboard](https://dashboard.cohere.com/api-keys).\n2. Sign in or create a free account.\n3. Navigate to **API Keys** in the left sidebar.\n4. Click **Create Trial Key** (free) or use a production key.\n5. Copy the key and paste it below.\n\n": "\nTo obtain your Cohere API Key:\n\n1. Go to the [Cohere Dashboard](https://dashboard.cohere.com/api-keys).\n2. Sign in or create a free account.\n3. Navigate to **API Keys** in the left sidebar.\n4. Click **Create Trial Key** (free) or use a production key.\n5. Copy the key and paste it below.\n\n",
4
+ "Generate Text": "Générer du texte",
5
+ "Custom API Call": "Appel d'API personnalisé",
6
+ "Generate a text response using Cohere AI Chat API": "Générer une réponse texte en utilisant l'API de chat Cohere AI",
7
+ "Make a custom API call to a specific endpoint": "Passer un appel API personnalisé à un endpoint spécifique",
8
+ "Prompt": "Prompt",
9
+ "Model": "Modélisation",
10
+ "Temperature": "Température",
11
+ "Max Tokens": "Tokens max",
12
+ "Method": "Méthode",
13
+ "Headers": "Headers",
14
+ "Query Parameters": "Paramètres de requête",
15
+ "Body Type": "Body Type",
16
+ "Body": "Body",
17
+ "Response is Binary ?": "La réponse est Binaire ?",
18
+ "No Error on Failure": "Aucune erreur en cas d'échec",
19
+ "Timeout (in seconds)": "Délai d'expiration (en secondes)",
20
+ "Follow redirects": "Suivre les redirections",
21
+ "The user message to send to the model": "Le message de l'utilisateur à envoyer au modèle",
22
+ "The Cohere model to use for generation": "Le modèle Cohere à utiliser pour la génération",
23
+ "Controls randomness (0.0 = deterministic, 1.0 = maximum randomness). Default: 0.3": "Contrôle aléatoires (0.0 = déterministe, 1.0 = aléatoire). Par défaut: 0.3",
24
+ "Maximum number of tokens to generate. Leave empty for model default.": "Nombre maximum de jetons à générer. Laisser vide pour le modèle par défaut.",
25
+ "Authorization headers are injected automatically from your connection.": "Les Headers d'autorisation sont injectés automatiquement à partir de votre connexion.",
26
+ "Enable for files like PDFs, images, etc.": "Activer pour les fichiers comme les PDFs, les images, etc.",
27
+ "Command A (03-2025)": "Commande A (03-2025)",
28
+ "Command R+ (08-2024)": "Commande R+ (08-2024)",
29
+ "Command R (08-2024)": "Commande R (08-2024)",
30
+ "Command R7B (12-2024)": "Commande R7B (12-2024)",
31
+ "GET": "GET",
32
+ "POST": "POST",
33
+ "PATCH": "PATCH",
34
+ "PUT": "PUT",
35
+ "DELETE": "DELETE",
36
+ "HEAD": "HEAD",
37
+ "None": "Aucun",
38
+ "JSON": "JSON",
39
+ "Form Data": "Données du formulaire",
40
+ "Raw": "Brut"
41
+ }
@@ -0,0 +1,41 @@
1
+ {
2
+ "Generate text using Cohere AI language models": "Cohere AI言語モデルを使用してテキストを生成",
3
+ "\nTo obtain your Cohere API Key:\n\n1. Go to the [Cohere Dashboard](https://dashboard.cohere.com/api-keys).\n2. Sign in or create a free account.\n3. Navigate to **API Keys** in the left sidebar.\n4. Click **Create Trial Key** (free) or use a production key.\n5. Copy the key and paste it below.\n\n": "\nTo obtain your Cohere API Key:\n\n1. Go to the [Cohere Dashboard](https://dashboard.cohere.com/api-keys).\n2. Sign in or create a free account.\n3. Navigate to **API Keys** in the left sidebar.\n4. Click **Create Trial Key** (free) or use a production key.\n5. Copy the key and paste it below.\n\n",
4
+ "Generate Text": "テキストの生成",
5
+ "Custom API Call": "カスタムAPI呼び出し",
6
+ "Generate a text response using Cohere AI Chat API": "Cohere AI Chat API を使用してテキスト応答を生成する",
7
+ "Make a custom API call to a specific endpoint": "特定のエンドポイントへのカスタム API コールを実行します。",
8
+ "Prompt": "Prompt",
9
+ "Model": "モデル",
10
+ "Temperature": "回答のばらつき",
11
+ "Max Tokens": "最大トークン",
12
+ "Method": "方法",
13
+ "Headers": "ヘッダー",
14
+ "Query Parameters": "クエリパラメータ",
15
+ "Body Type": "ボディタイプ",
16
+ "Body": "本文",
17
+ "Response is Binary ?": "応答はバイナリですか?",
18
+ "No Error on Failure": "失敗時にエラーはありません",
19
+ "Timeout (in seconds)": "タイムアウト(秒)",
20
+ "Follow redirects": "リダイレクトをフォローする",
21
+ "The user message to send to the model": "モデルに送信するユーザーメッセージ",
22
+ "The Cohere model to use for generation": "世代のために使用するCohereモデル",
23
+ "Controls randomness (0.0 = deterministic, 1.0 = maximum randomness). Default: 0.3": "コントロールのrandomness (0.0 = deterministic, 1.0 = maximum randomness). デフォルト: 0.3",
24
+ "Maximum number of tokens to generate. Leave empty for model default.": "生成するトークンの最大数。モデルのデフォルト値は空のままにします。",
25
+ "Authorization headers are injected automatically from your connection.": "認証ヘッダは接続から自動的に注入されます。",
26
+ "Enable for files like PDFs, images, etc.": "PDF、画像などのファイルを有効にする",
27
+ "Command A (03-2025)": "Command A (03-2025)",
28
+ "Command R+ (08-2024)": "Command R+ (08-2024)",
29
+ "Command R (08-2024)": "Command R (08-2024)",
30
+ "Command R7B (12-2024)": "Command R7B (12-2024)",
31
+ "GET": "GET",
32
+ "POST": "POST",
33
+ "PATCH": "PATCH",
34
+ "PUT": "PUT",
35
+ "DELETE": "DELETE",
36
+ "HEAD": "HEAD",
37
+ "None": "なし",
38
+ "JSON": "JSON",
39
+ "Form Data": "フォームデータ",
40
+ "Raw": "Raw"
41
+ }
@@ -0,0 +1,41 @@
1
+ {
2
+ "Generate text using Cohere AI language models": "Genereer tekst met behulp van Cohere AI taalmodellen",
3
+ "\nTo obtain your Cohere API Key:\n\n1. Go to the [Cohere Dashboard](https://dashboard.cohere.com/api-keys).\n2. Sign in or create a free account.\n3. Navigate to **API Keys** in the left sidebar.\n4. Click **Create Trial Key** (free) or use a production key.\n5. Copy the key and paste it below.\n\n": "\nOm uw Cohere API Key te verkrijgen:\n\n1. Ga naar [Cohere Dashboard](https://dashboard.cohere.com/api-keys).\n2. Log in of maak een gratis account aan.\n3. Navigeer naar **API Keys** in de linker zijbalk.\n4. Klik op **gratis proefsleutel maken** of gebruik een sneltoets.\n5. Kopieer de sleutel en plak deze hieronder.\n\n",
4
+ "Generate Text": "Genereer tekst",
5
+ "Custom API Call": "Custom API Call",
6
+ "Generate a text response using Cohere AI Chat API": "Genereer een tekstantwoord met behulp van Cohere AI Chat API",
7
+ "Make a custom API call to a specific endpoint": "Maak een aangepaste API call naar een specifiek eindpunt",
8
+ "Prompt": "Prompt",
9
+ "Model": "Model",
10
+ "Temperature": "Temperatuur",
11
+ "Max Tokens": "Max Tokens",
12
+ "Method": "Methode",
13
+ "Headers": "Kopteksten",
14
+ "Query Parameters": "Query parameters",
15
+ "Body Type": "Type lichaam",
16
+ "Body": "Lichaam",
17
+ "Response is Binary ?": "Antwoord is binair?",
18
+ "No Error on Failure": "Geen fout bij fout",
19
+ "Timeout (in seconds)": "Time-out (in seconden)",
20
+ "Follow redirects": "Volg omleidingen",
21
+ "The user message to send to the model": "Het gebruikersbericht om naar het model te sturen",
22
+ "The Cohere model to use for generation": "Het Cohere model dat gebruikt moet worden voor generatie",
23
+ "Controls randomness (0.0 = deterministic, 1.0 = maximum randomness). Default: 0.3": "Bepaalt willekeurigheid (0.0 = deterministisch, 1.0 = maximale willekeurigheid). Standaard: 0.3",
24
+ "Maximum number of tokens to generate. Leave empty for model default.": "Maximum aantal te genereren tokens. Laat leeg voor modelstandaard.",
25
+ "Authorization headers are injected automatically from your connection.": "Autorisatie headers worden automatisch geïnjecteerd vanuit uw verbinding.",
26
+ "Enable for files like PDFs, images, etc.": "Inschakelen voor bestanden zoals PDF's, afbeeldingen etc.",
27
+ "Command A (03-2025)": "Commando A (03-2025)",
28
+ "Command R+ (08-2024)": "Opdracht R+ (08-2024)",
29
+ "Command R (08-2024)": "Opdracht R (08-2024)",
30
+ "Command R7B (12-2024)": "Opdracht R7B (12-2024)",
31
+ "GET": "KRIJG",
32
+ "POST": "POSTE",
33
+ "PATCH": "BEKIJK",
34
+ "PUT": "PUT",
35
+ "DELETE": "VERWIJDEREN",
36
+ "HEAD": "HOOFD",
37
+ "None": "geen",
38
+ "JSON": "JSON",
39
+ "Form Data": "Formulieren gegevens",
40
+ "Raw": "Onbewerkte"
41
+ }
@@ -0,0 +1,41 @@
1
+ {
2
+ "Generate text using Cohere AI language models": "Gerar texto usando modelos de linguagem IA Cohere",
3
+ "\nTo obtain your Cohere API Key:\n\n1. Go to the [Cohere Dashboard](https://dashboard.cohere.com/api-keys).\n2. Sign in or create a free account.\n3. Navigate to **API Keys** in the left sidebar.\n4. Click **Create Trial Key** (free) or use a production key.\n5. Copy the key and paste it below.\n\n": "\nTo obtain your Cohere API Key:\n\n1. Go to the [Cohere Dashboard](https://dashboard.cohere.com/api-keys).\n2. Sign in or create a free account.\n3. Navigate to **API Keys** in the left sidebar.\n4. Click **Create Trial Key** (free) or use a production key.\n5. Copy the key and paste it below.\n\n",
4
+ "Generate Text": "Gerar texto",
5
+ "Custom API Call": "Chamada de API personalizada",
6
+ "Generate a text response using Cohere AI Chat API": "Gerar uma resposta de texto usando Cohere AI Chat API",
7
+ "Make a custom API call to a specific endpoint": "Faça uma chamada de API personalizada para um ponto de extremidade específico",
8
+ "Prompt": "Aviso",
9
+ "Model": "Modelo",
10
+ "Temperature": "Temperatura",
11
+ "Max Tokens": "Max Tokens",
12
+ "Method": "Método",
13
+ "Headers": "Cabeçalhos",
14
+ "Query Parameters": "Parâmetros da consulta",
15
+ "Body Type": "Tipo de Corpo",
16
+ "Body": "Conteúdo",
17
+ "Response is Binary ?": "A resposta é binária ?",
18
+ "No Error on Failure": "Nenhum erro no Failure",
19
+ "Timeout (in seconds)": "Tempo limite (em segundos)",
20
+ "Follow redirects": "Seguir redirecionamentos",
21
+ "The user message to send to the model": "A mensagem do usuário a ser enviada para o modelo",
22
+ "The Cohere model to use for generation": "O modelo de Cohere a ser usado para geração",
23
+ "Controls randomness (0.0 = deterministic, 1.0 = maximum randomness). Default: 0.3": "Controla a aleatoriedade (0.0 = deterministic, 1.0 = máxima aleatoriedade). Padrão: 0.3",
24
+ "Maximum number of tokens to generate. Leave empty for model default.": "Número máximo de tokens a gerar. Deixe em branco para padrão de modelo.",
25
+ "Authorization headers are injected automatically from your connection.": "Os cabeçalhos de autorização são inseridos automaticamente a partir da sua conexão.",
26
+ "Enable for files like PDFs, images, etc.": "Habilitar para arquivos como PDFs, imagens, etc.",
27
+ "Command A (03-2025)": "Comando A (03-2025)",
28
+ "Command R+ (08-2024)": "Comando R+ (08-2024)",
29
+ "Command R (08-2024)": "Comando R (08-2024)",
30
+ "Command R7B (12-2024)": "Comando R7B (12-2024)",
31
+ "GET": "OBTER",
32
+ "POST": "POSTAR",
33
+ "PATCH": "COMPRAR",
34
+ "PUT": "COLOCAR",
35
+ "DELETE": "EXCLUIR",
36
+ "HEAD": "CABEÇA",
37
+ "None": "Nenhuma",
38
+ "JSON": "JSON",
39
+ "Form Data": "Dados de Formulário",
40
+ "Raw": "RAW"
41
+ }
@@ -0,0 +1,41 @@
1
+ {
2
+ "Generate text using Cohere AI language models": "Generate text using Cohere AI language models",
3
+ "\nTo obtain your Cohere API Key:\n\n1. Go to the [Cohere Dashboard](https://dashboard.cohere.com/api-keys).\n2. Sign in or create a free account.\n3. Navigate to **API Keys** in the left sidebar.\n4. Click **Create Trial Key** (free) or use a production key.\n5. Copy the key and paste it below.\n\n": "\nTo obtain your Cohere API Key:\n\n1. Go to the [Cohere Dashboard](https://dashboard.cohere.com/api-keys).\n2. Sign in or create a free account.\n3. Navigate to **API Keys** in the left sidebar.\n4. Click **Create Trial Key** (free) or use a production key.\n5. Copy the key and paste it below.\n\n",
4
+ "Generate Text": "Generate Text",
5
+ "Custom API Call": "Custom API Call",
6
+ "Generate a text response using Cohere AI Chat API": "Generate a text response using Cohere AI Chat API",
7
+ "Make a custom API call to a specific endpoint": "Make a custom API call to a specific endpoint",
8
+ "Prompt": "Prompt",
9
+ "Model": "Model",
10
+ "Temperature": "Temperature",
11
+ "Max Tokens": "Max Tokens",
12
+ "Method": "Method",
13
+ "Headers": "Headers",
14
+ "Query Parameters": "Query Parameters",
15
+ "Body Type": "Body Type",
16
+ "Body": "Body",
17
+ "Response is Binary ?": "Response is Binary ?",
18
+ "No Error on Failure": "No Error on Failure",
19
+ "Timeout (in seconds)": "Timeout (in seconds)",
20
+ "Follow redirects": "Follow redirects",
21
+ "The user message to send to the model": "The user message to send to the model",
22
+ "The Cohere model to use for generation": "The Cohere model to use for generation",
23
+ "Controls randomness (0.0 = deterministic, 1.0 = maximum randomness). Default: 0.3": "Controls randomness (0.0 = deterministic, 1.0 = maximum randomness). Default: 0.3",
24
+ "Maximum number of tokens to generate. Leave empty for model default.": "Maximum number of tokens to generate. Leave empty for model default.",
25
+ "Authorization headers are injected automatically from your connection.": "Authorization headers are injected automatically from your connection.",
26
+ "Enable for files like PDFs, images, etc.": "Enable for files like PDFs, images, etc.",
27
+ "Command A (03-2025)": "Command A (03-2025)",
28
+ "Command R+ (08-2024)": "Command R+ (08-2024)",
29
+ "Command R (08-2024)": "Command R (08-2024)",
30
+ "Command R7B (12-2024)": "Command R7B (12-2024)",
31
+ "GET": "GET",
32
+ "POST": "POST",
33
+ "PATCH": "PATCH",
34
+ "PUT": "PUT",
35
+ "DELETE": "DELETE",
36
+ "HEAD": "HEAD",
37
+ "None": "None",
38
+ "JSON": "JSON",
39
+ "Form Data": "Form Data",
40
+ "Raw": "Raw"
41
+ }
@@ -0,0 +1,41 @@
1
+ {
2
+ "Generate text using Cohere AI language models": "Generate text using Cohere AI language models",
3
+ "\nTo obtain your Cohere API Key:\n\n1. Go to the [Cohere Dashboard](https://dashboard.cohere.com/api-keys).\n2. Sign in or create a free account.\n3. Navigate to **API Keys** in the left sidebar.\n4. Click **Create Trial Key** (free) or use a production key.\n5. Copy the key and paste it below.\n\n": "\nTo obtain your Cohere API Key:\n\n1. Go to the [Cohere Dashboard](https://dashboard.cohere.com/api-keys).\n2. Sign in or create a free account.\n3. Navigate to **API Keys** in the left sidebar.\n4. Click **Create Trial Key** (free) or use a production key.\n5. Copy the key and paste it below.\n\n",
4
+ "Generate Text": "Generate Text",
5
+ "Custom API Call": "自定义 API 呼叫",
6
+ "Generate a text response using Cohere AI Chat API": "Generate a text response using Cohere AI Chat API",
7
+ "Make a custom API call to a specific endpoint": "将一个自定义 API 调用到一个特定的终点",
8
+ "Prompt": "Prompt",
9
+ "Model": "Model",
10
+ "Temperature": "Temperature",
11
+ "Max Tokens": "Max Tokens",
12
+ "Method": "方法",
13
+ "Headers": "信头",
14
+ "Query Parameters": "查询参数",
15
+ "Body Type": "Body Type",
16
+ "Body": "正文内容",
17
+ "Response is Binary ?": "Response is Binary ?",
18
+ "No Error on Failure": "失败时没有错误",
19
+ "Timeout (in seconds)": "超时(秒)",
20
+ "Follow redirects": "Follow redirects",
21
+ "The user message to send to the model": "The user message to send to the model",
22
+ "The Cohere model to use for generation": "The Cohere model to use for generation",
23
+ "Controls randomness (0.0 = deterministic, 1.0 = maximum randomness). Default: 0.3": "Controls randomness (0.0 = deterministic, 1.0 = maximum randomness). Default: 0.3",
24
+ "Maximum number of tokens to generate. Leave empty for model default.": "Maximum number of tokens to generate. Leave empty for model default.",
25
+ "Authorization headers are injected automatically from your connection.": "授权头自动从您的连接中注入。",
26
+ "Enable for files like PDFs, images, etc.": "Enable for files like PDFs, images, etc.",
27
+ "Command A (03-2025)": "Command A (03-2025)",
28
+ "Command R+ (08-2024)": "Command R+ (08-2024)",
29
+ "Command R (08-2024)": "Command R (08-2024)",
30
+ "Command R7B (12-2024)": "Command R7B (12-2024)",
31
+ "GET": "获取",
32
+ "POST": "帖子",
33
+ "PATCH": "PATCH",
34
+ "PUT": "弹出",
35
+ "DELETE": "删除",
36
+ "HEAD": "黑色",
37
+ "None": "无",
38
+ "JSON": "JSON",
39
+ "Form Data": "表单数据",
40
+ "Raw": "原始文件"
41
+ }
@@ -1,6 +1,6 @@
1
1
  export declare const generateText: import("@activepieces/pieces-framework").IAction<import("@activepieces/pieces-framework").SecretTextProperty<true>, {
2
2
  prompt: import("@activepieces/pieces-framework").LongTextProperty<true>;
3
- model: import("@activepieces/pieces-framework").StaticDropdownProperty<string, true>;
3
+ model: import("@activepieces/pieces-framework").DropdownProperty<string, true, import("@activepieces/pieces-framework").SecretTextProperty<true>>;
4
4
  temperature: import("@activepieces/pieces-framework").NumberProperty<false>;
5
5
  maxTokens: import("@activepieces/pieces-framework").NumberProperty<false>;
6
6
  }>;
@@ -1 +1 @@
1
- {"version":3,"file":"generate-text.d.ts","sourceRoot":"","sources":["../../../../src/lib/actions/generate-text.ts"],"names":[],"mappings":"AA2DA,eAAO,MAAM,YAAY;;;;;EA6EvB,CAAC"}
1
+ {"version":3,"file":"generate-text.d.ts","sourceRoot":"","sources":["../../../../src/lib/actions/generate-text.ts"],"names":[],"mappings":"AA6DA,eAAO,MAAM,YAAY;;;;;EAwGvB,CAAC"}
@@ -6,6 +6,7 @@ const pieces_framework_1 = require("@activepieces/pieces-framework");
6
6
  const pieces_common_1 = require("@activepieces/pieces-common");
7
7
  const auth_1 = require("../auth");
8
8
  const COHERE_CHAT_URL = 'https://api.cohere.com/v2/chat';
9
+ const COHERE_MODELS_URL = 'https://api.cohere.com/v1/models';
9
10
  const MAX_RETRIES = 3;
10
11
  const INITIAL_BACKOFF_MS = 1000;
11
12
  function generateWithRetry(apiKey, request) {
@@ -56,23 +57,47 @@ exports.generateText = (0, pieces_framework_1.createAction)({
56
57
  description: 'The user message to send to the model',
57
58
  required: true,
58
59
  }),
59
- model: pieces_framework_1.Property.StaticDropdown({
60
+ model: pieces_framework_1.Property.Dropdown({
60
61
  displayName: 'Model',
61
62
  description: 'The Cohere model to use for generation',
62
63
  required: true,
63
64
  defaultValue: 'command-a-03-2025',
64
- options: {
65
- disabled: false,
66
- options: [
67
- { label: 'Command A (03-2025)', value: 'command-a-03-2025' },
68
- {
69
- label: 'Command R+ (08-2024)',
70
- value: 'command-r-plus-08-2024',
71
- },
72
- { label: 'Command R (08-2024)', value: 'command-r-08-2024' },
73
- { label: 'Command R7B (12-2024)', value: 'command-r7b-12-2024' },
74
- ],
75
- },
65
+ auth: auth_1.cohereAuth,
66
+ refreshers: [],
67
+ options: (_a) => tslib_1.__awaiter(void 0, [_a], void 0, function* ({ auth }) {
68
+ if (!auth) {
69
+ return {
70
+ disabled: true,
71
+ placeholder: 'Enter your API key first',
72
+ options: [],
73
+ };
74
+ }
75
+ try {
76
+ const response = yield pieces_common_1.httpClient.sendRequest({
77
+ method: pieces_common_1.HttpMethod.GET,
78
+ url: COHERE_MODELS_URL,
79
+ headers: {
80
+ Authorization: `Bearer ${auth.secret_text}`,
81
+ },
82
+ queryParams: {
83
+ page_size: '1000',
84
+ endpoint: 'chat',
85
+ },
86
+ });
87
+ const options = response.body.models.map((model) => ({
88
+ label: model.name,
89
+ value: model.name,
90
+ }));
91
+ return { disabled: false, options };
92
+ }
93
+ catch (_b) {
94
+ return {
95
+ disabled: true,
96
+ options: [],
97
+ placeholder: "Couldn't load models, check your API key or try again.",
98
+ };
99
+ }
100
+ }),
76
101
  }),
77
102
  temperature: pieces_framework_1.Property.Number({
78
103
  displayName: 'Temperature',
@@ -1 +1 @@
1
- {"version":3,"file":"generate-text.js","sourceRoot":"","sources":["../../../../src/lib/actions/generate-text.ts"],"names":[],"mappings":";;;;AAAA,qEAAwE;AACxE,+DAAqE;AAMrE,kCAAqC;AAErC,MAAM,eAAe,GAAG,gCAAgC,CAAC;AACzD,MAAM,WAAW,GAAG,CAAC,CAAC;AACtB,MAAM,kBAAkB,GAAG,IAAI,CAAC;AAEhC,SAAe,iBAAiB,CAC9B,MAAc,EACd,OAA0B;;;Q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