INNER CODE UNIT · JavaScript

level

apostrophecms/apostrophe · packages/ai-helper/modules/@apostrophecms/ai-helper-rich-text-widget/index.js:100

              const level = headingLevels[hashes.length - 1];
              return before + (level ? ('#'.repeat(level) + ' ') : '');
            });

            const html = marked.parse(markdown);

            return {
              html,
              metadata,
              provider: providerName
            };

          } catch (e) {
            let notificationMessage;
            let notificationType = 'danger';

            if (e.refusal) {
              notificationMessage = 'aposAiHelper:contentPolicyViolation';

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…