تخطَّ إلى المحتوى
TakoAPI
العودة إلى المهارات

baml-codegen

بواسطة killerapp

Web & Frontend Development
1.1kالتنزيلات وفق ما يذكره clawskills.sh
0المشاهدات
لا إعجاباتسجّل الدخول للإعجاب بهذه المهارة
—لم يُقيَّم بعد
تقييمك

موجز

Use when generating BAML code for type-safe LLM extraction, classification, RAG, or agent workflows - creates.

الوصف

ما الذي تفعله هذه المهارة

Generates complete BAML source files for type-safe LLM extraction, classification, RAG, and agent workflows from natural language requirements. Queries BoundaryML repositories via MCP for up-to-date patterns. Outputs typed client code for Python, TypeScript, Ruby, and Go.

BAML acts as a transpiler rather than a runtime dependency, so generated code has no BAML overhead in production and works natively with existing frameworks.

متى تستخدمها

  • Extracting structured invoice data from unstructured text
  • Building a classification pipeline for support ticket routing
  • Creating a RAG function that returns answers with source citations
  • Wiring a multi-step LangGraph agent to typed LLM outputs
  • Generating a vision extraction function from image inputs

مثال على سير العمل

الإدخال

User asks: generate a BAML extraction function for parsing invoices from PDFs, using GPT-4o, with FastAPI integration

الوكيل
  1. 1

    Query baml_Examples MCP server for extraction patterns matching invoice and fastapi markers

  2. 2

    Define Invoice class with typed fields, @description and @assert annotations

  3. 3

    Generate Extract function with string and image? inputs targeting the Invoice class

  4. 4

    Configure a GPT-4o client with exponential retry policy

  5. 5

    Output complete .baml files plus a FastAPI endpoint and pytest test suite

الإخراج

baml_src/invoice.baml with Invoice class, Extract function, GPT4o client, retry policy, plus app/extract_invoice.py FastAPI route and tests/test_invoice.py with 100% function coverage

المتطلبات

  • API key for at least one LLM provider (e.g. OPENAI_API_KEY, ANTHROPIC_API_KEY)
  • baml-cli installed
  • MCP server baml_Docs configured (required)
  • MCP server baml_Examples configured (optional)

التثبيت

clawhub install killerapp/baml-codegen

شغّل أمر واجهة سطر الأوامر، أو الصق النص في Claude Code أو Cursor أو Codex أو أي وكيل برمجة تستخدمه.

الروابط