Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions plugin-nostr/lib/service.js
Original file line number Diff line number Diff line change
Expand Up @@ -6926,7 +6926,7 @@ EXTRACT SPECIFICS:
IF POSTS MENTION AGENT/BOT:
- Treat as regular topic, focus on other content

OUTPUT MANDATORY REQUIREMENTS (JSON IS THE ONLY VALID RESPONSE):
OUTPUT MANDATORY REQUIREMENTS - RETURN RAW JSON ONLY (NO MARKDOWN, NO CODE FENCES, NO BACKTICKS):
{
"headline": "What PROGRESSED or EMERGED (<=18 words, not just 'X was discussed')",
"narrative": "Focus on CHANGE, EVOLUTION, or NEW DEVELOPMENTS (3-5 sentences)",
Expand All @@ -6941,13 +6941,15 @@ OUTPUT MANDATORY REQUIREMENTS (JSON IS THE ONLY VALID RESPONSE):
Tags from post metadata: ${rankedTags.join(', ') || 'none'}

POSTS TO ANALYZE (${recentBatch.length} posts):
${postLines} /// (REMEMBER TO OUTPUT JSON ONLY)`;
${postLines}

YOUR RESPONSE MUST START WITH { AND END WITH } - NO MARKDOWN FORMATTING`;

const raw = await generateWithModelOrFallback(
this.runtime,
type,
prompt,
{ maxTokens: 480, temperature: 0.45 },
{ maxTokens: 1000, temperature: 0.45 },
Copy link

Copilot AI Oct 31, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The maxTokens increase from 480 to 1000 represents a 108% increase. This change could impact API costs and response time significantly. Consider whether the full 1000 tokens are necessary, or if a more conservative value (e.g., 600-750) would suffice for JSON responses that typically don't require such large limits.

Suggested change
{ maxTokens: 1000, temperature: 0.45 },
{ maxTokens: 750, temperature: 0.45 },

Copilot uses AI. Check for mistakes.
(res) => this._extractTextFromModelResult(res),
(s) => (typeof s === 'string' ? s.trim() : ''),
() => null
Expand Down