@activepieces/piece-open-router 0.0.16 → 0.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,27 +1,23 @@
1
1
  {
2
2
  "name": "@activepieces/piece-open-router",
3
- "version": "0.0.16",
3
+ "version": "0.1.1",
4
4
  "dependencies": {
5
5
  "@sinclair/typebox": "0.34.11",
6
- "axios": "1.8.3",
6
+ "ai": "^6.0.0",
7
+ "axios": "1.13.1",
7
8
  "axios-retry": "4.4.1",
8
9
  "deepmerge-ts": "7.1.0",
10
+ "form-data": "4.0.4",
11
+ "i18next": "23.13.0",
9
12
  "mime-types": "2.1.35",
10
13
  "nanoid": "3.3.8",
11
14
  "semver": "7.6.0",
12
- "zod": "3.25.76",
13
- "@activepieces/pieces-common": "0.7.0",
14
- "@activepieces/pieces-framework": "0.20.1",
15
- "@activepieces/shared": "0.20.1",
16
- "tslib": "2.8.1"
17
- },
18
- "overrides": {
19
- "@tryfabric/martian": {
20
- "@notionhq/client": "$@notionhq/client"
21
- },
22
- "vite": {
23
- "rollup": "npm:@rollup/wasm-node"
24
- }
15
+ "socket.io-client": "4.8.1",
16
+ "zod": "4.1.13",
17
+ "@activepieces/pieces-common": "0.11.2",
18
+ "@activepieces/pieces-framework": "0.24.0",
19
+ "@activepieces/shared": "0.32.0",
20
+ "tslib": "2.6.2"
25
21
  },
26
22
  "resolutions": {
27
23
  "rollup": "npm:@rollup/wasm-node"
package/src/i18n/de.json CHANGED
@@ -13,21 +13,27 @@
13
13
  "Method": "Methode",
14
14
  "Headers": "Kopfzeilen",
15
15
  "Query Parameters": "Abfrageparameter",
16
+ "Body Type": "Körpertyp",
16
17
  "Body": "Körper",
17
18
  "Response is Binary ?": "Antwort ist binär?",
18
19
  "No Error on Failure": "Kein Fehler bei Fehler",
19
20
  "Timeout (in seconds)": "Timeout (in Sekunden)",
21
+ "Follow redirects": "Weiterleitungen folgen",
20
22
  "The model which will generate the completion. Some models are suitable for natural language tasks, others specialize in code.": "Das Modell, das die Vervollständigung generiert. Einige Modelle eignen sich für Aufgaben der natürlichen Sprache, andere sind auf Code spezialisiert.",
21
23
  "The prompt to send to the model.": "Die Eingabeaufforderung, die an das Modell gesendet wird.",
22
24
  "Controls randomness: Lowering results in less random completions. As the temperature approaches zero, the model will become deterministic and repetitive.": "Kontrolliert Zufallszufälligkeit: Die Verringerung führt zu weniger zufälligen Vervollständigungen. Je näher die Temperatur Null rückt, desto deterministischer und sich wiederholender wird.",
23
25
  "The maximum number of tokens to generate. Requests can use up to 2,048 or 4,096 tokens shared between prompt and completion, don't set the value to maximum and leave some tokens for the input. The exact limit varies by model. (One token is roughly 4 characters for normal English text)": "Die maximale Anzahl der zu generierenden Token. Anfragen können bis zu 2.048 oder 4.096 Token verwenden, die zwischen Prompt und Fertigstellung geteilt werden, setzen Sie den Wert nicht auf maximal und lassen Sie einige Token für die Eingabe. Das genaue Limit variiert je nach Modell. (Ein Token ist ungefähr 4 Zeichen für den normalen englischen Text)",
24
26
  "An alternative to sampling with temperature, called nucleus sampling, where the model considers the results of the tokens with top_p probability mass. So 0.1 means only the tokens comprising the top 10% probability mass are considered.": "Eine Alternative zur Probenahme mit Temperatur, genannt Nucleus Probenahme, bei der das Modell die Ergebnisse der Tokens mit der Top_p Wahrscheinlichkeitsmasse berücksichtigt. 0,1 bedeutet also nur die Token, die die obersten 10% Wahrscheinlichkeitsmasse ausmachen.",
25
27
  "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, etc..",
28
+ "Enable for files like PDFs, images, etc.": "Aktivieren für Dateien wie PDFs, Bilder usw.",
27
29
  "GET": "ERHALTEN",
28
30
  "POST": "POST",
29
31
  "PATCH": "PATCH",
30
32
  "PUT": "PUT",
31
33
  "DELETE": "LÖSCHEN",
32
- "HEAD": "HEAD"
34
+ "HEAD": "HEAD",
35
+ "None": "Keine",
36
+ "JSON": "JSON",
37
+ "Form Data": "Formulardaten",
38
+ "Raw": "Rohe"
33
39
  }
package/src/i18n/es.json CHANGED
@@ -13,21 +13,27 @@
13
13
  "Method": "Método",
14
14
  "Headers": "Encabezados",
15
15
  "Query Parameters": "Parámetros de consulta",
16
+ "Body Type": "Tipo de cuerpo",
16
17
  "Body": "Cuerpo",
17
18
  "Response is Binary ?": "¿Respuesta es binaria?",
18
19
  "No Error on Failure": "No hay ningún error en fallo",
19
20
  "Timeout (in seconds)": "Tiempo de espera (en segundos)",
21
+ "Follow redirects": "Seguir redirecciones",
20
22
  "The model which will generate the completion. Some models are suitable for natural language tasks, others specialize in code.": "El modelo que generará la terminación. Algunos modelos son adecuados para tareas de lenguaje natural, otros se especializan en código.",
21
23
  "The prompt to send to the model.": "El prompt para enviar al modelo.",
22
24
  "Controls randomness: Lowering results in less random completions. As the temperature approaches zero, the model will become deterministic and repetitive.": "Controles aleatorios: La reducción de resultados en terminaciones menos aleatorias. A medida que la temperatura se acerca a cero, el modelo se volverá determinista y repetitivo.",
23
25
  "The maximum number of tokens to generate. Requests can use up to 2,048 or 4,096 tokens shared between prompt and completion, don't set the value to maximum and leave some tokens for the input. The exact limit varies by model. (One token is roughly 4 characters for normal English text)": "El número máximo de tokens a generar. Las solicitudes pueden usar hasta 2,048 o 4,096 tokens compartidos entre prompt y completation, no establezca el valor máximo y deje algunas fichas para la entrada. El límite exacto varía según el modelo. (Un token es de aproximadamente 4 caracteres para el texto normal en inglés)",
24
26
  "An alternative to sampling with temperature, called nucleus sampling, where the model considers the results of the tokens with top_p probability mass. So 0.1 means only the tokens comprising the top 10% probability mass are considered.": "Una alternativa al muestreo con temperatura, llamado muestreo de núcleos, donde el modelo considera los resultados de los tokens con masa de probabilidad superior_p. Por lo tanto, 0,1 significa que sólo se consideran las fichas que componen la masa superior del 10% de probabilidad.",
25
27
  "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.",
28
+ "Enable for files like PDFs, images, etc.": "Activar para archivos como PDFs, imágenes, etc.",
27
29
  "GET": "RECOGER",
28
30
  "POST": "POST",
29
31
  "PATCH": "PATCH",
30
32
  "PUT": "PUT",
31
33
  "DELETE": "BORRAR",
32
- "HEAD": "LIMPIO"
34
+ "HEAD": "LIMPIO",
35
+ "None": "Ninguna",
36
+ "JSON": "JSON",
37
+ "Form Data": "Datos de Formulario",
38
+ "Raw": "Rápido"
33
39
  }
package/src/i18n/fr.json CHANGED
@@ -13,21 +13,27 @@
13
13
  "Method": "Méthode",
14
14
  "Headers": "En-têtes",
15
15
  "Query Parameters": "Paramètres de requête",
16
+ "Body Type": "Body Type",
16
17
  "Body": "Corps",
17
18
  "Response is Binary ?": "La réponse est Binaire ?",
18
19
  "No Error on Failure": "Aucune erreur en cas d'échec",
19
20
  "Timeout (in seconds)": "Délai d'attente (en secondes)",
21
+ "Follow redirects": "Suivre les redirections",
20
22
  "The model which will generate the completion. Some models are suitable for natural language tasks, others specialize in code.": "Le modèle qui va générer la complétion. Certains modèles sont adaptés aux tâches de langage naturel, d'autres se spécialisent dans le code.",
21
23
  "The prompt to send to the model.": "L'invite à envoyer au modèle.",
22
24
  "Controls randomness: Lowering results in less random completions. As the temperature approaches zero, the model will become deterministic and repetitive.": "Contrôle aléatoirement : La baisse des résultats est moins aléatoire, alors que la température approche de zéro, le modèle devient déterministe et répétitif.",
23
25
  "The maximum number of tokens to generate. Requests can use up to 2,048 or 4,096 tokens shared between prompt and completion, don't set the value to maximum and leave some tokens for the input. The exact limit varies by model. (One token is roughly 4 characters for normal English text)": "Le nombre maximum de jetons à générer. Les requêtes peuvent utiliser jusqu'à 2 048 ou 4 096 jetons partagés entre l'invite et la complétion, ne pas définir la valeur au maximum et laisser des jetons pour l'entrée. La limite exacte varie selon le modèle. (un jeton est d'environ 4 caractères pour le texte anglais normal)",
24
26
  "An alternative to sampling with temperature, called nucleus sampling, where the model considers the results of the tokens with top_p probability mass. So 0.1 means only the tokens comprising the top 10% probability mass are considered.": "Une alternative à l'échantillonnage à la température, appelée l'échantillonnage du noyau, où le modèle considère les résultats des jetons avec la masse de probabilité top_p. Ainsi, 0,1 signifie que seuls les jetons constituant la masse de probabilité la plus élevée de 10% sont pris en compte.",
25
27
  "Authorization headers are injected automatically from your connection.": "Les en-têtes 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.",
28
+ "Enable for files like PDFs, images, etc.": "Activer pour les fichiers comme les PDFs, les images, etc.",
27
29
  "GET": "OBTENIR",
28
30
  "POST": "POSTER",
29
31
  "PATCH": "PATCH",
30
32
  "PUT": "EFFACER",
31
33
  "DELETE": "SUPPRIMER",
32
- "HEAD": "TÊTE"
34
+ "HEAD": "TÊTE",
35
+ "None": "Aucun",
36
+ "JSON": "JSON",
37
+ "Form Data": "Données du formulaire",
38
+ "Raw": "Brut"
33
39
  }
package/src/i18n/ja.json CHANGED
@@ -13,21 +13,27 @@
13
13
  "Method": "方法",
14
14
  "Headers": "ヘッダー",
15
15
  "Query Parameters": "クエリパラメータ",
16
+ "Body Type": "ボディタイプ",
16
17
  "Body": "本文",
17
18
  "Response is Binary ?": "応答はバイナリですか?",
18
19
  "No Error on Failure": "失敗時にエラーはありません",
19
20
  "Timeout (in seconds)": "タイムアウト(秒)",
21
+ "Follow redirects": "リダイレクトをフォローする",
20
22
  "The model which will generate the completion. Some models are suitable for natural language tasks, others specialize in code.": "補完を生成するモデル。自然言語タスクに適しているモデルもあれば、コードに特化したモデルもあります。",
21
23
  "The prompt to send to the model.": "モデルに送信するプロンプト。",
22
24
  "Controls randomness: Lowering results in less random completions. As the temperature approaches zero, the model will become deterministic and repetitive.": "温度がゼロに近づくにつれて、モデルは決定論的で反復的になります。",
23
25
  "The maximum number of tokens to generate. Requests can use up to 2,048 or 4,096 tokens shared between prompt and completion, don't set the value to maximum and leave some tokens for the input. The exact limit varies by model. (One token is roughly 4 characters for normal English text)": "生成するトークンの最大数。 リクエストは、プロンプトと完了の間で共有された最大2,048または4,096トークンを使用できます。 値を最大値に設定しないで、トークンを入力してください。 正確な制限はモデルによって異なります。(通常の英文では1つのトークンが約4文字です)",
24
26
  "An alternative to sampling with temperature, called nucleus sampling, where the model considers the results of the tokens with top_p probability mass. So 0.1 means only the tokens comprising the top 10% probability mass are considered.": "核サンプリングと呼ばれる温度でのサンプリングの代わりに、モデルはtop_p確率質量を持つトークンの結果を考慮します。 つまり、0.1は上位10%の確率質量からなるトークンのみを考慮することになります。",
25
27
  "Authorization headers are injected automatically from your connection.": "認証ヘッダは接続から自動的に注入されます。",
26
- "Enable for files like PDFs, images, etc..": "PDF、画像などのファイルを有効にします。",
28
+ "Enable for files like PDFs, images, etc.": "PDF、画像などのファイルを有効にする",
27
29
  "GET": "取得",
28
30
  "POST": "POST",
29
31
  "PATCH": "PATCH",
30
32
  "PUT": "PUT",
31
33
  "DELETE": "削除",
32
- "HEAD": "頭"
34
+ "HEAD": "頭",
35
+ "None": "なし",
36
+ "JSON": "JSON",
37
+ "Form Data": "フォームデータ",
38
+ "Raw": "Raw"
33
39
  }
package/src/i18n/nl.json CHANGED
@@ -13,21 +13,27 @@
13
13
  "Method": "Methode",
14
14
  "Headers": "Kopteksten",
15
15
  "Query Parameters": "Query parameters",
16
+ "Body Type": "Type lichaam",
16
17
  "Body": "Lichaam",
17
18
  "Response is Binary ?": "Antwoord is binair?",
18
19
  "No Error on Failure": "Geen fout bij fout",
19
20
  "Timeout (in seconds)": "Time-out (in seconden)",
21
+ "Follow redirects": "Volg omleidingen",
20
22
  "The model which will generate the completion. Some models are suitable for natural language tasks, others specialize in code.": "Het model dat de voltooiing zal genereren. Sommige modellen zijn geschikt voor natuurlijke taaltaken, andere zijn gespecialiseerd in code.",
21
23
  "The prompt to send to the model.": "De prompt om naar het model te sturen.",
22
24
  "Controls randomness: Lowering results in less random completions. As the temperature approaches zero, the model will become deterministic and repetitive.": "Bestuurt willekeurigheid: Het verlagen van de temperatuur resulteert in minder willekeurige aanvullingen. Zodra de temperatuur nul nadert, zal het model deterministisch en herhalend worden.",
23
25
  "The maximum number of tokens to generate. Requests can use up to 2,048 or 4,096 tokens shared between prompt and completion, don't set the value to maximum and leave some tokens for the input. The exact limit varies by model. (One token is roughly 4 characters for normal English text)": "Het maximum aantal te genereren tokens Verzoeken kunnen maximaal 2.048 of 4.096 tokens gedeeld worden tussen prompt en voltooiing, stel de waarde niet in op maximum en laat sommige tokens voor de invoer. De exacte limiet varieert per model. (Eén token is grofweg 4 tekens voor normale Engelse tekst)",
24
26
  "An alternative to sampling with temperature, called nucleus sampling, where the model considers the results of the tokens with top_p probability mass. So 0.1 means only the tokens comprising the top 10% probability mass are considered.": "Een alternatief voor bemonstering met de temperatuur, genaamd nucleus sampling, waarbij het model de resultaten van de tokens met top_p waarschijnlijkheid ziet. 0.1 betekent dus dat alleen de tokens die de grootste massa van 10 procent vormen, worden overwogen.",
25
27
  "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..",
28
+ "Enable for files like PDFs, images, etc.": "Inschakelen voor bestanden zoals PDF's, afbeeldingen etc.",
27
29
  "GET": "KRIJG",
28
30
  "POST": "POSTE",
29
31
  "PATCH": "BEKIJK",
30
32
  "PUT": "PUT",
31
33
  "DELETE": "VERWIJDEREN",
32
- "HEAD": "HOOFD"
34
+ "HEAD": "HOOFD",
35
+ "None": "geen",
36
+ "JSON": "JSON",
37
+ "Form Data": "Formulieren gegevens",
38
+ "Raw": "Onbewerkte"
33
39
  }
package/src/i18n/pt.json CHANGED
@@ -13,21 +13,27 @@
13
13
  "Method": "Método",
14
14
  "Headers": "Cabeçalhos",
15
15
  "Query Parameters": "Parâmetros da consulta",
16
+ "Body Type": "Tipo de Corpo",
16
17
  "Body": "Conteúdo",
17
18
  "Response is Binary ?": "A resposta é binária ?",
18
19
  "No Error on Failure": "Nenhum erro no Failure",
19
20
  "Timeout (in seconds)": "Tempo limite (em segundos)",
21
+ "Follow redirects": "Seguir redirecionamentos",
20
22
  "The model which will generate the completion. Some models are suitable for natural language tasks, others specialize in code.": "O modelo que irá gerar a conclusão. Alguns modelos são adequados para tarefas de linguagem natural, outros são especializados no código.",
21
23
  "The prompt to send to the model.": "O prompt para enviar para o modelo.",
22
24
  "Controls randomness: Lowering results in less random completions. As the temperature approaches zero, the model will become deterministic and repetitive.": "Controla aleatoriedade: Diminuir resulta em menos complementos aleatórios. À medida que a temperatura se aproxima de zero, o modelo se tornará determinístico e repetitivo.",
23
25
  "The maximum number of tokens to generate. Requests can use up to 2,048 or 4,096 tokens shared between prompt and completion, don't set the value to maximum and leave some tokens for the input. The exact limit varies by model. (One token is roughly 4 characters for normal English text)": "O número máximo de tokens a gerar. Solicitações podem usar até 2.048 ou 4.096 tokens compartilhados entre prompt e conclusão, não defina o valor como máximo e deixe algumas fichas para a entrada. O limite exato varia por modelo. (Um token é aproximadamente 4 caracteres para o texto normal em inglês)",
24
26
  "An alternative to sampling with temperature, called nucleus sampling, where the model considers the results of the tokens with top_p probability mass. So 0.1 means only the tokens comprising the top 10% probability mass are considered.": "Uma alternativa à amostragem com temperatura, chamada amostragem núcleo, onde o modelo considera os resultados dos tokens com massa de probabilidade superior (P). Portanto, 0,1 significa que apenas os tokens que incluem a massa de probabilidade superior de 10% são considerados.",
25
27
  "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..",
28
+ "Enable for files like PDFs, images, etc.": "Habilitar para arquivos como PDFs, imagens, etc.",
27
29
  "GET": "OBTER",
28
30
  "POST": "POSTAR",
29
31
  "PATCH": "COMPRAR",
30
32
  "PUT": "COLOCAR",
31
33
  "DELETE": "EXCLUIR",
32
- "HEAD": "CABEÇA"
34
+ "HEAD": "CABEÇA",
35
+ "None": "Nenhuma",
36
+ "JSON": "JSON",
37
+ "Form Data": "Dados de Formulário",
38
+ "Raw": "RAW"
33
39
  }
@@ -13,21 +13,27 @@
13
13
  "Method": "Method",
14
14
  "Headers": "Headers",
15
15
  "Query Parameters": "Query Parameters",
16
+ "Body Type": "Body Type",
16
17
  "Body": "Body",
17
18
  "Response is Binary ?": "Response is Binary ?",
18
19
  "No Error on Failure": "No Error on Failure",
19
20
  "Timeout (in seconds)": "Timeout (in seconds)",
21
+ "Follow redirects": "Follow redirects",
20
22
  "The model which will generate the completion. Some models are suitable for natural language tasks, others specialize in code.": "The model which will generate the completion. Some models are suitable for natural language tasks, others specialize in code.",
21
23
  "The prompt to send to the model.": "The prompt to send to the model.",
22
24
  "Controls randomness: Lowering results in less random completions. As the temperature approaches zero, the model will become deterministic and repetitive.": "Controls randomness: Lowering results in less random completions. As the temperature approaches zero, the model will become deterministic and repetitive.",
23
25
  "The maximum number of tokens to generate. Requests can use up to 2,048 or 4,096 tokens shared between prompt and completion, don't set the value to maximum and leave some tokens for the input. The exact limit varies by model. (One token is roughly 4 characters for normal English text)": "The maximum number of tokens to generate. Requests can use up to 2,048 or 4,096 tokens shared between prompt and completion, don't set the value to maximum and leave some tokens for the input. The exact limit varies by model. (One token is roughly 4 characters for normal English text)",
24
26
  "An alternative to sampling with temperature, called nucleus sampling, where the model considers the results of the tokens with top_p probability mass. So 0.1 means only the tokens comprising the top 10% probability mass are considered.": "An alternative to sampling with temperature, called nucleus sampling, where the model considers the results of the tokens with top_p probability mass. So 0.1 means only the tokens comprising the top 10% probability mass are considered.",
25
27
  "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..",
28
+ "Enable for files like PDFs, images, etc.": "Enable for files like PDFs, images, etc.",
27
29
  "GET": "GET",
28
30
  "POST": "POST",
29
31
  "PATCH": "PATCH",
30
32
  "PUT": "PUT",
31
33
  "DELETE": "DELETE",
32
- "HEAD": "HEAD"
34
+ "HEAD": "HEAD",
35
+ "None": "None",
36
+ "JSON": "JSON",
37
+ "Form Data": "Form Data",
38
+ "Raw": "Raw"
33
39
  }
package/src/i18n/zh.json CHANGED
@@ -13,21 +13,27 @@
13
13
  "Method": "方法",
14
14
  "Headers": "信头",
15
15
  "Query Parameters": "查询参数",
16
+ "Body Type": "Body Type",
16
17
  "Body": "正文内容",
17
18
  "Response is Binary ?": "Response is Binary ?",
18
19
  "No Error on Failure": "失败时没有错误",
19
20
  "Timeout (in seconds)": "超时(秒)",
21
+ "Follow redirects": "Follow redirects",
20
22
  "The model which will generate the completion. Some models are suitable for natural language tasks, others specialize in code.": "The model which will generate the completion. Some models are suitable for natural language tasks, others specialize in code.",
21
23
  "The prompt to send to the model.": "The prompt to send to the model.",
22
24
  "Controls randomness: Lowering results in less random completions. As the temperature approaches zero, the model will become deterministic and repetitive.": "Controls randomness: Lowering results in less random completions. As the temperature approaches zero, the model will become deterministic and repetitive.",
23
25
  "The maximum number of tokens to generate. Requests can use up to 2,048 or 4,096 tokens shared between prompt and completion, don't set the value to maximum and leave some tokens for the input. The exact limit varies by model. (One token is roughly 4 characters for normal English text)": "The maximum number of tokens to generate. Requests can use up to 2,048 or 4,096 tokens shared between prompt and completion, don't set the value to maximum and leave some tokens for the input. The exact limit varies by model. (One token is roughly 4 characters for normal English text)",
24
26
  "An alternative to sampling with temperature, called nucleus sampling, where the model considers the results of the tokens with top_p probability mass. So 0.1 means only the tokens comprising the top 10% probability mass are considered.": "An alternative to sampling with temperature, called nucleus sampling, where the model considers the results of the tokens with top_p probability mass. So 0.1 means only the tokens comprising the top 10% probability mass are considered.",
25
27
  "Authorization headers are injected automatically from your connection.": "授权头自动从您的连接中注入。",
26
- "Enable for files like PDFs, images, etc..": "Enable for files like PDFs, images, etc..",
28
+ "Enable for files like PDFs, images, etc.": "Enable for files like PDFs, images, etc.",
27
29
  "GET": "获取",
28
30
  "POST": "帖子",
29
31
  "PATCH": "PATCH",
30
32
  "PUT": "弹出",
31
33
  "DELETE": "删除",
32
- "HEAD": "黑色"
34
+ "HEAD": "黑色",
35
+ "None": "无",
36
+ "JSON": "JSON",
37
+ "Form Data": "表单数据",
38
+ "Raw": "原始文件"
33
39
  }
package/src/index.js CHANGED
@@ -58,7 +58,7 @@ exports.openRouter = (0, pieces_framework_1.createPiece)({
58
58
  auth: exports.openRouterAuth,
59
59
  authMapping: (auth) => tslib_1.__awaiter(void 0, void 0, void 0, function* () {
60
60
  return ({
61
- Authorization: `Bearer ${auth}`,
61
+ Authorization: `Bearer ${auth.secret_text}`,
62
62
  });
63
63
  }),
64
64
  }),
package/src/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../packages/pieces/community/open-router/src/index.ts"],"names":[],"mappings":";;;;AAAA,+DAMqC;AACrC,qEAAwE;AACxE,iDAAqD;AACrD,mEAAoE;AAEpE,MAAM,mBAAmB,GAAG;;;;;;CAM3B,CAAC;AACW,QAAA,cAAc,GAAG,4BAAS,CAAC,UAAU,CAAC;IACjD,WAAW,EAAE,mBAAmB;IAChC,WAAW,EAAE,SAAS;IACtB,QAAQ,EAAE,IAAI;IACd,QAAQ,EAAE,KAAiB,EAAE,oDAAZ,EAAE,IAAI,EAAE;QACvB,0FAA0F;QAC1F,gDAAgD;QAChD,kDAAkD;QAClD,IAAI,CAAC;YACH,MAAM,OAAO,GAAgB;gBAC3B,GAAG,EAAE,uCAAuC;gBAC5C,MAAM,EAAE,0BAAU,CAAC,GAAG;gBACtB,cAAc,EAAE;oBACd,IAAI,EAAE,kCAAkB,CAAC,YAAY;oBACrC,KAAK,EAAE,IAAI;iBACZ;aACF,CAAC;YACF,MAAM,0BAAU,CAAC,WAAW,CAAC,OAAO,CAAC,CAAC;YACtC,OAAO;gBACL,KAAK,EAAE,IAAI;aACZ,CAAC;QACJ,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACf,OAAO;gBACL,KAAK,EAAE,KAAK;gBACZ,KAAK,EAAE,iBAAiB;aACzB,CAAC;QACJ,CAAC;IACH,CAAC,CAAA;CACF,CAAC,CAAC;AAEU,QAAA,UAAU,GAAG,IAAA,8BAAW,EAAC;IACpC,WAAW,EAAE,YAAY;IACzB,WAAW,EAAE,uEAAuE;IACpF,IAAI,EAAE,sBAAc;IACpB,uBAAuB,EAAE,QAAQ;IACjC,OAAO,EAAE,qDAAqD;IAC9D,UAAU,EAAE,CAAC,sBAAa,CAAC,uBAAuB,CAAC;IACnD,OAAO,EAAE,CAAC,YAAY,EAAC,YAAY,EAAC,WAAW,EAAC,UAAU,CAAC;IAC3D,OAAO,EAAE;QACP,qCAAmB;QACnB,IAAA,yCAAyB,EAAC;YACxB,OAAO,EAAE,GAAG,EAAE,CAAC,8BAA8B;YAC7C,IAAI,EAAE,sBAAc;YACpB,WAAW,EAAE,CAAO,IAAI,EAAE,EAAE;gBAAC,OAAA,CAAC;oBAC5B,aAAa,EAAE,UAAU,IAAI,EAAE;iBAChC,CAAC,CAAA;cAAA;SACH,CAAC;KACH;IACD,QAAQ,EAAE,EAAE;CACb,CAAC,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../packages/pieces/community/open-router/src/index.ts"],"names":[],"mappings":";;;;AAAA,+DAMqC;AACrC,qEAAwE;AACxE,iDAAqD;AACrD,mEAAoE;AAEpE,MAAM,mBAAmB,GAAG;;;;;;CAM3B,CAAC;AACW,QAAA,cAAc,GAAG,4BAAS,CAAC,UAAU,CAAC;IACjD,WAAW,EAAE,mBAAmB;IAChC,WAAW,EAAE,SAAS;IACtB,QAAQ,EAAE,IAAI;IACd,QAAQ,EAAE,KAAiB,EAAE,oDAAZ,EAAE,IAAI,EAAE;QACvB,0FAA0F;QAC1F,gDAAgD;QAChD,kDAAkD;QAClD,IAAI,CAAC;YACH,MAAM,OAAO,GAAgB;gBAC3B,GAAG,EAAE,uCAAuC;gBAC5C,MAAM,EAAE,0BAAU,CAAC,GAAG;gBACtB,cAAc,EAAE;oBACd,IAAI,EAAE,kCAAkB,CAAC,YAAY;oBACrC,KAAK,EAAE,IAAI;iBACZ;aACF,CAAC;YACF,MAAM,0BAAU,CAAC,WAAW,CAAC,OAAO,CAAC,CAAC;YACtC,OAAO;gBACL,KAAK,EAAE,IAAI;aACZ,CAAC;QACJ,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACf,OAAO;gBACL,KAAK,EAAE,KAAK;gBACZ,KAAK,EAAE,iBAAiB;aACzB,CAAC;QACJ,CAAC;IACH,CAAC,CAAA;CACF,CAAC,CAAC;AAEU,QAAA,UAAU,GAAG,IAAA,8BAAW,EAAC;IACpC,WAAW,EAAE,YAAY;IACzB,WAAW,EAAE,uEAAuE;IACpF,IAAI,EAAE,sBAAc;IACpB,uBAAuB,EAAE,QAAQ;IACjC,OAAO,EAAE,qDAAqD;IAC9D,UAAU,EAAE,CAAC,sBAAa,CAAC,uBAAuB,CAAC;IACnD,OAAO,EAAE,CAAC,YAAY,EAAC,YAAY,EAAC,WAAW,EAAC,UAAU,CAAC;IAC3D,OAAO,EAAE;QACP,qCAAmB;QACnB,IAAA,yCAAyB,EAAC;YACxB,OAAO,EAAE,GAAG,EAAE,CAAC,8BAA8B;YAC7C,IAAI,EAAE,sBAAc;YACpB,WAAW,EAAE,CAAO,IAAI,EAAE,EAAE;gBAAC,OAAA,CAAC;oBAC5B,aAAa,EAAE,UAAU,IAAI,CAAC,WAAW,EAAE;iBAC5C,CAAC,CAAA;cAAA;SACH,CAAC;KACH;IACD,QAAQ,EAAE,EAAE;CACb,CAAC,CAAC"}
@@ -1,5 +1,5 @@
1
1
  export declare const askOpenRouterAction: import("@activepieces/pieces-framework").IAction<import("@activepieces/pieces-framework").SecretTextProperty<true>, {
2
- model: import("@activepieces/pieces-framework").DropdownProperty<string, true>;
2
+ model: import("@activepieces/pieces-framework").DropdownProperty<string, true, import("@activepieces/pieces-framework").SecretTextProperty<true>>;
3
3
  prompt: import("@activepieces/pieces-framework").LongTextProperty<true>;
4
4
  temperature: import("@activepieces/pieces-framework").NumberProperty<false>;
5
5
  maxTokens: import("@activepieces/pieces-framework").NumberProperty<false>;
@@ -14,18 +14,26 @@ exports.askOpenRouterAction = (0, pieces_framework_1.createAction)({
14
14
  auth: index_1.openRouterAuth,
15
15
  props: {
16
16
  model: pieces_framework_1.Property.Dropdown({
17
+ auth: index_1.openRouterAuth,
17
18
  displayName: 'Model',
18
19
  description: 'The model which will generate the completion. Some models are suitable for natural language tasks, others specialize in code.',
19
20
  required: true,
20
21
  refreshers: [],
21
22
  defaultValue: 'pygmalionai/mythalion-13b',
22
23
  options: (_a) => tslib_1.__awaiter(void 0, [_a], void 0, function* ({ auth }) {
24
+ if (!auth) {
25
+ return {
26
+ disabled: true,
27
+ options: [],
28
+ placeholder: 'Please connect your account first',
29
+ };
30
+ }
23
31
  const request = {
24
32
  url: 'https://openrouter.ai/api/v1/models',
25
33
  method: pieces_common_1.HttpMethod.GET,
26
34
  authentication: {
27
35
  type: pieces_common_1.AuthenticationType.BEARER_TOKEN,
28
- token: auth,
36
+ token: auth.secret_text,
29
37
  },
30
38
  };
31
39
  try {
@@ -91,7 +99,7 @@ exports.askOpenRouterAction = (0, pieces_framework_1.createAction)({
91
99
  },
92
100
  authentication: {
93
101
  type: pieces_common_1.AuthenticationType.BEARER_TOKEN,
94
- token: context.auth,
102
+ token: context.auth.secret_text,
95
103
  },
96
104
  headers: {
97
105
  'HTTP-Referer': 'https://openrouter.ai/playground',
@@ -1 +1 @@
1
- {"version":3,"file":"ask-open-router.js","sourceRoot":"","sources":["../../../../../../../../packages/pieces/community/open-router/src/lib/actions/ask-open-router.ts"],"names":[],"mappings":";;;;AAAA,uCAA6C;AAC7C,qEAGwC;AAExC,+DAKqC;AACrC,6BAAwB;AACxB,+DAA8D;AAEjD,QAAA,mBAAmB,GAAG,IAAA,+BAAY,EAAC;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AAE;oBACd,IAAI,EAAE,kCAAkB,CAAC,YAAY;oBACrC,KAAK,EAAE,OAAO,CAAC,IAAI;iBACpB;gBACD,OAAO,EAAE;oBACP,cAAc,EAAE,kCAAkC;iBACnD;aACF,CAAC;YACF,MAAM,QAAQ,GAAG,MAAM,0BAAU,CAAC,WAAW,CAAiB,OAAO,CAAC,CAAC;YACvE,MAAM,YAAY,GAAG,QAAQ,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC;YACnD,MAAM,eAAe,GAAG,YAAY,CAAC,IAAI,EAAE,CAAC;YAC5C,OAAO,eAAe,CAAC;QACzB,CAAC;KAAA;CACF,CAAC,CAAC"}
1
+ {"version":3,"file":"ask-open-router.js","sourceRoot":"","sources":["../../../../../../../../packages/pieces/community/open-router/src/lib/actions/ask-open-router.ts"],"names":[],"mappings":";;;;AAAA,uCAA6C;AAC7C,qEAGwC;AAExC,+DAKqC;AACrC,6BAAwB;AACxB,+DAA8D;AAEjD,QAAA,mBAAmB,GAAG,IAAA,+BAAY,EAAC;IAC9C,IAAI,EAAE,SAAS;IACf,WAAW,EAAE,SAAS;IACtB,WAAW,EAAE,yCAAyC;IACtD,IAAI,EAAE,sBAAc;IACpB,KAAK,EAAE;QACL,KAAK,EAAE,2BAAQ,CAAC,QAAQ,CAAC;YACvB,IAAI,EAAE,sBAAc;YACpB,WAAW,EAAE,OAAO;YACpB,WAAW,EACT,+HAA+H;YACjI,QAAQ,EAAE,IAAI;YACd,UAAU,EAAE,EAAE;YACd,YAAY,EAAE,2BAA2B;YACzC,OAAO,EAAE,KAAiB,EAAE,oDAAZ,EAAE,IAAI,EAAE;gBACtB,IAAI,CAAC,IAAI,EAAE,CAAC;oBACV,OAAO;wBACL,QAAQ,EAAE,IAAI;wBACd,OAAO,EAAE,EAAE;wBACX,WAAW,EAAE,mCAAmC;qBACjD,CAAC;gBACJ,CAAC;gBACD,MAAM,OAAO,GAAgB;oBAC3B,GAAG,EAAE,qCAA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