From 3fd344037f09d5e6a7b4321cbfb17a6216742982 Mon Sep 17 00:00:00 2001 From: HuggingFaceInfra <148469759+HuggingFaceInfra@users.noreply.github.com> Date: Fri, 7 Mar 2025 11:25:21 +0100 Subject: [PATCH] [Bot] Update tasks specs (#1252) This PR updates the @huggingface/tasks specs. It has been generated by running: ```sh pnpm run inference-tgi-import pnpm run inference-tei-import pnpm run inference-codegen ``` This PR was automatically created by the [Tasks - Update specs workflow](https://github.com/huggingface/huggingface.js/blob/main/.github/update-specs.yml). Make sure the changes are correct before merging. Co-authored-by: Wauplin <11801849+Wauplin@users.noreply.github.com> --- packages/tasks/src/tasks/chat-completion/inference.ts | 2 +- .../tasks/src/tasks/chat-completion/spec/stream_output.json | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/packages/tasks/src/tasks/chat-completion/inference.ts b/packages/tasks/src/tasks/chat-completion/inference.ts index a68d79ffc..731ebca7c 100644 --- a/packages/tasks/src/tasks/chat-completion/inference.ts +++ b/packages/tasks/src/tasks/chat-completion/inference.ts @@ -273,7 +273,7 @@ export interface ChatCompletionStreamOutputDelta { content?: string; role: string; tool_call_id?: string; - tool_calls?: ChatCompletionStreamOutputDeltaToolCall; + tool_calls?: ChatCompletionStreamOutputDeltaToolCall[]; [property: string]: unknown; } export interface ChatCompletionStreamOutputDeltaToolCall { diff --git a/packages/tasks/src/tasks/chat-completion/spec/stream_output.json b/packages/tasks/src/tasks/chat-completion/spec/stream_output.json index affbbe67b..e5b382696 100644 --- a/packages/tasks/src/tasks/chat-completion/spec/stream_output.json +++ b/packages/tasks/src/tasks/chat-completion/spec/stream_output.json @@ -104,7 +104,10 @@ "example": "assistant" }, "tool_calls": { - "$ref": "#/$defs/ChatCompletionStreamOutputDeltaToolCall" + "type": "array", + "items": { + "$ref": "#/$defs/ChatCompletionStreamOutputDeltaToolCall" + } } }, "title": "ChatCompletionStreamOutputToolCallDelta"