Production Ledger Summary and Report Generation for SMT Mounting and Electronic Assembly: Tool Calling and Plugins

Data sources for this category include BOMs and Gerber coordinate files provided by customers, plus real-time data from MES systems, mounters, SPI/AOI

What data for this category looks like

Data sources for this category include BOMs and Gerber coordinate files provided by customers, plus real-time data from MES systems, mounters, SPI/AOI inspection equipment, and reflow oven temperature recorders. Daily documents include changeover sheets, stencil records, first article confirmation sheets, SPI/AOI defect reports, maintenance records, and traceability labels. Data is synced in real time for each work order and each line change. Fields include part number, reference designator, substitute part, mounting coordinates, reflow temperature curve parameters, batch number, and more. Coordinate units are millimeters, and temperature units are degrees Celsius.

What constraints do these characteristics impose on tool calling and plugins

Data sources for this category are scattered and updated in real time, requiring tool calling to support parallel pulling from multiple data sources to avoid ledger generation delays caused by single tool timeouts. Production documents of different types have large format differences, so plugins must adapt to multiple formats including structured BOM tables, Gerber coordinate text, SPI/AOI PDF inspection reports, and more. Targeted parsing rules must be configured. Fields include parameters with specific units, so unit standardization mapping must be completed during tool calling, otherwise summary data deviations will occur. It must also support cross-data source comparison of part numbers and reference designators, match substitute part information, and reduce manual verification time. The content on this page is written based on the tool calling and plugin configuration logic of FastGPT v4.17.0.

How to configure the settings

Configuration ItemRecommended SettingRationale
Workflow/API tool selectionautoAdapts to multi-tool parallel calling scenarios, automatically selects the tool matching the current production ledger task
Single tool call timeout120 secondsMatches real-time production data pulling requirements, avoids task interruptions caused by slow device responses
Plugin parsing format adaptationConfigured by document typeAdapts to parsing requirements for multiple types of production documents including BOMs, coordinate files, and inspection reports
Field standardization mappingBound by unit and field nameMatches parameters with specific units such as millimeters and degrees Celsius for this category, avoids summary deviations
Workflow/API function-call configurationstrict: trueForces tool calls to return preset fields, ensuring unified ledger data structure
Maximum parallel tool callsFirst 3Avoids overloading the MES system caused by pulling data from multiple devices simultaneously

Three common configuration errors

  • Tool calls return a 400 error, prompting that tool messages require prior context. The cause is that tool calling context delivery is not configured in order, resulting in tool returned data not being bound to the current conversation task.
  • API calls and online chat return significantly different results. Fields are missing when stream is set to false and detail is set to true in API calls. The cause is that the strict mode of tool calling is not synchronized in the API configuration, resulting in inconsistent return formats between API calls and online chat.
  • Modules fail to load normally when calling Python dependency libraries. The cause is that the dedicated electronic manufacturing Python library of the corresponding version is not installed in the FastGPT runtime environment, resulting in failure to parse component batch data.

How to verify correct configuration

  • Upload a test BOM and coordinate file, trigger tool calling, and check if it can automatically pull MES data for the corresponding work order and complete field mapping.
  • Simulate a line change operation, call tools to generate a ledger, and verify that the returned temperature data uses degrees Celsius as the unit and mounting coordinates use millimeters as the unit.
  • After setting functionCall to strict: true, call tools and check if the returned results only include preset ledger fields with no extra redundant information.
  • Call data interfaces from three mounters simultaneously, check if data pulling and summary can be completed within 120 seconds with no timeout errors.

The values listed above are common starting points and should be evaluated against your own specific samples and use cases.