Spaces:
Paused
Paused
Download src/providers/language-model/openai/getTextPrompt.mts from jbilcke-hf/VideoChain-API: direct link, hf CLI and curl.
- Browser
- Download file 194 Bytes
-
https://huggingface.co/spaces/jbilcke-hf/VideoChain-API/resolve/main/src/providers/language-model/openai/getTextPrompt.mts
- Command line
-
hf download hf://spaces/jbilcke-hf/VideoChain-API/src/providers/language-model/openai/getTextPrompt.mts
-
curl -L -o getTextPrompt.mts https://huggingface.co/spaces/jbilcke-hf/VideoChain-API/resolve/main/src/providers/language-model/openai/getTextPrompt.mts
194 Bytes
| import { ChatCompletionRequestMessage } from "openai" | |
| export const getTextPrompt = (prompt: ChatCompletionRequestMessage[]) => | |
| prompt.reduce((acc, item) => acc.concat(item.content), "") || "" |