Skip to content

Commit e2ec09f

Browse files
hturanharshil1712
authored andcommitted
AI Schema Formatting & Updates (#18037)
* Update formatting of schemas, remove image field from text-gen, remove lang from whisper * Add more schemas
1 parent 58904d4 commit e2ec09f

File tree

59 files changed

+16814
-96
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

59 files changed

+16814
-96
lines changed

bin/fetch-ai-models.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ fetch("https://ai.cloudflare.com/api/models")
77
const fileName = model.name.split("/")[2];
88
fs.writeFileSync(
99
`./src/content/workers-ai-models/${fileName}.json`,
10-
JSON.stringify(model),
10+
JSON.stringify(model, null, 4),
1111
"utf-8",
1212
);
1313
});
Lines changed: 48 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,48 @@
1-
{"id":"19bd38eb-bcda-4e53-bec2-704b4689b43a","source":1,"name":"@cf/facebook/bart-large-cnn","description":"BART is a transformer encoder-encoder (seq2seq) model with a bidirectional (BERT-like) encoder and an autoregressive (GPT-like) decoder. You can use this model for text summarization.","task":{"id":"6f4e65d8-da0f-40d2-9aa4-db582a5a04fd","name":"Summarization","description":"Summarization is the task of producing a shorter version of a document while preserving its important information. Some models can extract text from the original input, while other models can generate entirely new text."},"tags":[],"properties":[{"property_id":"beta","value":"true"}],"schema":{"input":{"type":"object","properties":{"input_text":{"type":"string","minLength":1,"description":"The text that you want the model to summarize"},"max_length":{"type":"integer","default":1024,"description":"The maximum length of the generated summary in tokens"}},"required":["input_text"]},"output":{"type":"object","contentType":"application/json","properties":{"summary":{"type":"string","description":"The summarized version of the input text"}}}}}
1+
{
2+
"id": "19bd38eb-bcda-4e53-bec2-704b4689b43a",
3+
"source": 1,
4+
"name": "@cf/facebook/bart-large-cnn",
5+
"description": "BART is a transformer encoder-encoder (seq2seq) model with a bidirectional (BERT-like) encoder and an autoregressive (GPT-like) decoder. You can use this model for text summarization.",
6+
"task": {
7+
"id": "6f4e65d8-da0f-40d2-9aa4-db582a5a04fd",
8+
"name": "Summarization",
9+
"description": "Summarization is the task of producing a shorter version of a document while preserving its important information. Some models can extract text from the original input, while other models can generate entirely new text."
10+
},
11+
"tags": [],
12+
"properties": [
13+
{
14+
"property_id": "beta",
15+
"value": "true"
16+
}
17+
],
18+
"schema": {
19+
"input": {
20+
"type": "object",
21+
"properties": {
22+
"input_text": {
23+
"type": "string",
24+
"minLength": 1,
25+
"description": "The text that you want the model to summarize"
26+
},
27+
"max_length": {
28+
"type": "integer",
29+
"default": 1024,
30+
"description": "The maximum length of the generated summary in tokens"
31+
}
32+
},
33+
"required": [
34+
"input_text"
35+
]
36+
},
37+
"output": {
38+
"type": "object",
39+
"contentType": "application/json",
40+
"properties": {
41+
"summary": {
42+
"type": "string",
43+
"description": "The summarized version of the input text"
44+
}
45+
}
46+
}
47+
}
48+
}
Lines changed: 82 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,82 @@
1-
{"id":"429b9e8b-d99e-44de-91ad-706cf8183658","source":1,"name":"@cf/baai/bge-base-en-v1.5","description":"BAAI general embedding (bge) models transform any given text into a compact vector","task":{"id":"0137cdcf-162a-4108-94f2-1ca59e8c65ee","name":"Text Embeddings","description":"Feature extraction models transform raw data into numerical features that can be processed while preserving the information in the original dataset. These models are ideal as part of building vector search applications or Retrieval Augmented Generation workflows with Large Language Models (LLM)."},"tags":[],"properties":[{"property_id":"beta","value":"false"},{"property_id":"info","value":"https://huggingface.co/BAAI/bge-base-en-v1.5"},{"property_id":"max_input_tokens","value":"512"},{"property_id":"output_dimensions","value":"768"}],"schema":{"input":{"type":"object","properties":{"text":{"oneOf":[{"type":"string","description":"The text to embed","minLength":1},{"type":"array","description":"Batch of text values to embed","items":{"type":"string","description":"The text to embed","minLength":1},"maxItems":100}]}},"required":["text"]},"output":{"type":"object","contentType":"application/json","properties":{"shape":{"type":"array","items":{"type":"number"}},"data":{"type":"array","description":"Embeddings of the requested text values","items":{"type":"array","description":"Floating point embedding representation shaped by the embedding model","items":{"type":"number"}}}}}}}
1+
{
2+
"id": "429b9e8b-d99e-44de-91ad-706cf8183658",
3+
"source": 1,
4+
"name": "@cf/baai/bge-base-en-v1.5",
5+
"description": "BAAI general embedding (bge) models transform any given text into a compact vector",
6+
"task": {
7+
"id": "0137cdcf-162a-4108-94f2-1ca59e8c65ee",
8+
"name": "Text Embeddings",
9+
"description": "Feature extraction models transform raw data into numerical features that can be processed while preserving the information in the original dataset. These models are ideal as part of building vector search applications or Retrieval Augmented Generation workflows with Large Language Models (LLM)."
10+
},
11+
"tags": [],
12+
"properties": [
13+
{
14+
"property_id": "beta",
15+
"value": "false"
16+
},
17+
{
18+
"property_id": "info",
19+
"value": "https://huggingface.co/BAAI/bge-base-en-v1.5"
20+
},
21+
{
22+
"property_id": "max_input_tokens",
23+
"value": "512"
24+
},
25+
{
26+
"property_id": "output_dimensions",
27+
"value": "768"
28+
}
29+
],
30+
"schema": {
31+
"input": {
32+
"type": "object",
33+
"properties": {
34+
"text": {
35+
"oneOf": [
36+
{
37+
"type": "string",
38+
"description": "The text to embed",
39+
"minLength": 1
40+
},
41+
{
42+
"type": "array",
43+
"description": "Batch of text values to embed",
44+
"items": {
45+
"type": "string",
46+
"description": "The text to embed",
47+
"minLength": 1
48+
},
49+
"maxItems": 100
50+
}
51+
]
52+
}
53+
},
54+
"required": [
55+
"text"
56+
]
57+
},
58+
"output": {
59+
"type": "object",
60+
"contentType": "application/json",
61+
"properties": {
62+
"shape": {
63+
"type": "array",
64+
"items": {
65+
"type": "number"
66+
}
67+
},
68+
"data": {
69+
"type": "array",
70+
"description": "Embeddings of the requested text values",
71+
"items": {
72+
"type": "array",
73+
"description": "Floating point embedding representation shaped by the embedding model",
74+
"items": {
75+
"type": "number"
76+
}
77+
}
78+
}
79+
}
80+
}
81+
}
82+
}
Lines changed: 82 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,82 @@
1-
{"id":"01bc2fb0-4bca-4598-b985-d2584a3f46c0","source":1,"name":"@cf/baai/bge-large-en-v1.5","description":"BAAI general embedding (bge) models transform any given text into a compact vector","task":{"id":"0137cdcf-162a-4108-94f2-1ca59e8c65ee","name":"Text Embeddings","description":"Feature extraction models transform raw data into numerical features that can be processed while preserving the information in the original dataset. These models are ideal as part of building vector search applications or Retrieval Augmented Generation workflows with Large Language Models (LLM)."},"tags":[],"properties":[{"property_id":"beta","value":"false"},{"property_id":"info","value":"https://huggingface.co/BAAI/bge-base-en-v1.5"},{"property_id":"max_input_tokens","value":"512"},{"property_id":"output_dimensions","value":"1024"}],"schema":{"input":{"type":"object","properties":{"text":{"oneOf":[{"type":"string","description":"The text to embed","minLength":1},{"type":"array","description":"Batch of text values to embed","items":{"type":"string","description":"The text to embed","minLength":1},"maxItems":100}]}},"required":["text"]},"output":{"type":"object","contentType":"application/json","properties":{"shape":{"type":"array","items":{"type":"number"}},"data":{"type":"array","description":"Embeddings of the requested text values","items":{"type":"array","description":"Floating point embedding representation shaped by the embedding model","items":{"type":"number"}}}}}}}
1+
{
2+
"id": "01bc2fb0-4bca-4598-b985-d2584a3f46c0",
3+
"source": 1,
4+
"name": "@cf/baai/bge-large-en-v1.5",
5+
"description": "BAAI general embedding (bge) models transform any given text into a compact vector",
6+
"task": {
7+
"id": "0137cdcf-162a-4108-94f2-1ca59e8c65ee",
8+
"name": "Text Embeddings",
9+
"description": "Feature extraction models transform raw data into numerical features that can be processed while preserving the information in the original dataset. These models are ideal as part of building vector search applications or Retrieval Augmented Generation workflows with Large Language Models (LLM)."
10+
},
11+
"tags": [],
12+
"properties": [
13+
{
14+
"property_id": "beta",
15+
"value": "false"
16+
},
17+
{
18+
"property_id": "info",
19+
"value": "https://huggingface.co/BAAI/bge-base-en-v1.5"
20+
},
21+
{
22+
"property_id": "max_input_tokens",
23+
"value": "512"
24+
},
25+
{
26+
"property_id": "output_dimensions",
27+
"value": "1024"
28+
}
29+
],
30+
"schema": {
31+
"input": {
32+
"type": "object",
33+
"properties": {
34+
"text": {
35+
"oneOf": [
36+
{
37+
"type": "string",
38+
"description": "The text to embed",
39+
"minLength": 1
40+
},
41+
{
42+
"type": "array",
43+
"description": "Batch of text values to embed",
44+
"items": {
45+
"type": "string",
46+
"description": "The text to embed",
47+
"minLength": 1
48+
},
49+
"maxItems": 100
50+
}
51+
]
52+
}
53+
},
54+
"required": [
55+
"text"
56+
]
57+
},
58+
"output": {
59+
"type": "object",
60+
"contentType": "application/json",
61+
"properties": {
62+
"shape": {
63+
"type": "array",
64+
"items": {
65+
"type": "number"
66+
}
67+
},
68+
"data": {
69+
"type": "array",
70+
"description": "Embeddings of the requested text values",
71+
"items": {
72+
"type": "array",
73+
"description": "Floating point embedding representation shaped by the embedding model",
74+
"items": {
75+
"type": "number"
76+
}
77+
}
78+
}
79+
}
80+
}
81+
}
82+
}
Lines changed: 82 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,82 @@
1-
{"id":"57fbd08a-a4c4-411c-910d-b9459ff36c20","source":1,"name":"@cf/baai/bge-small-en-v1.5","description":"BAAI general embedding (bge) models transform any given text into a compact vector","task":{"id":"0137cdcf-162a-4108-94f2-1ca59e8c65ee","name":"Text Embeddings","description":"Feature extraction models transform raw data into numerical features that can be processed while preserving the information in the original dataset. These models are ideal as part of building vector search applications or Retrieval Augmented Generation workflows with Large Language Models (LLM)."},"tags":[],"properties":[{"property_id":"beta","value":"false"},{"property_id":"info","value":"https://huggingface.co/BAAI/bge-base-en-v1.5"},{"property_id":"max_input_tokens","value":"512"},{"property_id":"output_dimensions","value":"384"}],"schema":{"input":{"type":"object","properties":{"text":{"oneOf":[{"type":"string","description":"The text to embed","minLength":1},{"type":"array","description":"Batch of text values to embed","items":{"type":"string","description":"The text to embed","minLength":1},"maxItems":100}]}},"required":["text"]},"output":{"type":"object","contentType":"application/json","properties":{"shape":{"type":"array","items":{"type":"number"}},"data":{"type":"array","description":"Embeddings of the requested text values","items":{"type":"array","description":"Floating point embedding representation shaped by the embedding model","items":{"type":"number"}}}}}}}
1+
{
2+
"id": "57fbd08a-a4c4-411c-910d-b9459ff36c20",
3+
"source": 1,
4+
"name": "@cf/baai/bge-small-en-v1.5",
5+
"description": "BAAI general embedding (bge) models transform any given text into a compact vector",
6+
"task": {
7+
"id": "0137cdcf-162a-4108-94f2-1ca59e8c65ee",
8+
"name": "Text Embeddings",
9+
"description": "Feature extraction models transform raw data into numerical features that can be processed while preserving the information in the original dataset. These models are ideal as part of building vector search applications or Retrieval Augmented Generation workflows with Large Language Models (LLM)."
10+
},
11+
"tags": [],
12+
"properties": [
13+
{
14+
"property_id": "beta",
15+
"value": "false"
16+
},
17+
{
18+
"property_id": "info",
19+
"value": "https://huggingface.co/BAAI/bge-base-en-v1.5"
20+
},
21+
{
22+
"property_id": "max_input_tokens",
23+
"value": "512"
24+
},
25+
{
26+
"property_id": "output_dimensions",
27+
"value": "384"
28+
}
29+
],
30+
"schema": {
31+
"input": {
32+
"type": "object",
33+
"properties": {
34+
"text": {
35+
"oneOf": [
36+
{
37+
"type": "string",
38+
"description": "The text to embed",
39+
"minLength": 1
40+
},
41+
{
42+
"type": "array",
43+
"description": "Batch of text values to embed",
44+
"items": {
45+
"type": "string",
46+
"description": "The text to embed",
47+
"minLength": 1
48+
},
49+
"maxItems": 100
50+
}
51+
]
52+
}
53+
},
54+
"required": [
55+
"text"
56+
]
57+
},
58+
"output": {
59+
"type": "object",
60+
"contentType": "application/json",
61+
"properties": {
62+
"shape": {
63+
"type": "array",
64+
"items": {
65+
"type": "number"
66+
}
67+
},
68+
"data": {
69+
"type": "array",
70+
"description": "Embeddings of the requested text values",
71+
"items": {
72+
"type": "array",
73+
"description": "Floating point embedding representation shaped by the embedding model",
74+
"items": {
75+
"type": "number"
76+
}
77+
}
78+
}
79+
}
80+
}
81+
}
82+
}

0 commit comments

Comments
 (0)