Wauplin HF Staff commited on
Commit
dce90f2
·
verified ·
1 Parent(s): 9926dc7

Upload folder using huggingface_hub

Browse files
Files changed (1) hide show
  1. src/routes/responses.ts +7 -1
src/routes/responses.ts CHANGED
@@ -300,7 +300,13 @@ async function* innerRunStream(
300
  .filter((item) => {
301
  return item !== undefined;
302
  });
303
- const maybeFlatContent = content.length === 1 && typeof content[0] === "object" && "type" in content[0] && content[0].type === "text" ? content[0].text : content;
 
 
 
 
 
 
304
  return {
305
  role: item.role,
306
  content: maybeFlatContent,
 
300
  .filter((item) => {
301
  return item !== undefined;
302
  });
303
+ const maybeFlatContent =
304
+ content.length === 1 &&
305
+ typeof content[0] === "object" &&
306
+ "type" in content[0] &&
307
+ content[0].type === "text"
308
+ ? content[0].text
309
+ : content;
310
  return {
311
  role: item.role,
312
  content: maybeFlatContent,