Skip to content

AI Secondary Development ​

1. Scope ​

AI secondary development usually includes adding model providers, extending model parameters, changing knowledge parsing, integrating protocol adaptation, or connecting business pages to AI assistants.

2. Development Map ​

3. Extension Points ​

AreaFocus
ProviderEndpoint, API key, authentication, timeout, and error handling.
ModelModel type, parameter validation, context length, and availability.
KnowledgeFile parsing, chunking, embedding, versioning, and publishing.
Protocol adaptationPrompt, protocol field extraction, thing-model mapping, and test cases.
NL2SQLSemantic fields, data permission, SQL safety, and query result formatting.
FrontendChat UI, provider management, knowledge operations, and result display.

4. Safety Rules ​

  • Never expose model keys in frontend code.
  • Validate and log model errors without leaking secrets.
  • Restrict NL2SQL by user permission and table whitelist.
  • Review AI-generated protocol or SQL output before execution.
  • Keep knowledge-base version rollback available.

5. Verification ​

ItemExpected Result
Provider testCorrect key succeeds and wrong key fails clearly.
ChatSimple prompts return stable answers.
KnowledgeSearch hits expected document chunks.
Protocol adaptationOutput can be verified by real device messages.
NL2SQLUnauthorized fields or tables cannot be queried.

FastBee | fastbee.cn