@huggingface/tasks 0.12.24 → 0.12.25

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.
package/dist/index.cjs CHANGED
@@ -6337,7 +6337,7 @@ __export(curl_exports, {
6337
6337
  // src/snippets/common.ts
6338
6338
  function stringifyMessages(messages, opts) {
6339
6339
  const keyRole = opts.attributeKeyQuotes ? `"role"` : "role";
6340
- const keyContent = opts.attributeKeyQuotes ? `"role"` : "role";
6340
+ const keyContent = opts.attributeKeyQuotes ? `"content"` : "content";
6341
6341
  const messagesStringified = messages.map(({ role, content }) => {
6342
6342
  if (typeof content === "string") {
6343
6343
  content = JSON.stringify(content).slice(1, -1);
package/dist/index.js CHANGED
@@ -6299,7 +6299,7 @@ __export(curl_exports, {
6299
6299
  // src/snippets/common.ts
6300
6300
  function stringifyMessages(messages, opts) {
6301
6301
  const keyRole = opts.attributeKeyQuotes ? `"role"` : "role";
6302
- const keyContent = opts.attributeKeyQuotes ? `"role"` : "role";
6302
+ const keyContent = opts.attributeKeyQuotes ? `"content"` : "content";
6303
6303
  const messagesStringified = messages.map(({ role, content }) => {
6304
6304
  if (typeof content === "string") {
6305
6305
  content = JSON.stringify(content).slice(1, -1);
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@huggingface/tasks",
3
3
  "packageManager": "pnpm@8.10.5",
4
- "version": "0.12.24",
4
+ "version": "0.12.25",
5
5
  "description": "List of ML tasks for huggingface.co/tasks",
6
6
  "repository": "https://github.com/huggingface/huggingface.js.git",
7
7
  "publishConfig": {
@@ -10,7 +10,7 @@ export interface StringifyMessagesOptions {
10
10
 
11
11
  export function stringifyMessages(messages: ChatCompletionInputMessage[], opts: StringifyMessagesOptions): string {
12
12
  const keyRole = opts.attributeKeyQuotes ? `"role"` : "role";
13
- const keyContent = opts.attributeKeyQuotes ? `"role"` : "role";
13
+ const keyContent = opts.attributeKeyQuotes ? `"content"` : "content";
14
14
 
15
15
  const messagesStringified = messages.map(({ role, content }) => {
16
16
  if (typeof content === "string") {