MCPcopy
hub / github.com/CopyTranslator/CopyTranslator / setUp

Method setUp

src/main/ocr.ts:42–51  ·  view source on GitHub ↗
(config: { app_id: string; api_key: string; secret_key: string })

Source from the content-addressed store, hash-verified

40 }
41
42 setUp(config: { app_id: string; api_key: string; secret_key: string }) {
43 if (!examToken(config)) {
44 //修复config无效时依然client不为undefined
45 this.client = undefined;
46 } else {
47 const { app_id, api_key, secret_key } = config;
48 const AipOcrClient = require("baidu-aip-sdk").ocr;
49 this.client = new AipOcrClient(app_id, api_key, secret_key);
50 }
51 }
52
53 capture() {
54 this.getShortcutCapture().shortcutCapture();

Callers 1

postSetMethod · 0.45

Calls 1

examTokenFunction · 0.90

Tested by

no test coverage detected