@huggingface/inference 3.6.0 → 3.6.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (92) hide show
  1. package/dist/index.cjs +240 -71
  2. package/dist/index.js +240 -60
  3. package/dist/src/lib/makeRequestOptions.d.ts.map +1 -1
  4. package/dist/src/providers/black-forest-labs.d.ts.map +1 -1
  5. package/dist/src/providers/cerebras.d.ts.map +1 -1
  6. package/dist/src/providers/cohere.d.ts.map +1 -1
  7. package/dist/src/providers/fal-ai.d.ts +6 -16
  8. package/dist/src/providers/fal-ai.d.ts.map +1 -1
  9. package/dist/src/providers/fireworks-ai.d.ts.map +1 -1
  10. package/dist/src/providers/hf-inference.d.ts.map +1 -1
  11. package/dist/src/providers/hyperbolic.d.ts.map +1 -1
  12. package/dist/src/providers/nebius.d.ts.map +1 -1
  13. package/dist/src/providers/novita.d.ts.map +1 -1
  14. package/dist/src/providers/openai.d.ts.map +1 -1
  15. package/dist/src/providers/replicate.d.ts.map +1 -1
  16. package/dist/src/providers/sambanova.d.ts.map +1 -1
  17. package/dist/src/providers/together.d.ts.map +1 -1
  18. package/dist/src/snippets/getInferenceSnippets.d.ts.map +1 -1
  19. package/dist/src/snippets/templates.exported.d.ts +2 -0
  20. package/dist/src/snippets/templates.exported.d.ts.map +1 -0
  21. package/dist/src/tasks/cv/textToVideo.d.ts.map +1 -1
  22. package/dist/src/types.d.ts +4 -2
  23. package/dist/src/types.d.ts.map +1 -1
  24. package/dist/test/InferenceClient.spec.d.ts.map +1 -1
  25. package/package.json +10 -15
  26. package/src/lib/makeRequestOptions.ts +3 -1
  27. package/src/providers/black-forest-labs.ts +6 -2
  28. package/src/providers/cerebras.ts +6 -2
  29. package/src/providers/cohere.ts +6 -2
  30. package/src/providers/fal-ai.ts +85 -3
  31. package/src/providers/fireworks-ai.ts +6 -2
  32. package/src/providers/hf-inference.ts +6 -2
  33. package/src/providers/hyperbolic.ts +6 -2
  34. package/src/providers/nebius.ts +6 -2
  35. package/src/providers/novita.ts +5 -2
  36. package/src/providers/openai.ts +6 -2
  37. package/src/providers/replicate.ts +6 -2
  38. package/src/providers/sambanova.ts +6 -2
  39. package/src/providers/together.ts +6 -2
  40. package/src/snippets/getInferenceSnippets.ts +6 -24
  41. package/src/snippets/templates.exported.ts +72 -0
  42. package/src/tasks/cv/textToVideo.ts +5 -21
  43. package/src/types.ts +5 -2
  44. package/dist/browser/index.cjs +0 -1652
  45. package/dist/browser/index.js +0 -1652
  46. package/src/snippets/templates/js/fetch/basic.jinja +0 -19
  47. package/src/snippets/templates/js/fetch/basicAudio.jinja +0 -19
  48. package/src/snippets/templates/js/fetch/basicImage.jinja +0 -19
  49. package/src/snippets/templates/js/fetch/textToAudio.jinja +0 -41
  50. package/src/snippets/templates/js/fetch/textToImage.jinja +0 -19
  51. package/src/snippets/templates/js/fetch/zeroShotClassification.jinja +0 -22
  52. package/src/snippets/templates/js/huggingface.js/basic.jinja +0 -11
  53. package/src/snippets/templates/js/huggingface.js/basicAudio.jinja +0 -13
  54. package/src/snippets/templates/js/huggingface.js/basicImage.jinja +0 -13
  55. package/src/snippets/templates/js/huggingface.js/conversational.jinja +0 -11
  56. package/src/snippets/templates/js/huggingface.js/conversationalStream.jinja +0 -19
  57. package/src/snippets/templates/js/huggingface.js/textToImage.jinja +0 -11
  58. package/src/snippets/templates/js/huggingface.js/textToVideo.jinja +0 -10
  59. package/src/snippets/templates/js/openai/conversational.jinja +0 -13
  60. package/src/snippets/templates/js/openai/conversationalStream.jinja +0 -22
  61. package/src/snippets/templates/python/fal_client/textToImage.jinja +0 -11
  62. package/src/snippets/templates/python/huggingface_hub/basic.jinja +0 -4
  63. package/src/snippets/templates/python/huggingface_hub/basicAudio.jinja +0 -1
  64. package/src/snippets/templates/python/huggingface_hub/basicImage.jinja +0 -1
  65. package/src/snippets/templates/python/huggingface_hub/conversational.jinja +0 -6
  66. package/src/snippets/templates/python/huggingface_hub/conversationalStream.jinja +0 -8
  67. package/src/snippets/templates/python/huggingface_hub/documentQuestionAnswering.jinja +0 -5
  68. package/src/snippets/templates/python/huggingface_hub/imageToImage.jinja +0 -6
  69. package/src/snippets/templates/python/huggingface_hub/importInferenceClient.jinja +0 -6
  70. package/src/snippets/templates/python/huggingface_hub/textToImage.jinja +0 -5
  71. package/src/snippets/templates/python/huggingface_hub/textToVideo.jinja +0 -4
  72. package/src/snippets/templates/python/openai/conversational.jinja +0 -13
  73. package/src/snippets/templates/python/openai/conversationalStream.jinja +0 -15
  74. package/src/snippets/templates/python/requests/basic.jinja +0 -7
  75. package/src/snippets/templates/python/requests/basicAudio.jinja +0 -7
  76. package/src/snippets/templates/python/requests/basicImage.jinja +0 -7
  77. package/src/snippets/templates/python/requests/conversational.jinja +0 -9
  78. package/src/snippets/templates/python/requests/conversationalStream.jinja +0 -16
  79. package/src/snippets/templates/python/requests/documentQuestionAnswering.jinja +0 -13
  80. package/src/snippets/templates/python/requests/imageToImage.jinja +0 -15
  81. package/src/snippets/templates/python/requests/importRequests.jinja +0 -10
  82. package/src/snippets/templates/python/requests/tabular.jinja +0 -9
  83. package/src/snippets/templates/python/requests/textToAudio.jinja +0 -23
  84. package/src/snippets/templates/python/requests/textToImage.jinja +0 -14
  85. package/src/snippets/templates/python/requests/zeroShotClassification.jinja +0 -8
  86. package/src/snippets/templates/python/requests/zeroShotImageClassification.jinja +0 -14
  87. package/src/snippets/templates/sh/curl/basic.jinja +0 -7
  88. package/src/snippets/templates/sh/curl/basicAudio.jinja +0 -5
  89. package/src/snippets/templates/sh/curl/basicImage.jinja +0 -5
  90. package/src/snippets/templates/sh/curl/conversational.jinja +0 -7
  91. package/src/snippets/templates/sh/curl/conversationalStream.jinja +0 -7
  92. package/src/snippets/templates/sh/curl/zeroShotClassification.jinja +0 -5
@@ -1,19 +0,0 @@
1
- async function query(data) {
2
- const response = await fetch(
3
- "{{ fullUrl }}",
4
- {
5
- headers: {
6
- Authorization: "{{ authorizationHeader }}",
7
- "Content-Type": "application/json",
8
- },
9
- method: "POST",
10
- body: JSON.stringify(data),
11
- }
12
- );
13
- const result = await response.json();
14
- return result;
15
- }
16
-
17
- query({ inputs: {{ providerInputs.asObj.inputs }} }).then((response) => {
18
- console.log(JSON.stringify(response));
19
- });
@@ -1,19 +0,0 @@
1
- async function query(data) {
2
- const response = await fetch(
3
- "{{ fullUrl }}",
4
- {
5
- headers: {
6
- Authorization: "{{ authorizationHeader }}",
7
- "Content-Type": "audio/flac"
8
- },
9
- method: "POST",
10
- body: JSON.stringify(data),
11
- }
12
- );
13
- const result = await response.json();
14
- return result;
15
- }
16
-
17
- query({ inputs: {{ providerInputs.asObj.inputs }} }).then((response) => {
18
- console.log(JSON.stringify(response));
19
- });
@@ -1,19 +0,0 @@
1
- async function query(data) {
2
- const response = await fetch(
3
- "{{ fullUrl }}",
4
- {
5
- headers: {
6
- Authorization: "{{ authorizationHeader }}",
7
- "Content-Type": "image/jpeg"
8
- },
9
- method: "POST",
10
- body: JSON.stringify(data),
11
- }
12
- );
13
- const result = await response.json();
14
- return result;
15
- }
16
-
17
- query({ inputs: {{ providerInputs.asObj.inputs }} }).then((response) => {
18
- console.log(JSON.stringify(response));
19
- });
@@ -1,41 +0,0 @@
1
- {% if model.library_name == "transformers" %}
2
- async function query(data) {
3
- const response = await fetch(
4
- "{{ fullUrl }}",
5
- {
6
- headers: {
7
- Authorization: "{{ authorizationHeader }}",
8
- "Content-Type": "application/json",
9
- },
10
- method: "POST",
11
- body: JSON.stringify(data),
12
- }
13
- );
14
- const result = await response.blob();
15
- return result;
16
- }
17
-
18
- query({ inputs: {{ providerInputs.asObj.inputs }} }).then((response) => {
19
- // Returns a byte object of the Audio wavform. Use it directly!
20
- });
21
- {% else %}
22
- async function query(data) {
23
- const response = await fetch(
24
- "{{ fullUrl }}",
25
- {
26
- headers: {
27
- Authorization: "{{ authorizationHeader }}",
28
- "Content-Type": "application/json",
29
- },
30
- method: "POST",
31
- body: JSON.stringify(data),
32
- }
33
- );
34
- const result = await response.json();
35
- return result;
36
- }
37
-
38
- query({ inputs: {{ providerInputs.asObj.inputs }} }).then((response) => {
39
- console.log(JSON.stringify(response));
40
- });
41
- {% endif %}
@@ -1,19 +0,0 @@
1
- async function query(data) {
2
- const response = await fetch(
3
- "{{ fullUrl }}",
4
- {
5
- headers: {
6
- Authorization: "{{ authorizationHeader }}",
7
- "Content-Type": "application/json",
8
- },
9
- method: "POST",
10
- body: JSON.stringify(data),
11
- }
12
- );
13
- const result = await response.blob();
14
- return result;
15
- }
16
-
17
- query({ inputs: {{ providerInputs.asObj.inputs }} }).then((response) => {
18
- // Use image
19
- });
@@ -1,22 +0,0 @@
1
- async function query(data) {
2
- const response = await fetch(
3
- "{{ fullUrl }}",
4
- {
5
- headers: {
6
- Authorization: "{{ authorizationHeader }}",
7
- "Content-Type": "application/json",
8
- },
9
- method: "POST",
10
- body: JSON.stringify(data),
11
- }
12
- );
13
- const result = await response.json();
14
- return result;
15
- }
16
-
17
- query({
18
- inputs: {{ providerInputs.asObj.inputs }},
19
- parameters: { candidate_labels: ["refund", "legal", "faq"] }
20
- }).then((response) => {
21
- console.log(JSON.stringify(response));
22
- });
@@ -1,11 +0,0 @@
1
- import { InferenceClient } from "@huggingface/inference";
2
-
3
- const client = new InferenceClient("{{ accessToken }}");
4
-
5
- const output = await client.{{ methodName }}({
6
- model: "{{ model.id }}",
7
- inputs: {{ inputs.asObj.inputs }},
8
- provider: "{{ provider }}",
9
- });
10
-
11
- console.log(output);
@@ -1,13 +0,0 @@
1
- import { InferenceClient } from "@huggingface/inference";
2
-
3
- const client = new InferenceClient("{{ accessToken }}");
4
-
5
- const data = fs.readFileSync({{inputs.asObj.inputs}});
6
-
7
- const output = await client.{{ methodName }}({
8
- data,
9
- model: "{{ model.id }}",
10
- provider: "{{ provider }}",
11
- });
12
-
13
- console.log(output);
@@ -1,13 +0,0 @@
1
- import { InferenceClient } from "@huggingface/inference";
2
-
3
- const client = new InferenceClient("{{ accessToken }}");
4
-
5
- const data = fs.readFileSync({{inputs.asObj.inputs}});
6
-
7
- const output = await client.{{ methodName }}({
8
- data,
9
- model: "{{ model.id }}",
10
- provider: "{{ provider }}",
11
- });
12
-
13
- console.log(output);
@@ -1,11 +0,0 @@
1
- import { InferenceClient } from "@huggingface/inference";
2
-
3
- const client = new InferenceClient("{{ accessToken }}");
4
-
5
- const chatCompletion = await client.chatCompletion({
6
- provider: "{{ provider }}",
7
- model: "{{ model.id }}",
8
- {{ inputs.asTsString }}
9
- });
10
-
11
- console.log(chatCompletion.choices[0].message);
@@ -1,19 +0,0 @@
1
- import { InferenceClient } from "@huggingface/inference";
2
-
3
- const client = new InferenceClient("{{ accessToken }}");
4
-
5
- let out = "";
6
-
7
- const stream = await client.chatCompletionStream({
8
- provider: "{{ provider }}",
9
- model: "{{ model.id }}",
10
- {{ inputs.asTsString }}
11
- });
12
-
13
- for await (const chunk of stream) {
14
- if (chunk.choices && chunk.choices.length > 0) {
15
- const newContent = chunk.choices[0].delta.content;
16
- out += newContent;
17
- console.log(newContent);
18
- }
19
- }
@@ -1,11 +0,0 @@
1
- import { InferenceClient } from "@huggingface/inference";
2
-
3
- const client = new InferenceClient("{{ accessToken }}");
4
-
5
- const image = await client.textToImage({
6
- provider: "{{ provider }}",
7
- model: "{{ model.id }}",
8
- inputs: {{ inputs.asObj.inputs }},
9
- parameters: { num_inference_steps: 5 },
10
- });
11
- /// Use the generated image (it's a Blob)
@@ -1,10 +0,0 @@
1
- import { InferenceClient } from "@huggingface/inference";
2
-
3
- const client = new InferenceClient("{{ accessToken }}");
4
-
5
- const image = await client.textToVideo({
6
- provider: "{{ provider }}",
7
- model: "{{ model.id }}",
8
- inputs: {{ inputs.asObj.inputs }},
9
- });
10
- // Use the generated video (it's a Blob)
@@ -1,13 +0,0 @@
1
- import { OpenAI } from "openai";
2
-
3
- const client = new OpenAI({
4
- baseURL: "{{ baseUrl }}",
5
- apiKey: "{{ accessToken }}",
6
- });
7
-
8
- const chatCompletion = await client.chat.completions.create({
9
- model: "{{ providerModelId }}",
10
- {{ inputs.asTsString }}
11
- });
12
-
13
- console.log(chatCompletion.choices[0].message);
@@ -1,22 +0,0 @@
1
- import { OpenAI } from "openai";
2
-
3
- const client = new OpenAI({
4
- baseURL: "{{ baseUrl }}",
5
- apiKey: "{{ accessToken }}",
6
- });
7
-
8
- let out = "";
9
-
10
- const stream = await client.chat.completions.create({
11
- provider: "{{ provider }}",
12
- model: "{{ model.id }}",
13
- {{ inputs.asTsString }}
14
- });
15
-
16
- for await (const chunk of stream) {
17
- if (chunk.choices && chunk.choices.length > 0) {
18
- const newContent = chunk.choices[0].delta.content;
19
- out += newContent;
20
- console.log(newContent);
21
- }
22
- }
@@ -1,11 +0,0 @@
1
- {% if provider == "fal-ai" %}
2
- import fal_client
3
-
4
- result = fal_client.subscribe(
5
- "{{ providerModelId }}",
6
- arguments={
7
- "prompt": {{ inputs.asObj.inputs }},
8
- },
9
- )
10
- print(result)
11
- {% endif %}
@@ -1,4 +0,0 @@
1
- result = client.{{ methodName }}(
2
- inputs={{ inputs.asObj.inputs }},
3
- model="{{ model.id }}",
4
- )
@@ -1 +0,0 @@
1
- output = client.{{ methodName }}({{ inputs.asObj.inputs }}, model="{{ model.id }}")
@@ -1 +0,0 @@
1
- output = client.{{ methodName }}({{ inputs.asObj.inputs }}, model="{{ model.id }}")
@@ -1,6 +0,0 @@
1
- completion = client.chat.completions.create(
2
- model="{{ model.id }}",
3
- {{ inputs.asPythonString }}
4
- )
5
-
6
- print(completion.choices[0].message)
@@ -1,8 +0,0 @@
1
- stream = client.chat.completions.create(
2
- model="{{ model.id }}",
3
- {{ inputs.asPythonString }}
4
- stream=True,
5
- )
6
-
7
- for chunk in stream:
8
- print(chunk.choices[0].delta.content, end="")
@@ -1,5 +0,0 @@
1
- output = client.document_question_answering(
2
- "{{ inputs.asObj.image }}",
3
- question="{{ inputs.asObj.question }}",
4
- model="{{ model.id }}",
5
- )
@@ -1,6 +0,0 @@
1
- # output is a PIL.Image object
2
- image = client.image_to_image(
3
- "{{ inputs.asObj.inputs }}",
4
- prompt="{{ inputs.asObj.parameters.prompt }}",
5
- model="{{ model.id }}",
6
- )
@@ -1,6 +0,0 @@
1
- from huggingface_hub import InferenceClient
2
-
3
- client = InferenceClient(
4
- provider="{{ provider }}",
5
- api_key="{{ accessToken }}",
6
- )
@@ -1,5 +0,0 @@
1
- # output is a PIL.Image object
2
- image = client.text_to_image(
3
- {{ inputs.asObj.inputs }},
4
- model="{{ model.id }}",
5
- )
@@ -1,4 +0,0 @@
1
- video = client.text_to_video(
2
- {{ inputs.asObj.inputs }},
3
- model="{{ model.id }}",
4
- )
@@ -1,13 +0,0 @@
1
- from openai import OpenAI
2
-
3
- client = OpenAI(
4
- base_url="{{ baseUrl }}",
5
- api_key="{{ accessToken }}"
6
- )
7
-
8
- completion = client.chat.completions.create(
9
- model="{{ providerModelId }}",
10
- {{ inputs.asPythonString }}
11
- )
12
-
13
- print(completion.choices[0].message)
@@ -1,15 +0,0 @@
1
- from openai import OpenAI
2
-
3
- client = OpenAI(
4
- base_url="{{ baseUrl }}",
5
- api_key="{{ accessToken }}"
6
- )
7
-
8
- stream = client.chat.completions.create(
9
- model="{{ providerModelId }}",
10
- {{ inputs.asPythonString }}
11
- stream=True,
12
- )
13
-
14
- for chunk in stream:
15
- print(chunk.choices[0].delta.content, end="")
@@ -1,7 +0,0 @@
1
- def query(payload):
2
- response = requests.post(API_URL, headers=headers, json=payload)
3
- return response.json()
4
-
5
- output = query({
6
- "inputs": {{ providerInputs.asObj.inputs }},
7
- })
@@ -1,7 +0,0 @@
1
- def query(filename):
2
- with open(filename, "rb") as f:
3
- data = f.read()
4
- response = requests.post(API_URL, headers={"Content-Type": "audio/flac", **headers}, data=data)
5
- return response.json()
6
-
7
- output = query({{ providerInputs.asObj.inputs }})
@@ -1,7 +0,0 @@
1
- def query(filename):
2
- with open(filename, "rb") as f:
3
- data = f.read()
4
- response = requests.post(API_URL, headers={"Content-Type": "image/jpeg", **headers}, data=data)
5
- return response.json()
6
-
7
- output = query({{ providerInputs.asObj.inputs }})
@@ -1,9 +0,0 @@
1
- def query(payload):
2
- response = requests.post(API_URL, headers=headers, json=payload)
3
- return response.json()
4
-
5
- response = query({
6
- {{ providerInputs.asJsonString }}
7
- })
8
-
9
- print(response["choices"][0]["message"])
@@ -1,16 +0,0 @@
1
- def query(payload):
2
- response = requests.post(API_URL, headers=headers, json=payload, stream=True)
3
- for line in response.iter_lines():
4
- if not line.startswith(b"data:"):
5
- continue
6
- if line.strip() == b"data: [DONE]":
7
- return
8
- yield json.loads(line.decode("utf-8").lstrip("data:").rstrip("/n"))
9
-
10
- chunks = query({
11
- {{ providerInputs.asJsonString }},
12
- "stream": True,
13
- })
14
-
15
- for chunk in chunks:
16
- print(chunk["choices"][0]["delta"]["content"], end="")
@@ -1,13 +0,0 @@
1
- def query(payload):
2
- with open(payload["image"], "rb") as f:
3
- img = f.read()
4
- payload["image"] = base64.b64encode(img).decode("utf-8")
5
- response = requests.post(API_URL, headers=headers, json=payload)
6
- return response.json()
7
-
8
- output = query({
9
- "inputs": {
10
- "image": "{{ inputs.asObj.image }}",
11
- "question": "{{ inputs.asObj.question }}",
12
- },
13
- })
@@ -1,15 +0,0 @@
1
- def query(payload):
2
- with open(payload["inputs"], "rb") as f:
3
- img = f.read()
4
- payload["inputs"] = base64.b64encode(img).decode("utf-8")
5
- response = requests.post(API_URL, headers=headers, json=payload)
6
- return response.content
7
-
8
- image_bytes = query({
9
- {{ providerInputs.asJsonString }}
10
- })
11
-
12
- # You can access the image with PIL.Image for example
13
- import io
14
- from PIL import Image
15
- image = Image.open(io.BytesIO(image_bytes))
@@ -1,10 +0,0 @@
1
- {% if importBase64 %}
2
- import base64
3
- {% endif %}
4
- {% if importJson %}
5
- import json
6
- {% endif %}
7
- import requests
8
-
9
- API_URL = "{{ fullUrl }}"
10
- headers = {"Authorization": "{{ authorizationHeader }}"}
@@ -1,9 +0,0 @@
1
- def query(payload):
2
- response = requests.post(API_URL, headers=headers, json=payload)
3
- return response.content
4
-
5
- response = query({
6
- "inputs": {
7
- "data": {{ providerInputs.asObj.inputs }}
8
- },
9
- })
@@ -1,23 +0,0 @@
1
- {% if model.library_name == "transformers" %}
2
- def query(payload):
3
- response = requests.post(API_URL, headers=headers, json=payload)
4
- return response.content
5
-
6
- audio_bytes = query({
7
- "inputs": {{ providerInputs.asObj.inputs }},
8
- })
9
- # You can access the audio with IPython.display for example
10
- from IPython.display import Audio
11
- Audio(audio_bytes)
12
- {% else %}
13
- def query(payload):
14
- response = requests.post(API_URL, headers=headers, json=payload)
15
- return response.json()
16
-
17
- audio, sampling_rate = query({
18
- "inputs": {{ providerInputs.asObj.inputs }},
19
- })
20
- # You can access the audio with IPython.display for example
21
- from IPython.display import Audio
22
- Audio(audio, rate=sampling_rate)
23
- {% endif %}
@@ -1,14 +0,0 @@
1
- {% if provider == "hf-inference" %}
2
- def query(payload):
3
- response = requests.post(API_URL, headers=headers, json=payload)
4
- return response.content
5
-
6
- image_bytes = query({
7
- "inputs": {{ providerInputs.asObj.inputs }},
8
- })
9
-
10
- # You can access the image with PIL.Image for example
11
- import io
12
- from PIL import Image
13
- image = Image.open(io.BytesIO(image_bytes))
14
- {% endif %}
@@ -1,8 +0,0 @@
1
- def query(payload):
2
- response = requests.post(API_URL, headers=headers, json=payload)
3
- return response.json()
4
-
5
- output = query({
6
- "inputs": {{ providerInputs.asObj.inputs }},
7
- "parameters": {"candidate_labels": ["refund", "legal", "faq"]},
8
- })
@@ -1,14 +0,0 @@
1
- def query(data):
2
- with open(data["image_path"], "rb") as f:
3
- img = f.read()
4
- payload={
5
- "parameters": data["parameters"],
6
- "inputs": base64.b64encode(img).decode("utf-8")
7
- }
8
- response = requests.post(API_URL, headers=headers, json=payload)
9
- return response.json()
10
-
11
- output = query({
12
- "image_path": {{ providerInputs.asObj.inputs }},
13
- "parameters": {"candidate_labels": ["cat", "dog", "llama"]},
14
- })
@@ -1,7 +0,0 @@
1
- curl {{ fullUrl }} \
2
- -X POST \
3
- -H 'Authorization: {{ authorizationHeader }}' \
4
- -H 'Content-Type: application/json' \
5
- -d '{
6
- {{ providerInputs.asCurlString }}
7
- }'
@@ -1,5 +0,0 @@
1
- curl {{ fullUrl }} \
2
- -X POST \
3
- -H 'Authorization: {{ authorizationHeader }}' \
4
- -H 'Content-Type: audio/flac' \
5
- --data-binary @{{ providerInputs.asObj.inputs }}
@@ -1,5 +0,0 @@
1
- curl {{ fullUrl }} \
2
- -X POST \
3
- -H 'Authorization: {{ authorizationHeader }}' \
4
- -H 'Content-Type: image/jpeg' \
5
- --data-binary @{{ providerInputs.asObj.inputs }}
@@ -1,7 +0,0 @@
1
- curl {{ fullUrl }} \
2
- -H 'Authorization: {{ authorizationHeader }}' \
3
- -H 'Content-Type: application/json' \
4
- -d '{
5
- {{ providerInputs.asCurlString }},
6
- "stream": false
7
- }'
@@ -1,7 +0,0 @@
1
- curl {{ fullUrl }} \
2
- -H 'Authorization: {{ authorizationHeader }}' \
3
- -H 'Content-Type: application/json' \
4
- -d '{
5
- {{ providerInputs.asCurlString }},
6
- "stream": true
7
- }'
@@ -1,5 +0,0 @@
1
- curl {{ fullUrl }} \
2
- -X POST \
3
- -d '{"inputs": {{ providerInputs.asObj.inputs }}, "parameters": {"candidate_labels": ["refund", "legal", "faq"]}}' \
4
- -H 'Content-Type: application/json' \
5
- -H 'Authorization: {{ authorizationHeader }}'