MCPcopy Create free account
hub / github.com/pollinations/pollinations / createTextContent

Function createTextContent

packages/mcp/src/utils/coreUtils.js:18–23  ·  view source on GitHub ↗
(text, stringify = false)

Source from the content-addressed store, hash-verified

16 * @returns {Object} - Text content object
17 */
18export function createTextContent(text, stringify = false) {
19 return {
20 type: "text",
21 text: stringify ? JSON.stringify(text, null, 2) : text,
22 };
23}
24
25/**
26 * @param {string} data - Base64-encoded image data

Callers 15

setApiKeyFunction · 0.90
getKeyInfoFunction · 0.90
clearApiKeyFunction · 0.90
getBalanceFunction · 0.90
getUsageFunction · 0.90
respondAudioFunction · 0.90
sayTextFunction · 0.90
listAudioVoicesFunction · 0.90
transcribeAudioFunction · 0.90
generateImageUrlFunction · 0.90
generateImageFunction · 0.90
generateImageBatchFunction · 0.90

Calls 1

stringifyMethod · 0.80

Tested by

no test coverage detected