Skip to content

Commit 498b2bd

Browse files
authored
Merge pull request #106 from caozhuozi/clarify-embedding
config: remove the embedding boolean
2 parents dfd43e5 + d39bb7c commit 498b2bd

File tree

2 files changed

+31
-15
lines changed

2 files changed

+31
-15
lines changed

docs/config.md

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -149,11 +149,13 @@ The following terms are used in this section:
149149

150150
- **inputTypes** _array of string_, OPTIONAL
151151

152-
Input types that the model supports, such as "text", "image", "audio", "video", etc.
152+
An array of strings specifying the data types that the model can accept as input.
153+
The allowed values are: "text", "image", "audio", "video", or "embedding". For input types that are not explicitly defined, the value "other" value should be used.
153154

154155
- **outputTypes** _array of string_, OPTIONAL
155156

156-
Output types that the model supports, such as "text", "image", "audio", "video", etc.
157+
An array of strings specifying the data types that the model can produce as output.
158+
The allowed values are: "text", "image", "audio", "video", or "embedding". For output types that are not explicitly defined, the value "other" value should be used.
157159

158160
- **knowledgeCutoff** _string_, OPTIONAL
159161

@@ -167,10 +169,6 @@ The following terms are used in this section:
167169

168170
Whether the model can use external tools or APIs to perform tasks.
169171

170-
- **embedding** _boolean_, OPTIONAL
171-
172-
Whether the model can perform embedding tasks.
173-
174172
- **reward** _boolean_, OPTIONAL
175173

176174
Whether the model is a reward model.
@@ -220,7 +218,6 @@ Here is an example model artifact configuration JSON document:
220218
"knowledgeCutoff": "2024-05-21T00:00:00Z",
221219
"reasoning": true,
222220
"toolUsage": false,
223-
"embedding": false,
224221
"reward": false,
225222
"languages": ["en", "zh"]
226223
}

specs-go/v1/config.go

Lines changed: 27 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -98,12 +98,34 @@ type ModelDescriptor struct {
9898
type Modality string
9999

100100
const (
101-
TextModality Modality = "text"
102-
ImageModality Modality = "image"
103-
AudioModality Modality = "audio"
104-
VideoModality Modality = "video"
101+
// TextModality indicates that the model can process or generate text.
102+
// If present in InputTypes, the model accepts text as input.
103+
// If present in OutputTypes, the model produces text as output.
104+
TextModality Modality = "text"
105+
106+
// ImageModality indicates that the model can process or generate images.
107+
// If present in InputTypes, the model accepts images as input.
108+
// If present in OutputTypes, the model produces images as output.
109+
ImageModality Modality = "image"
110+
111+
// AudioModality indicates that the model can process or generate audio.
112+
// If present in InputTypes, the model accepts audio as input.
113+
// If present in OutputTypes, the model produces audio as output.
114+
AudioModality Modality = "audio"
115+
116+
// VideoModality indicates that the model can process or generate video.
117+
// If present in InputTypes, the model accepts video as input.
118+
// If present in OutputTypes, the model produces video as output.
119+
VideoModality Modality = "video"
120+
121+
// EmbeddingModality indicates that the model can process or generate embeddings.
122+
// If present in InputTypes, the model accepts embeddings as input.
123+
// If present in OutputTypes, the model produces embeddings as output.
124+
// For a dedicated "embedding model", EmbeddingModality should be present in its OutputTypes.
105125
EmbeddingModality Modality = "embedding"
106-
OtherModality Modality = "other"
126+
127+
// OtherModality indicates that the model supports a modality not explicitly listed.
128+
OtherModality Modality = "other"
107129
)
108130

109131
// ModelCapabilities defines the special capabilities that the model supports
@@ -124,9 +146,6 @@ type ModelCapabilities struct {
124146
// such as a calculator, a search engine, etc.
125147
ToolUsage *bool `json:"toolUsage,omitempty"`
126148

127-
// Embedding indicates whether the model can perform embedding tasks
128-
Embedding *bool `json:"embedding,omitempty"`
129-
130149
// Reward indicates whether the model is a reward model
131150
Reward *bool `json:"reward,omitempty"`
132151

0 commit comments

Comments
 (0)