MCPcopy Create free account
hub / github.com/CommandCodeAI/BaseAI / constructor

Method constructor

packages/core/src/pipes/pipes.ts:98–115  ·  view source on GitHub ↗
(options: PipeOptions)

Source from the content-addressed store, hash-verified

96 private entityApiKey?: string;
97
98 constructor(options: PipeOptions) {
99 this.prod = options.prod ?? isProd();
100 this.baseUrl = getApiUrl(this.prod);
101
102 this.request = new Request({
103 apiKey: options.apiKey,
104 baseUrl: this.baseUrl,
105 });
106 this.pipe = options;
107 this.entityApiKey = options.apiKey;
108
109 delete this.pipe.prod;
110 delete this.pipe.apiKey;
111
112 this.tools = this.getToolsFromPipe(this.pipe);
113 this.maxCalls = options.maxCalls || 100; // TODO: Find a sane default.
114 this.hasTools = Object.keys(this.tools).length > 0;
115 }
116
117 private getToolsFromPipe(
118 pipe: Pipe,

Callers

nothing calls this directly

Calls 3

getToolsFromPipeMethod · 0.95
isProdFunction · 0.90
getApiUrlFunction · 0.90

Tested by

no test coverage detected