Skip to content

Commit 0553d63

Browse files
paulinebmgithub-actions[bot]
authored andcommitted
Update tasks specs (automated commit)
1 parent e26b3d3 commit 0553d63

File tree

4 files changed

+34
-14
lines changed

4 files changed

+34
-14
lines changed

packages/tasks/src/tasks/chat-completion/inference.ts

Lines changed: 17 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,10 @@ export interface ChatCompletionInput {
1818
* decreasing the model's likelihood to repeat the same line verbatim.
1919
*/
2020
frequency_penalty?: number;
21+
/**
22+
* A guideline to be used in the chat_template
23+
*/
24+
guideline?: string;
2125
/**
2226
* UNUSED
2327
* Modify the likelihood of specified tokens appearing in the completion. Accepts a JSON
@@ -154,10 +158,20 @@ export interface ChatCompletionInputStreamOptions {
154158
[property: string]: unknown;
155159
}
156160

157-
export type ChatCompletionInputTool = ChatCompletionInputToolType | string;
161+
/**
162+
* Controls which (if any) tool is called by the model.
163+
*/
164+
export type ChatCompletionInputTool = ChatCompletionInputToolChoiceEnum | ChatCompletionInputToolChoiceObject;
165+
166+
/**
167+
* Means the model can pick between generating a message or calling one or more tools.
168+
*
169+
* Means the model will not call any tool and instead generates a message.
170+
*/
171+
export type ChatCompletionInputToolChoiceEnum = "auto" | "none";
158172

159-
export interface ChatCompletionInputToolType {
160-
function?: ChatCompletionInputFunctionName;
173+
export interface ChatCompletionInputToolChoiceObject {
174+
function: ChatCompletionInputFunctionName;
161175
[property: string]: unknown;
162176
}
163177

packages/tasks/src/tasks/chat-completion/spec/input.json

Lines changed: 15 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,13 @@
1313
"example": "1.0",
1414
"nullable": true
1515
},
16+
"guideline": {
17+
"type": "string",
18+
"description": "A guideline to be used in the chat_template",
19+
"default": "null",
20+
"example": "null",
21+
"nullable": true
22+
},
1623
"logit_bias": {
1724
"type": "array",
1825
"items": {
@@ -283,12 +290,14 @@
283290
"ChatCompletionInputToolType": {
284291
"oneOf": [
285292
{
286-
"type": "object",
287-
"default": null,
288-
"nullable": true
293+
"type": "string",
294+
"description": "Means the model can pick between generating a message or calling one or more tools.",
295+
"enum": ["auto"]
289296
},
290297
{
291-
"type": "string"
298+
"type": "string",
299+
"description": "Means the model will not call any tool and instead generates a message.",
300+
"enum": ["none"]
292301
},
293302
{
294303
"type": "object",
@@ -298,13 +307,10 @@
298307
"$ref": "#/$defs/ChatCompletionInputFunctionName"
299308
}
300309
}
301-
},
302-
{
303-
"type": "object",
304-
"default": null,
305-
"nullable": true
306310
}
307311
],
312+
"description": "Controls which (if any) tool is called by the model.",
313+
"example": "auto",
308314
"title": "ChatCompletionInputToolType"
309315
},
310316
"ChatCompletionInputFunctionName": {

packages/tasks/src/tasks/feature-extraction/inference.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ export interface FeatureExtractionInput {
2323
* The name of the prompt that should be used by for encoding. If not set, no prompt
2424
* will be applied.
2525
*
26-
* Must be a key in the `Sentence Transformers` configuration `prompts` dictionary.
26+
* Must be a key in the `sentence-transformers` configuration `prompts` dictionary.
2727
*
2828
* For example if ``prompt_name`` is "query" and the ``prompts`` is {"query": "query: ",
2929
* ...},

packages/tasks/src/tasks/feature-extraction/spec/input.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
},
1818
"prompt_name": {
1919
"type": "string",
20-
"description": "The name of the prompt that should be used by for encoding. If not set, no prompt\nwill be applied.\n\nMust be a key in the `Sentence Transformers` configuration `prompts` dictionary.\n\nFor example if ``prompt_name`` is \"query\" and the ``prompts`` is {\"query\": \"query: \", ...},\nthen the sentence \"What is the capital of France?\" will be encoded as\n\"query: What is the capital of France?\" because the prompt text will be prepended before\nany text to encode.",
20+
"description": "The name of the prompt that should be used by for encoding. If not set, no prompt\nwill be applied.\n\nMust be a key in the `sentence-transformers` configuration `prompts` dictionary.\n\nFor example if ``prompt_name`` is \"query\" and the ``prompts`` is {\"query\": \"query: \", ...},\nthen the sentence \"What is the capital of France?\" will be encoded as\n\"query: What is the capital of France?\" because the prompt text will be prepended before\nany text to encode.",
2121
"default": "null",
2222
"example": "null",
2323
"nullable": true

0 commit comments

Comments
 (0)