惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

WordPress大学
WordPress大学
博客园 - 司徒正美
I
InfoQ
宝玉的分享
宝玉的分享
G
Google Developers Blog
J
Java Code Geeks
Martin Fowler
Martin Fowler
The GitHub Blog
The GitHub Blog
H
Hackread – Cybersecurity News, Data Breaches, AI and More
罗磊的独立博客
腾讯CDC
F
Fortinet All Blogs
A
About on SuperTechFans
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
Recent Announcements
Recent Announcements
Last Week in AI
Last Week in AI
B
Blog RSS Feed
博客园 - 聂微东
D
DataBreaches.Net
Hugging Face - Blog
Hugging Face - Blog
The Cloudflare Blog
L
LangChain Blog
Microsoft Azure Blog
Microsoft Azure Blog
aimingoo的专栏
aimingoo的专栏

DEV Community

Authentication Security Deep Dive: From Brute Force to Salted Hashing (With Java Examples) Why AI Systems Don’t Fail — They Drift Spilling beans for how i learn for exam😁"Reinforcement Learning Cheat Sheet" I Replaced Chrome with Safari for AI Browser Automation. Here's What Broke (and What Finally Worked) How Python Borrows Other People's Work The $40 Architecture: Processing 1 Billion API Requests with 99.99% Uptime Vibe Coding: A Workflow Guide (From Zero to SaaS) Most webhook security guides protect the wrong side. The scary part is delivery. Headless CMS for TanStack Start: Build a Blog with Cosmic EU Age Verification App "Hacked in 2 Minutes" — What Actually Happened Comfy Cloud’s delete function does not actually remove files Running AI Models on GPU Cloud Servers: A Beginner Guide Event-driven media intelligence with AWS Step Functions and Bedrock I scored 500 AI prompts across 8 quality dimensions — here's what broke How to Call Google Gemini API from Next.js (Free Tier, No Backend Needed) The Portal Protocol: Reclaiming Human Connection in the Age of AI How to Fix Your Team's Scattered Knowledge Problem With a Self-Hosted Forum Intro to tc Cloud Functors: A Graph-First Mental Model for the Modern Cloud Designing Multi-Tenant Backends With Both Ownership and Team Access I Built a Neumorphic CSS Library with 77+ Components — Here's What I Learned PostgreSQL Performance Optimization: Why Connection Pooling Is Critical at Scale Cómo construí un SaaS multi-rubro para gestionar expensas en Argentina con FastAPI + Vue 3 🚀 I Built an Ethical Hacking Scanner Tool – Open Source Project I Replaced /usage and /context in Claude Code With a Single Statusline A Pythonic Way to Handle Emails (IMAP/SMTP) with Auto-Discovery and AI-Ready Design I Collected 8.9 Million Polymarket Price Points — Here's What I Found About How Markets Really Move EcoTrack AI — Carbon Footprint Tracker & Dashboard Everyone's Using AI. No One Agrees How. 5 self-hosted ebook managers worth trying in 2026 Building Your First AI Agent with LangChain: From Chatbot to Autonomous Assistant
TL;DR
Roberto Luna · 2026-06-25 · via DEV Community

Roberto Luna

TL;DR

I recently made significant changes to the content-automation repository, focusing on improving the Craft API integration and model management. The key changes include updating the craft_publisher.py to handle array payloads for documents, switching to the meta-llama/llama-4-scout-17b-16e-instruct model, and implementing dual endpoint fallback for Craft publisher.

The Problem

The primary issue was that the Craft API was expecting an array in the documents payload, but the current implementation was not providing it. This resulted in errors and prevented the successful creation of documents in Craft. Additionally, there were issues with the model used for content generation, which needed to be updated to a more suitable one.

What I Tried First

Initially, I attempted to modify the craft_publisher.py file to include the necessary array structure in the payload. However, I encountered issues with the model used for content generation, which was llama3-70b-8192. I tried using this model but faced problems with thinking blocks in the output.

The Implementation

To fix the issue with the Craft API, I updated the craft_publisher.py file to include the array structure in the payload. The changes can be seen in the following code snippet:

def _create_document(
    self, title: str, content: str, tags: List[str]
) -> Optional[str]:
    """Creates document in Craft. Returns doc ID or None."""
    payload = {
        "title": title,
        "content": content,
        "tags": tags,
        "fields": [
            {"key": "title", "value": title},
            {"key": "content", "value": content},
        ],
    }
    # ... rest of the function ...

I also updated the model used for content generation to meta-llama/llama-4-scout-17b-16e-instruct. This involved modifying the settings.yml file and the main.py file to use the new model.

Key Takeaway

The key takeaway from this experience is the importance of carefully reviewing the API documentation and ensuring that the payload structure matches the expected format. Additionally, it's crucial to test and validate the changes to prevent errors and ensure smooth functionality.

What's Next

In the next steps, I plan to implement further improvements to the content automation process, including exploring other models and fine-tuning the existing ones. I also aim to enhance the error handling and logging mechanisms to ensure better visibility into the process.

Code Changes

The code changes can be found in the following commits:

  • 9eb58ec5: fix: Craft API espera array en documents — payload corregido
  • fix: migrar a meta-llama/llama-4-scout-17b-16e-instruct — todos los modelos anteriores decomisionados

Tags

vibecoding #buildinpublic #AI #Productivity #CraftAPI #ContentAutomation


Part of my Build in Public series — sharing the real process of building SaaS projects from Playa del Carmen, México.

Repo: zaerohell/content-automation · 2026-06-24

#playadev #buildinpublic