Spaces:
Running
on
CPU Upgrade
Running
on
CPU Upgrade
File size: 194 Bytes
e4e0e54 |
1 2 3 4 |
import { ChatCompletionRequestMessage } from "openai"
export const getTextPrompt = (prompt: ChatCompletionRequestMessage[]) =>
prompt.reduce((acc, item) => acc.concat(item.content), "") || "" |